Download presentation
Presentation is loading. Please wait.
Published byMadison Maxwell Modified over 9 years ago
1
Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman
2
Introduction Brief History Multiprocessor Support Dealing With Deadlock CPU Scheduling Virtual Memory Conclusion
3
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)
4
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
5
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
6
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
7
Lightweight Processes Kernel-supported threads of control in a user process Each LWP is associated with a kernel thread
8
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
9
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
10
Solaris CPU Scheduling James J. Sheasley
11
Process Scheduling Process States Running Sleeping Ready Scheduling Classes Timesharing Interactive System Real Time
12
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.
13
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.
14
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.
15
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.
16
Scheduling Class Priorities ClassPriority Time Sharing 0-59 Interactive0-59 System60-99 Interrupt100-109 ClassPriority Time Sharing 0-59 Interactive0-59 System60-99 Real Time100-159 Interrupt160-169
17
Time Slicing ts_quantum the default length of time assigned to a process with the specified priority. ts_tqexp the new priority that is assigned to a process that uses its entire time quantum. ts_slpret the new priority assigned to a process that blocks before using its entire time quantum. ts_maxwait If a thread does not receive CPU time during a time interval of ts_maxwait, its priority is raised to ts_lwait. ts_lwait
18
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.
19
Virtual Memory Demand Paging - Second Chance Two Handed Algorithm Clears, then checks periodically Done in Unison Difference is the handspread
20
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
21
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.
22
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)
23
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
24
Unswappable Processes Realtime Executed by a signal Exiting Zombie System Thread Blocking a higher priority thread
25
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
26
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
27
Conclusion “The Network is the computer” – Sun MicroSystems Solaris 9 OE Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.