Module 13- Secondary-StorageChapter 14 Silberschatz 6th.ppt
《Module 13- Secondary-StorageChapter 14 Silberschatz 6th.ppt》由会员分享,可在线阅读,更多相关《Module 13- Secondary-StorageChapter 14 Silberschatz 6th.ppt(32页珍藏版)》请在麦多课文档分享上搜索。
1、Applied Operating System Concepts,Module 13: Secondary-Storage Chapter 14 Silberschatz 6th ed.,Disk Structure Disk Scheduling Disk Management Swap-Space Management coverage only to here Disk Reliability Stable-Storage Implementation Tertiary Storage Devices Operating System Issues Performance Issues
2、,Annotations in Blue by instructor Last updated 5/10/02 = updated 12/10/03,Applied Operating System Concepts,Disk Structure,Disk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer. The 1-dimensional array of logical blocks i
3、s mapped into the sectors of the disk sequentially. Sector 0 is the first sector of the first track on the outermost cylinder. Mapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to innermost.,Applied O
4、perating System Concepts,Disk Scheduling,The operating system is responsible for using hardware efficiently for the disk drives, this means having a fast access time and disk bandwidth. Access time has two major components Seek time is the time for the disk are to move the heads to the cylinder cont
5、aining the desired sector. Rotational latency is the additional time waiting for the disk to rotate the desired sector to the disk head. Minimize seek time Seek time seek distance Disk bandwidth is the total number of bytes transferred, divided by the total time between the first request for service
6、 and the completion of the last transfer.,Applied Operating System Concepts,Disk Scheduling (Cont.),Several algorithms exist to schedule the servicing of disk I/O requests. Definition: a disk request is for data on a per cylinder basis. If a request is for data on two different tracks in the same cy
7、linder, then it would be considered as two requests to the same cylinder. . Analogy to byte references within a page in memory management. We illustrate them with a request queue (0-199) of cylinder references:98, 183, 37, 122, 14, 124, 65, 67Head pointer 53,Applied Operating System Concepts,FCFS,Il
8、lustration shows total head movement of 640 cylinders.,head movement of 640 cylinders,Applied Operating System Concepts,SSTF,Selects the request with the minimum seek time from the current head position. SSTF scheduling is a form of SJF scheduling; may cause starvation of some requests. Illustration
9、 shows total head movement of 236 cylinders.,Applied Operating System Concepts,SSTF (Cont.),head movement of 236 cylinders,Applied Operating System Concepts,SCAN,The disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk,
10、 where the head movement is reversed and servicing continues. Sometimes called the elevator algorithm or bus route algorithm. Illustration shows total head movement of 208 (?) cylinders.,Applied Operating System Concepts,SCAN (Cont.),head movement of 208? cylinders,Applied Operating System Concepts,
11、C-SCAN,Provides a more uniform wait time than SCAN. The head moves from one end of the disk to the other. servicing requests as it goes. When it reaches the other end, however, it immediately returns to the beginning of the disk, without servicing any requests on the return trip. Treats the cylinder
12、s as a circular list that wraps around from the last cylinder to the first one. Perhaps a fast reset of the arm doesnt waste time checking disk regions that just had been serviced,Applied Operating System Concepts,C-SCAN (Cont.),Applied Operating System Concepts,C-LOOK,Version of C-SCAN Arm only goe
13、s as far as the last request in each direction, then reverses direction immediately, without first going all the way to the end of the disk.,Applied Operating System Concepts,C-LOOK (Cont.),Applied Operating System Concepts,Selecting a Disk-Scheduling Algorithm,SSTF is common and has a natural appea
14、l SCAN and C-SCAN perform better for systems that place a heavy load on the disk. Performance depends on the number and types of requests. Requests for disk service can be influenced by the file-allocation method - remember the tradeoffs in the various allocation schemes - see instructors notes: “Co
15、mments on File System Implementation”, and the text. The disk-scheduling algorithm should be written as a separate module of the operating system, allowing it to be replaced with a different algorithm if necessary. Either SSTF or LOOK is a reasonable choice for the default algorithm.,Applied Operati
16、ng System Concepts,Disk Management,Low-level formatting, or physical formatting Dividing a disk into sectors that the disk controller can read and write. How are sectors identified? Sector made up of a data structure: header, data area and a trailer - disk controller/device drivers must be capable o
17、f identifying and interpreting this. To use a disk to hold files, the operating system still needs to record its own data structures on the disk. Partition the disk into one or more groups of cylinders. Logical formatting or “creating a file system”. Includes: maps of free & allocated space (FAT or
18、inodes), & initial empty directory. Boot block initializes system. The bootstrap is stored in ROM. Bootstrap loader program - stored in boot block. Methods such as sector sparing used to handle bad blocks - usually SCSI. DOS based systems identify bad blocks in the FAT,Applied Operating System Conce
19、pts,Swap-Space Management,How is virtual memory implemented or created on a disk? All we have in the beginning are files and ”empty” memory. Swap-space Virtual memory uses disk space as an extension of main memory - this is where the entire virtual memory is mapped and stored. Must have a disk suffi
20、ciently large to handle this address space. Swap space is not necessarily preserve once the machine is re-booted- it generally grows as the system gets used. Swap-space can be carved out of the normal file system,or, more commonly, it can be in a separate disk partition. Swap-space management 4.3BSD
21、 (UNIX version) allocates swap space when process starts; holds text segment (the program) and data segment. In UNIX 4.3BSD, when a process starts, its text is paged in from the file system and then written out to swap-space when necessary, and are read back in from there, so the file system is cons
22、ulted only once for each text page. Kernel uses swap maps to track swap-space use. Solaris 2 allocates swap space only when a page is forced out of physical memory, not when the virtual memory page is first created.,Applied Operating System Concepts,Disk Reliability OMIT remaining slides after this
23、one - end of course!,ECC for reading sectors, CRC checks, . Several improvements in disk-use techniques involve the use of multiple disks working cooperatively. Disk striping uses a group of disks as one storage unit. RAID schemes improve performance and improve the reliability of the storage system
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- MODULE13SECONDARYSTORAGECHAPTER14SILBERSCHATZ6THPPT

链接地址:http://www.mydoc123.com/p-373006.html