270 likes | 422 Views
Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman. Introduction. Brief History Multiprocessor Support Dealing With Deadlock CPU Scheduling Virtual Memory Conclusion. Brief History. AT&T’s Bell Labs 1969 Berkley Standard Distribution 1977
E N D
SolarisCS 450-2Dr. AbzugAlex BloodMike HenryJames SheasleyDavid Waterman
Introduction • Brief History • Multiprocessor Support • Dealing With Deadlock • CPU Scheduling • Virtual Memory • Conclusion
Brief History • AT&T’s Bell Labs 1969 • Berkley Standard Distribution 1977 • Department of Defense • AT&T Sun Microsystems Alliance: Unix System V Release 4 • Solaris 9 OE • Solaris 9 OE x86 Early Access (Dec. 2)
Multiprocessing The Solaris kernel includes: • Concurrency on symmetric multiprocessors • Adaptive mutual-exclusion locks • Interrupts handled as independent threads • Fully preemptible, soft real-time support • Lightweight Processes
Interrupts Handled As Threads • When an interrupt occurs, a new thread is associated with it • Partially initialized threads are created beforehand by the kernel to save time when an interrupt occurs • The interrupt data is pushed onto the stack of the partially initialized thread, using minimal resources
Soft Real-Time Support • The kernel is preemptible at most points, but not all • When the kernel is in a non-preemptible state, there is a time limit defined by the hardware before it has to enter a preemptible state
Lightweight Processes • Kernel-supported threads of control in a user process • Each LWP is associated with a kernel thread
Lightweight Processes (Cont) • LWPs share address space with the process, and process resources • LWPs allow a user process to have thousands of threads without overwhelming the kernel
Dealing With Deadlocks • Prevention by treating interrupts as threads • Prevention using mutexes • Detection by priority inheritance mechanism • Do nothing, when priority inheritance mechanism does not detect the deadlock
Solaris CPU Scheduling James J. Sheasley
Process States Running Sleeping Ready Scheduling Classes Timesharing Interactive System Real Time Process Scheduling
Timesharing • Regular user work. The CPU is rotated between threads at the same priority by time slicing. Compute-bound operations have their priority lowered and I/O-bound operations have their priorities raised.
Interactive Interactive class. This is the same as the Time Sharing class with the addition of a priority increase that is given to the task in the active window. The active window has the highest priority among normal user processes.
System Kernel priorities. This class is used for system threads. The CPU is not shared amongst these threads by time slicing. These system threads run until finished or pre-empted. Fixed priority levels are utilized in this class of processes.
Real Time Processes that require immediate system access, such as critical hardware systems. Interrupt handling is the only classification that gets higher priority that Real Time. Threads will share the CPU through time slicing if they have the same priority. Real time threads have a priority that is constant for the duration of their existence.
Thundering Heard • Multiple threads waiting on a single resource. • All threads awoken when resource becomes free. • Additional “inherited” priority property attempts to limit “mad dash” for the resource.
Virtual Memory • Demand Paging - Second Chance Two Handed Algorithm • Clears, then checks periodically • Done in Unison • Difference is the handspread
Page Faults • Moving page to free list sends it to be written to swap • Minor page fault – Page is reclaimed before it can be overwritten • Major page fault – Page must be brought in back from swap
Minimal Paging • Paging does not happen until free memory falls below lotsfree (1/64 of memory) • Page Scanner will scan between a boundry (slowscan to fastscan) • Generally, most parameters are tunable by the sysadmin if necessary.
Soft Swapping • Tries to keep memory above desfree (half of lotsfree) for a 30 second average • If unsucessful, soft swapping occurs. • Only swaps idle processes (default is 20 seconds)
Hard Swapping • Trying to avoid thrashing • 30 second average falls below minfree and current is below desfree • Even running jobs can be swapped • Favors long running or large processes
Unswappable Processes • Realtime • Executed by a signal • Exiting • Zombie • System Thread • Blocking a higher priority thread
Priority Paging (Solaris 2.6) • Cache Pollution hurting performance • Program Data now favored over File Cache • Enabled 2x lotsfree • Only free file cache when free memory is between lotsfree and cachefree • Pager gets confused if the file has the executable bit set
Cyclical Page Cache (Solaris 8) • Two seperate lists for file cache and program data • Sun Claims: • Higher Page Reclaims • Higher Free Memory Values • “Zero” Scan Rates
Conclusion • “The Network is the computer” – Sun MicroSystems • Solaris 9 OE • Questions?