DOC PREVIEW
UMD CMSC 412 - Lecture Slides

This preview shows page 1-2-3 out of 10 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 10 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

AnnouncementsProject #3Disk SchedulingDisk SchedulingDisk CacheVirtual Memory and File CacheMemory Mapped FilesBad BlocksBooting the OSBooting the OS (cont.)1CMSC 412 – S02 (lect 16)Announcementsz Reading Chapter 13z Midterm #2 is on Thursday– Covers through last Th lecture– Can repeat info from first midterm2CMSC 412 – S02 (lect 16)Project #3z See updated buildfat for improved error messages3CMSC 412 – S02 (lect 16)Disk Schedulingz First come, first served– ordering may lead to lots of disk head movement– i.e. 1, 190, 3, 170, 4, 160 etc.– total number of tracks traversed : 863z Shortest seek time first: select request with the minimum seek time from current head position– move head to closest track– i.e. 1,3,4,160,190– total number of tracks traversed: 189– potential problem with distant tracks not getting service for an indefinite period4CMSC 412 – S02 (lect 16)Disk Schedulingz Scan scheduling - read-write head starts at one end of the disk, moves to the other, servicing requests as it reaches each track– Consider example: 1, 190, 3, 170, 4, 160 – If head starts at track 64 and moves towards 0, the ordering would be 4,3,1,160,170,190– Total distance 265z C-Scan (circular scan)– disk head sweeps in only one direction– when the disk head reaches one end, it returns to the other– Consider example: 1, 190, 3, 170, 4, 160 – If head starts at track 64 and moves towards 0, the ordering would be 4,3,1,190,170,160– Total distance 2825CMSC 412 – S02 (lect 16)Disk Cachez Buffer in main memory for disk sectorsz Cache contains copy of some of the sectors on a disk. When I/O request is made for a sector, a check is made to find out if sector is in the disk cachez Replacement strategy:– Least recently used: block that has been in the cache longest with no reference gets replaced– Least frequently used: block that experiences fewest references gets replaced6CMSC 412 – S02 (lect 16)Virtual Memory and File Cachez Both need to contend for memoryz Possible solutions:– Fixed size allocation of buffer cache (I.e. 20% of memory)– Unified buffer cache and virtual memory system• All pages (memory and file buffer) compete for all of memory• Allows large processes or lots of file access as needed7CMSC 412 – S02 (lect 16)Memory Mapped Filesz Can treat files like memory– Allows fast random access to files– Uses file cache to make operations fastz Interface– Use mmap call to map file into memory (similar to open)– Use normal memory operations to access file (instead of read/write)– Use munmap to “close” file8CMSC 412 – S02 (lect 16)Bad Blocksz Some blocks on a disk may not work– could be bad from the start (when disk is installed)– could go bad during usez Two options to manage bad blocks– disk drive maps the blocks to “replacement” blocks• special blocks that are held in reserve for this purpose– OS keeps track of where the bad blocks are located and avoids themz Replacement blocks– can be located in tracks at one location, or around the disk– provide correct behavior, but change disk performancez Even if the disk re-maps bad blocks– OS could loose data stored on disk– needs to be able to recover filesystem from partial update9CMSC 412 – S02 (lect 16)Booting the OSz How does the OS get loaded and started?z Process is called booting– want to use the OS to load itself– but what loads the OS?z ROM monitor– knows how to read from a fixed location on disk and jump into itz Bootstrap program– knows how to load a program from the filesystem and jump into itz Alternative:– put more info into ROM about booting • MAC OS has most of the info in ROM• hard to change OS without changing ROMs10CMSC 412 – S02 (lect 16)Booting the OS (cont.)z put info into ROM about booting – MAC OS has most of the info in ROM– hard to change OS without changing ROMsz Network Booting– ROM knows how to request a boot packet from the network• once the packet is received, execute it– useful for systems without local disks– used by OS developers to ease edit/compile/boot


View Full Document

UMD CMSC 412 - Lecture Slides

Documents in this Course
Security

Security

65 pages

Deadlocks

Deadlocks

22 pages

Set 2

Set 2

70 pages

Project 2

Project 2

21 pages

Load more
Download Lecture Slides
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Slides and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Slides 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?