All threads may not be equal readylist data when gets

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: l threads may not be equal readyList data when gets de-scheduled … Thread Thread Scheduling (cont’d) The scheduler makes a sequence of “moves” that determines the the interleaving of threads. • Programs use synchronization to prevent “bad moves”. • …but otherwise scheduling choices appear (to the program) to be nondeterministic. The scheduler’s moves are dictated by a scheduling policy Applies to process scheduling as well Thread Thread Scheduling (cont’d) Priority scheduling threads have a priority scheduler selects thread with highest priority to run preemptive or non-preemptive Priority inversion 3 threads, t1, t2, and t3 (priority order – low to high) t1 is holding a resource (lock) that t3 needs t3 is obviously blocked t2 keeps on running! BREAK BREAK CSci CSci 5103 Operating Systems User/Kernel Threads PopPop-Up Threads Create cheaper than restore; still have to save state of prior thread Idea: if you are already in the kernel a new message comes in, 31 create new thread Implementing Implementing Threads in User Space A user-level threads package 32 Implementing Implementing Threads in the Kernel A threads package managed by the kernel 33 Pros of kernel threads: Pros of user threads: Hybrid Implementations Hybrid Implementations – best of both … Multiplexing user-level threads onto kernel- level threads Solaris is one example 35 Really Really want to maintain user threads Comparing user-level threads, kernel thr...
View Full Document

This document was uploaded on 04/02/2014.

Ask a homework question - tutors are online