solaris cs 450-2 dr. abzug alex blood mike henry james sheasley david waterman
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/1.jpg)
Solaris
CS 450-2Dr. Abzug
Alex BloodMike Henry
James SheasleyDavid Waterman
![Page 2: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/2.jpg)
Introduction
• Brief History
• Multiprocessor Support
• Dealing With Deadlock
• CPU Scheduling
• Virtual Memory
• Conclusion
![Page 3: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/3.jpg)
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)
![Page 4: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/4.jpg)
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
![Page 5: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/5.jpg)
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
![Page 6: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/6.jpg)
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
![Page 7: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/7.jpg)
Lightweight Processes
• Kernel-supported threads of control in a user process
• Each LWP is associated with a kernel thread
![Page 8: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/8.jpg)
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
![Page 9: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/9.jpg)
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
![Page 10: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/10.jpg)
Solaris CPU Scheduling
James J. Sheasley
![Page 11: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/11.jpg)
Process Scheduling
Process States• Running• Sleeping• Ready
Scheduling Classes• Timesharing• Interactive• System• Real Time
![Page 12: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/12.jpg)
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.
![Page 13: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/13.jpg)
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.
![Page 14: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/14.jpg)
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.
![Page 15: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/15.jpg)
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.
![Page 16: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/16.jpg)
Scheduling Class Priorities
Class Priority
Time Sharing
0-59
Interactive 0-59
System 60-99
Interrupt 100-109
Class Priority
Time Sharing
0-59
Interactive 0-59
System 60-99
Real Time 100-159
Interrupt 160-169
![Page 17: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/17.jpg)
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
![Page 18: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/18.jpg)
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.
![Page 19: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/19.jpg)
Virtual Memory
• Demand Paging - Second Chance Two Handed Algorithm•Clears, then checks periodically•Done in Unison•Difference is the handspread
![Page 20: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/20.jpg)
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
![Page 21: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/21.jpg)
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.
![Page 22: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/22.jpg)
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)
![Page 23: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/23.jpg)
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
![Page 24: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/24.jpg)
Unswappable Processes
• Realtime• Executed by a signal• Exiting• Zombie• System Thread• Blocking a higher priority thread
![Page 25: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/25.jpg)
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
![Page 26: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/26.jpg)
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
![Page 27: Solaris CS 450-2 Dr. Abzug Alex Blood Mike Henry James Sheasley David Waterman](https://reader035.vdocuments.net/reader035/viewer/2022062517/56813cd8550346895da67b6e/html5/thumbnails/27.jpg)
Conclusion
• “The Network is the computer” – Sun MicroSystems
• Solaris 9 OE• Questions?