From the course: Complete Guide to Parallel and Concurrent Programming with Java
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Thread vs. process: Java demo - Java Tutorial
From the course: Complete Guide to Parallel and Concurrent Programming with Java
Thread vs. process: Java demo
- [Instructor] When you run a Java application, it executes within its own instance of the Java Virtual Machine, or JVM, and the operating system treats that instance of the JVM as its own independent process. So if you run multiple Java applications at the same time, they'll each execute in a separate JVM process with their own independent memory space. Now, before I demonstrate a Java process with several threads in action, let's first take a look at the number of processors that are available on this computer, which I'll be using for the demonstrations throughout this course. To do that, I'll press control, shift, escape to open the task manager, and then I'll select the Performance tab. At the bottom, I can see that this computer has 12 cores and 24 logical processors. It's quite a powerful computer. Those numbers mean this computer has 12 separate complete physical processing cores, and each of those cores support something called hyperthreading, which enables them to each run…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Thread vs. process4m 36s
-
(Locked)
Thread vs. process: Java demo6m 48s
-
(Locked)
Concurrent vs. parallel execution4m 54s
-
(Locked)
Execution scheduling3m 38s
-
(Locked)
Execution scheduling: Java1m 57s
-
(Locked)
Thread lifecycle3m 35s
-
(Locked)
Thread lifecycle: Java demo4m 55s
-
(Locked)
Thread attributes: Java demo2m 22s
-
(Locked)
Runnable vs. thread: Java demo3m 53s
-
(Locked)
Daemon thread2m 48s
-
(Locked)
Daemon thread: Java demo2m 21s
-
-
-
-
-
-
-
-
-
-
-