Learn how to recognize that a thread or process can starve if it is perpetually denied the resources it needs in this video. Gain an understanding of the impact of thread priorities and how they can potentially cause thread starvation.
- It would be nice if Olivia and I … took turns acquiring and releasing the pair of chopsticks … so we could each take an equal amount of sushi … from the shared plate. … But that's not guaranteed to happen. … The operating system decides when each of our threads … gets scheduled to execute, … and depending on the timing of that, … it can lead to problems. … If Olivia puts down the chopsticks to release her lock … on the critical section, … but my thread doesn't get a chance to acquire them … before she takes them again, … then I'll be stuck waiting again, … until she takes another piece. … If that happens occasionally, it's probably not a big deal. … But if it happens regularly. … - Too slow. … - Then my thread's going to starve. … Starvation occurs when a thread is unable to gain access … to a necessary resource, … and is therefore unable to make progress. … If another greedy thread is frequently holding a lock … on the shared resource, then the starved thread … won't get a chance to execute. …
- 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.