CS 3204 Operating Systems Lecture 30 Godmar Back Announcements Project 3 due April 13 Th Apr 6, 7pm, 655 McBryde: attend townhall meeting regarding planned restructuring of 6th floor undergrad space CS 3204 Spring 2006 02/28/20 2 Kernel-level vs User-level Threads M:N Model Solaris Lightweight Processes
CS 3204 Spring 2006 02/28/20 4 M:N Model (contd) Invented for use in Solaris OS early 90s Championed for a while Idea was to get the best of both worlds Fast context switches if between user-level threads Yet enough concurrency to exploit multiple CPUs Since abandoned in favor of kernel-level threads only approach Too complex whats the right number of LWP? 2-level scheduling/resource management was hard: both user/kernel operated with half-blind CS 3204 Spring 2006 02/28/20
5 Multi-Threading in Linux Went through different revisions Today (Linux 2.6): NPTL Next-Generation POSIX Thread Library 1:1 model optimizes synchronization via futexes avoids mode switch for common case of uncontended locks by performing atomic operation constant-time scheduling operation allow for scaling in number of threads CS 3204 Spring 2006 02/28/20 6 Summary Memory Management Address Spaces vs Protection Domains Kernel vs User-Level Threads
CS 3204 Spring 2006 02/28/20 7 Disks & Filesystems What Disks Look Like Hitachi Deskstar T7K500 SATA CS 3204 Spring 2006 02/28/20 9 How Disks Work Flash Animation See http://cis.poly.edu/cs2214rvs/disk.swf
CS 3204 Spring 2006 02/28/20 10 Disk Schematics Source: Micro House PC Hardware Library Volume I: Hard Drives CS 3204 Spring 2006 02/28/20 11 Typical Disk Parameters
2-30 heads (2 per platter) Diameter: 2.5 14 Capacity: 20MB-500GB Sector size: 64 bytes to 8K bytes Most PC disks: 512 byte sectors 700-20480 tracks per surface 16-1600 sectors per track CS 3204 Spring 2006 02/28/20 12 Whats important about disks from OS perspective Disks are big & slow - compared to RAM Access to disk requires Seek (move arm to track) to cross all tracks anywhere from 2050ms, on average takes 1/3. Rotational delay (wait for sector to appear under track) 7,200rpm is 8.3ms per rotation, on average takes : 4.15ms rot delay Transfer time (fast: 512 bytes at 998 Mbit/s is about 3.91us)
Seek+Rot Delay dominates Random Access is expensive and unlikely to get better Consequence: avoid seeks seek to short distances amortize seeks by doing bulk transfers CS 3204 Spring 2006 02/28/20 13 Disk Scheduling Can use priority scheme Can reduce avg access time by sending requests to disk controller in certain order Or, more commonly, have disk itself reorder requests SSTF: shortest seek time first
Like SJF in CPU scheduling, guarantees minimum avg seek time, but can lead to starvation SCAN: elevator algorithm Process requests with increasing track numbers until highest reached, then decreasing etc. repeat Variations: LOOK dont go all the way to the top without passengers C-SPAN: - only take passengers in one direction CS 3204 Spring 2006 02/28/20 14 Accessing Disks Sector is the unit of atomic access Writes to sectors should always complete, even if power fails Consequence: Writing a single byte requires read-modifywrite void
off/DISK_SECTOR_SIZE,buffer); buffer); CS 3204 Spring 2006 02/28/20 15 Disk Caching Buffer Cache How much memory should be dedicated for it? In older systems (& Pintos), set aside a portion of physical memory In newer systems, integrated into virtual memory system: e.g., page cache in Linux How should prefetching be done? How should concurrent access be mediated (multiple processes may be attempting to write/read to same sector)? How is consistency guaranteed? (All must go through buffer cache!)
What write-back strategy should be used? CS 3204 Spring 2006 02/28/20 16 Buffer Cache in Pintos Cache Block Descriptor - disk_sector_id, if in use - dirty bit - valid bit - # of readers - # of writers - # of pending read/write requests - lock to protect above variables - signaling variables to signal availability changes - usage information for eviction policy - data (pointer or embedded)
A consumer account that involves multiple payments or transactions, such as a loan or account that is billed or payable in installments ... PCI DSS, GLB) focuses on data security in order to avoid theft of personal, confidential information. ......
The Basque Fab Lab DenokInn DenokInn is the Basque Centre for Innovation, Entrepreneurship and New Business Development. DenokInn promotes a comprehensive approach towards innovation in order to identify and promote new business opportunities and services in existing firms and/or within...
Inhibition The ability to deliberately ignore and filter distracting responses or thoughts, and distracting irrelevant information held in working Memory (e.g., Baddeley, 1996; Baddeley et al., 1998). Shifting (mental flexibility) The ability to switch attention back and forth between mental...
Domy v Auvers, 1890 často umisťuje tmavý předmět vlevo do středu je vložen hlavní objekt Co je typické pro van Goghovu malbu? pro van Gogha je typické silné reliéfní nanášení čistých barev, které střídají čáry a plochy vyjadřující pohyb Co...
Tutor T1 Reporting Name: Tutor Role Letters and Marks: T1 Role: Primary Trainer Tutor T1 The Grob 115E aircraft entered Royal Air Force service in 1999 as the Tutor T1, replacing the Bulldog at UAS and AEFs The RAF Tutor...
Ready to download the document? Go ahead and hit continue!