Computer Operating System - Lecture 14: Mass-storage systems - Nguyen Thanh Son

Disk Structure
 Disk Scheduling
 Disk Management
 Swap-Space Management
 RAID Structure
 Disk Attachment
 Stable-Storage Implementation
 Tertiary Storage Devices
 Operating System Issues
 Performance Issues 
pdf 42 trang xuanthi 30/12/2022 840
Bạn đang xem 20 trang mẫu của tài liệu "Computer Operating System - Lecture 14: Mass-storage systems - Nguyen Thanh Son", để tải tài liệu gốc về máy hãy click vào nút Download ở trên.

File đính kèm:

  • pdfcomputer_operating_system_lecture_14_mass_storage_systems_ng.pdf

Nội dung text: Computer Operating System - Lecture 14: Mass-storage systems - Nguyen Thanh Son

  1. Chapter’s Content  Disk Structure  Disk Scheduling  Disk Management  Swap-Space Management  RAID Structure  Disk Attachment  Stable-Storage Implementation  Tertiary Storage Devices  Operating System Issues BK  Performance Issues TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 2
  2. 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 containing 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 and the completion of the last transfer. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 4
  3. FCFS Illustration shows total head movement of 640 cylinders. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 6
  4. SSTF (Cont.) BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 8
  5. SCAN (Cont.) BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 10
  6. C-SCAN (Cont.) BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 12
  7. C-LOOK (Cont.) BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 14
  8. Disk Management  Low-level formatting, or physical formatting — Dividing a disk into sectors that the disk controller can read and write.  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 ―making a file system‖.  Boot block initializes system.  The bootstrap is stored in ROM.  Bootstrap loader program.  Methods such as sector sparing used to handle bad blocks. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 16
  9. Swap-Space Management  Swap-space — Virtual memory uses disk space as an extension of main memory.  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 allocates swap space when process starts; holds text segment (the program) and data segment.  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. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 18
  10. 4.3 BSD Data-Segment Swap Map BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 20
  11. RAID Levels BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 22
  12. Disk Attachment  Disks may be attached one of two ways: 1. Host attached via an I/O port 2. Network attached via a network connection BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 24
  13. Tertiary Storage Devices  Low cost is the defining characteristic of tertiary storage.  Generally, tertiary storage is built using removable media  Common examples of removable media are floppy disks and CD-ROMs; other types are available. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 26
  14. Removable Disks (Cont.)  A magneto-optic disk records data on a rigid platter coated with magnetic material.  Laser heat is used to amplify a large, weak magnetic field to record a bit.  Laser light is also used to read data (Kerr effect).  The magneto-optic head flies much farther from the disk surface than a magnetic disk head, and the magnetic material is covered with a protective layer of plastic or glass; resistant to head crashes.  Optical disks do not use magnetism; they employ special materials that are altered by laser light. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 28
  15. Tapes  Compared to a disk, a tape is less expensive and holds more data, but random access is much slower.  Tape is an economical medium for purposes that do not require fast random access, e.g., backup copies of disk data, holding huge volumes of data.  Large tape installations typically use robotic tape changers that move tapes between tape drives and storage slots in a tape library.  stacker – library that holds a few tapes  silo – library that holds thousands of tapes  A disk-resident file can be archived to tape for low cost storage; the computer can stage it back into disk storage for active use. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 30
  16. Application Interface  Most OSs handle removable disks almost exactly like fixed disks — a new cartridge is formatted and an empty file system is generated on the disk.  Tapes are presented as a raw storage medium, i.e., and application does not not open a file on the tape, it opens the whole tape drive as a raw device.  Usually the tape drive is reserved for the exclusive use of that application.  Since the OS does not provide file system services, the application must decide how to use the array of blocks.  Since every application makes up its own rules for how to organize a tape, a tape full of data can generally only be used by the program that created it. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 32
  17. File Naming  The issue of naming files on removable media is especially difficult when we want to write data on a removable cartridge on one computer, and then use the cartridge in another computer.  Contemporary OSs generally leave the name space problem unsolved for removable media, and depend on applications and users to figure out how to access and interpret the data.  Some kinds of removable media (e.g., CDs) are so well standardized that all computers use them the same way. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 34
  18. Speed  Two aspects of speed in tertiary storage are bandwidth and latency.  Bandwidth is measured in bytes per second.  Sustained bandwidth – average data rate during a large transfer; # of bytes/transfer time. Data rate when the data stream is actually flowing.  Effective bandwidth – average over the entire I/O time, including seek or locate, and cartridge switching. Drive’s overall data rate. BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 36
  19. Reliability  A fixed disk drive is likely to be more reliable than a removable disk or tape drive.  An optical cartridge is likely to be more reliable than a magnetic disk or tape.  A head crash in a fixed hard disk generally destroys the data, whereas the failure of a tape drive or optical disk drive often leaves the data cartridge BK unharmed. TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 38
  20. Price per Megabyte of DRAM, From 1981 to 2000 BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 40
  21. Price per Megabyte of a Tape Drive, From 1984-2000 BK TP.HCM 07-Feb-17 Faculty of Computer Science & Engineering 42