Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Notes on Mass-Storage Systems - Operating Systems | CSC 4103, Study notes of Operating Systems

Material Type: Notes; Class: OPERATING SYSTEMS; Subject: Computer Science; University: Louisiana State University; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 08/30/2009

koofers-user-lhs
koofers-user-lhs 🇺🇸

10 documents

1 / 46

Toggle sidebar

Related documents


Partial preview of the text

Download Notes on Mass-Storage Systems - Operating Systems | CSC 4103 and more Study notes Operating Systems in PDF only on Docsity! 12.1 B. B. Karki, LSUCSC 4103: Operating System Mass-Storage Systems Source: Operating System Concepts by Silberschatz, Galvin and Gagne. 12.2 B. B. Karki, LSUCSC 4103: Operating System Topics  Disk Scheduling  Disk Management  RAID Structure  Tertiary Storage Devices 12.5 B. B. Karki, LSUCSC 4103: Operating System Disk Scheduling  OS is responsible for using hardware efficiently  Having a fast access time and disk bandwidth for disk drives  Maximize throughput  Minimize mean response time and variance in response time  Access time has two major components:  Seek time – moving the heads to the cylinder containing the desired sector  Rotational latency - waiting for the disk to rotate the desired sector to the disk head  Rotational speed: Number of revolutions per minute, r  Disk bandwidth:  Total number of bytes transferred, divided by the total time between the first request for service and the completion of the last transfer.  Total access time = seek time + rotational latency + transfer time  Seek and/or rotational optimization based scheduling 12.6 B. B. Karki, LSUCSC 4103: Operating System Disk Scheduling (Cont.)  Several algorithms exist to schedule the servicing of disk I/O requests.  To improve both the access time and bandwidth.  We illustrate them with a request queue (0-199) for I/O blocks on cylinders in the following order. 98, 183, 37, 122, 14, 124, 65, 67 Head pointer 53. 12.7 B. B. Karki, LSUCSC 4103: Operating System FCFS First-come first-serve: Illustration shows total head movement of 640 cylinders. 12.10 B. B. Karki, LSUCSC 4103: Operating System 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, where the head movement is reversed and servicing continues.  Sometimes called the elevator algorithm.  Illustration shows total head movement of 208 cylinders. 12.11 B. B. Karki, LSUCSC 4103: Operating System SCAN (Cont.) 12.12 B. B. Karki, LSUCSC 4103: Operating System 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 cylinders as a circular list that wraps around from the last cylinder to the first one. 12.15 B. B. Karki, LSUCSC 4103: Operating System C-LOOK (Cont.) 12.16 B. B. Karki, LSUCSC 4103: Operating System Other Scheduling Algorithms  Random  Useful for analysis and comparison purpose  Priority-based  Priority by process  LIFO  Last in first out  N-Step-SCAN  SCAN of N records at a time  FSCAN  N-step-SCAN with N = queue size at beginning of SCAN cycle. 12.17 B. B. Karki, LSUCSC 4103: Operating System Selecting a Disk-Scheduling Algorithm  SSTF is common and has a natural appeal.  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. 12.20 B. B. Karki, LSUCSC 4103: Operating System 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 it can be in a separate disk partition.  Swap-space management  4.3 BSD 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. Similar use by Linux. 12.21 B. B. Karki, LSUCSC 4103: Operating System Swap Maps  The data structures for swapping on Linux systems 12.22 B. B. Karki, LSUCSC 4103: Operating System RAID Structure  RAID – redundant arrays of inexpensive (or now independent) disks  Improvement of reliability via redundancy.  Mirroring or shadowing keeps duplicate of each disk.  Improvement in performance via parallelism  Data stripping – bits of each byte or blocks of a file are stripped across multiple disks  Use a group of disks as one storage unit.  RAID schemes improve performance and reliability of the storage system by storing redundant data. 12.25 B. B. Karki, LSUCSC 4103: Operating System Disk Attachment  Disks may be attached one of two ways:  Host attached via a local I/O port  Simple PC bus, SCSI, FC buses  Network attached via a network connection  NFS and CIFS are common protocols  Remote host and distributed files system  Remote-procedure calls (RPCs) 12.26 B. B. Karki, LSUCSC 4103: Operating System Network-Attached Storage 12.27 B. B. Karki, LSUCSC 4103: Operating System Storage-Area Network  Common in large storage environments  Multiple hosts attached to multiple storage arrays - flexible 12.30 B. B. Karki, LSUCSC 4103: Operating System Removable Disks  Floppy disk — thin flexible disk coated with magnetic material, enclosed in a protective plastic case.  Floppies hold about 1 MB.  Removable magnetic disks can hold more than 1 GB and be nearly as fast as hard disks.  Laser heat is used to amplify a large, weak magnetic field to record a bit.  A magneto-optic disk records data on a rigid platter coated with magnetic material.  Laser light is used to read data (Kerr effect).  The head flies far from the disk surface which is covered with a protective layer of plastic or glass.  Optical disks employ special materials that are altered by laser light to have dark and light spots. 12.31 B. B. Karki, LSUCSC 4103: Operating System WORM Disks  WORM (“Write Once, Read Many Times”) disks can be written only once.  To write a bit, the drive uses a laser light to burn a small hole through the aluminum (sandwiched between two glass or plastic platters)  information can be destroyed but not altered.  Very durable and reliable.  Read Only disks, such ad CD-ROM and DVD, come from the factory with the data pre-recorded.  The data on Read-Write disks can be modified over and over. 12.32 B. B. Karki, LSUCSC 4103: Operating System Tapes  Compared to a disk, a tape is less expensive and holds more data, but random access is much slower.  Useful for 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.  Room to improve areal density. 12.35 B. B. Karki, LSUCSC 4103: Operating System File Naming  How to name files on removal media  Difficulty arises the same removable cartridge will be used in different computers.  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. 12.36 B. B. Karki, LSUCSC 4103: Operating System Hierarchical Storage Management (HSM)  A hierarchical storage system extends the storage hierarchy beyond primary memory and secondary storage to incorporate tertiary storage.  Usually implemented as a jukebox of tapes or removable disks.  Usually incorporate tertiary storage by extending the file system.  Small and frequently used files remain on disk.  Large, old, inactive files are archived to the jukebox.  HSM is usually found in supercomputing centers and other large installations that have enormous volumes of data. 12.37 B. B. Karki, LSUCSC 4103: Operating System Performance: 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.  Access latency – amount of time needed to locate data.  Access time for a disk – move the arm to the selected cylinder and wait for the rotational latency; < 35 milliseconds.  Access on tape requires winding the tape reels until the selected block reaches the tape head; tens or hundreds of seconds.  Generally say that random access within a tape cartridge is about a thousand times slower than random access on disk. 12.40 B. B. Karki, LSUCSC 4103: Operating System Price per Megabyte of DRAM, From 1981 to 2004 12.41 B. B. Karki, LSUCSC 4103: Operating System Price per Megabyte of Magnetic Hard Disk, From 1981 to 2004 12.42 B. B. Karki, LSUCSC 4103: Operating System Price per Megabyte of a Tape Drive, From 1984-2004 12.45 B. B. Karki, LSUCSC 4103: Operating System Question 2  From elementary physics, we know that when an object is subjected to a constant acceleration a, the relationship between distance d and time t is given by d = 0.5 at2. Suppose that, during a seek, the disk in the question 1 accelerates the disk arm at a constant rate for the first half of the seek, then decelerates the disk arm at the same rate for the second half of the seek. Assume that the disk can perform a seek to an adjacent cylinder in 1 ms and a full-stroke seek over all 5000 cylinders in 18 ms.  The distance of a seek is the number of cylinders that the head moves. Explain why the seek time is proportional to the square root of the seek distance.  Write an equation for the seek time as a function of the seek distance. The equation should be of the form t = x + y √L, where t is the time in ms and L is the seek distance in cylinders.  Calculate the total seek time for each of the schedules in the question 1. Determine which schedule is the fastest (has the smallest total seek time). 12.46 B. B. Karki, LSUCSC 4103: Operating System Question 3  Suppose that the disk in the question 2 rotates at 7200 RPM.  What is the average rotational latency of this disk drive?  What seek distance can be covered in the time that you found for the first part?
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved