





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






SunOS 5.0 kernel is the main operating system
component for Solaris 2.
-^
kernel consists of kernel threads – lightweight,inexpensive switching, fully preemtible
-^
process model changed from heavyweight tolightweight processes (LWPs)
-^
LWPs map one-to-one to kernel threads
-^
kernel threads that are only used internally don’tneed to be associated with LWPs (system threads)
-^
entire kernel is multithreaded (e.g., for asyncoperations), even interrupts
kernel thread structure–
kernel registers– scheduling class– dispatch queue links– pointer to the stack– pointers to LWP, process, and CPU structure
-^
CPU structure:–
pointer to currently executing thread– pointer to idle thread– current dispatching and interrupt handling info– for the most part architecture independent
-^
for efficient access to structures, hold pointer to current thread inglobal register–
enables access to struct fields with single instruction
Support for multiple scheduling classes– system, timesharing, real-time (fixed-priority)– dispatcher chooses thread with greatest global priority
to run on a CPU
Preemption – kernel is fully preemtible– if a higher priority thread becomes runnable, it is
scheduled
as soon as possible
in the place of a lower
priority thread
high priority to preempt other threads, i.e. preemption in user-level libraries…
mutexes when spinning need to raise interrupt levelabove that of interrupt handlers that use mutexes– otherwise?– this is expensive, and makes interrupt coding inconvenient
-^
Solution: interrupts (up to a certain level) are threadedas asynchronously created and dispatched high-prioritythreads– mutexes get interrupted, but the result is the creation of an
interrupt thread
if it needs to be awaken, during dispatching)
for efficiency there are preallocated, partiallyinitialized interrupt threads
-^
initially (after interrupt occurs), interrupt threadsare not separate from interrupted thread, which ispinned, and cannot move to another CPU
-^
if the interrupt thread blocks, then it becomes afull-fledged thread, separate from interruptedthread, and can be descheduled.
-^
CPU structure keeps track of interrupt level ofblocked interrupt thread, so lower level interruptsare ignored