In this video, learn about the parent-child relationship between the main thread in a program and child threads spawned under it. Gain an understanding of the four basic stages of a thread's lifecycle, starting in the NEW state, executing in the RUNNABLE state, waiting in the BLOCKED state, and finally finishing in the TERMINATED state.
- When a new process or program begins running, … it will start with just one thread, … which is called the main thread, … because it's the main one that runs when the program begins. … That main thread can then start or spawn … additional threads to help out, … referred to as its child threads, … which are part of the same process … but execute independently to do other tasks. … Those threads can spawn their own children if needed, … and as each of those threads finish executing, … they'll notify their parent and terminate, … with the main thread usually being … the last to finish execution. … Over the life cycle of a thread, … from creation through execution and finally termination, … threads will usually be in one of four states. … If I'm the main thread in this kitchen, … and I spawn or create another thread to help me, … that child thread will begin in the new state. … - Hello! … - This thread isn't actually running yet, … so it doesn't take any CPU resources. … - I don't even know what I'm supposed to be doing. …
- Parallel vs. sequential computing
- Shared vs. distributed memory
- Execution scheduling
- Thread lifecycle
- Mutual exclusion
- Synchronized methods
- Checking for liveness
Skill Level Advanced
Java Essential Training: Objects and APIswith David Gassner2h 46m Intermediate
Java Essential Training: Syntax and Structurewith David Gassner3h 9m Intermediate
1. Parallel Computing Hardware
2. Threads and Processes
3. Mutual Exclusion
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.