Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Disk & disk scheduling.

Slides:



Advertisements
Similar presentations
Disk Storage SystemsCSCE430/830 Disk Storage Systems CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu (U. Maine) Fall,
Advertisements

Overview of Mass Storage Structure
I/O Management and Disk Scheduling
Mass Storage Systems. Readings r Chapter , 12.7.
Disk Scheduling Based on the slides supporting the text 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Disks and Files Vivek Pai Princeton University. 2 Gedankenagain What is one-millionth of the coast-to-coast distance of the US? Does anything in the physical.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
File System Implementation
Disk Drivers May 10, 2000 Instructor: Gary Kimura.
Mass-Storage Structure
Based on the slides supporting the text
File System Internals Sunny Gleason COM S 414 November 29, 2001.
Disks.
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
04/21/2004CSCI 315 Operating Systems Design1 Disk Scheduling.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised Tao Yang.
CMPT 300: Operating Systems I
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Disk and I/O Management
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY URL:
Device Management. So far… We have covered CPU and memory management Computing is not interesting without I/Os Device management: the OS component that.
1 Recitation 8 Disk & File System. 2 Disk Scheduling Disks are at least four orders of magnitude slower than main memory –The performance of disk I/O.
Topic: Disks – file system devices. Rotational Media Sector Track Cylinder Head Platter Arm Access time = seek time + rotational delay + transfer time.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
Operating Systems CMPSC 473 I/O Management (4) December 09, Lecture 25 Instructor: Bhuvan Urgaonkar.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13+14: I/O Systems and Mass- Storage Structure I/O Hardware Application I/O.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 12: Mass-Storage Systems Overview of Mass.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 12: Mass-Storage.
Disks and Storage Systems
1Fall 2008, Chapter 12 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O and Disk Scheduling CS Spring Overview Review of I/O Techniques I/O Buffering Disk Geometry Disk Scheduling Algorithms RAID.
Chapter 12: Mass-Storage Systems
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
1.  Disk Structure Disk Structure  Disk Scheduling Disk Scheduling  FCFS FCFS  SSTF SSTF  SCAN SCAN  C-SCAN C-SCAN  C-LOOK C-LOOK  Selecting a.
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 13 Mass-Storage Systems Slide 1 Chapter 13 Mass-Storage Systems.
Device Management Mark Stanovich Operating Systems COP 4610.
CS399 New Beginnings Jonathan Walpole. Disk Technology & Secondary Storage Management.
Disk Average Seek Time. Multi-platter Disk platter Disk read/write arm read/write head.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
1 Chapter 13 Mass-Storage Structure. 2 Disk Structure Disk drives are addressed as large 1- dimensional arrays of logical blocks, where the logical block.
M ASS S TORAGE S TRUCTURES Lecture: Operating System Concepts Lecturer: Pooja Sharma Computer Science Department, Punjabi University, Patiala.
Presentation-4 Group-A1 Professor Mohamed Khalil Anita Kanuganti Hemanth Rao.
Device Management Andy Wang Operating Systems COP 4610 / CGS 5765.
Operating System Concepts with Java – 7 th Edition, Nov 15, 2006 Silberschatz, Galvin and Gagne ©2007 Chapter 11: File System Implementation.
Operating System (013022) Dr. H. Iwidat
Sarah Diesburg Operating Systems CS 3430
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Operating System I/O System Monday, August 11, 2008.
Disk Scheduling Algorithms
Mass-Storage Structure
DISK SCHEDULING FCFS SSTF SCAN/ELEVATOR C-SCAN C-LOOK.
Lecture 45 Syed Mansoor Sarwar
Chapter 12: Mass-Storage Systems
Secondary Storage Management Brian Bershad
Chapter 11 I/O Management and Disk Scheduling
Disks and Storage Systems
Disks and Disk Scheduling
Secondary Storage Management Hank Levy
CS333 Intro to Operating Systems
Mass-Storage Systems (Disk Scheduling)
Andy Wang Operating Systems COP 4610 / CGS 5765
Presentation transcript:

Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Disk & disk scheduling

Copyright ©: Nahrstedt, Angrave, Abdelzaher 2 The set of all the tracks in the same relative position on the platter is referred to as a cylinder Detailed view of a disk

Copyright ©: Nahrstedt, Angrave, Abdelzaher 3 Detailed view of a disk

Copyright ©: Nahrstedt, Angrave, Abdelzaher 4 Detailed view of a disk The sectors and tracks are mapped to a large 1-dimensional array of logical blocks The sector is the smallest data unit that can be transferred from/to disk and is equivalent to a data block For example, block 0 is the first sector of the first track on the outermost (or innermost) cylinder. In UNIX filesystem, size of a block is typically 512 or 1024 bytes.

Copyright ©: Nahrstedt, Angrave, Abdelzaher 5 Disk scheduling Avg rotation time = ½ revolution time Transfer time = size(bytes)/transfer speed(bytes/sec)

Copyright ©: Nahrstedt, Angrave, Abdelzaher 6 Disk Performance Factor: Seeking Seeking: position the head to the desired cylinder Roughly takes 2-5ms Seeking speed depends on: The power available for the pivot motor: halving the seek time requires quadrupling the power The arm’s stiffness: accelerations of 30-40g are required to achieve good seek times, and a too flexible arm can twist and bring the head into contact with the platter surface. A seek is composed of A speedup, a coast, a slowdown, a settle For very short seeks, the settle time dominates (1-3ms)

Copyright ©: Nahrstedt, Angrave, Abdelzaher 7 Disk Performance: Other Factors Rotational delay Wait for a sector to rotate underneath the heads Typically 8.3 − 6.0 ms (7,200 – 10,000RPM) or ½ rotation takes ms Transfer bytes Average transfer bandwidth (15-37 Mbytes/sec) Performance of transferring 1 Kbytes block Seek (assume is 5 ms) + half rotational delay (assume is 3ms) + transfer (assume is 0.04 ms) Total time is 8.04ms or 124 Kbytes/sec!

Copyright ©: Nahrstedt, Angrave, Abdelzaher 8 Disk Performance Quiz: what block size can get 90% of the disk transfer bandwidth?

Copyright ©: Nahrstedt, Angrave, Abdelzaher 9 Disk Performance Quiz: what block size can get 90% of the disk transfer bandwidth? Answer: the transfer time of 1 block should experience 10% overhead (where overhead = seek delay + half rotational delay); hence, if x is the unknown transfer time of 1 block, it follows that overhead / (x + overhead) =.1  x=9*overhead According to the data given in this slide, x = 72 msec; hence, the block size should be 72/.04=1800Kbytes ~ 1.8 Mbytes

Copyright ©: Nahrstedt, Angrave, Abdelzaher 10 Disk Behaviors There are more sectors on outer tracks than inner tracks Read outer tracks: 37.4MB/sec Read inner tracks: 22MB/sec Seek time and rotational latency dominates the cost of small reads A lot of small disk transfers waste bandwidth

Copyright ©: Nahrstedt, Angrave, Abdelzaher 11 Disk scheduling Which disk request is serviced first? FCFS Shortest seek time first SCAN C-SCAN (Circular SCAN)

Copyright ©: Nahrstedt, Angrave, Abdelzaher 12 FIFO (FCFS) order Method First come first serve Pros Fairness among requests In the order applications expect Cons Arrival may be on random spots on the disk (long seeks) Wild swings can happen

Copyright ©: Nahrstedt, Angrave, Abdelzaher 13 SSTF (Shortest Seek Time First) Method Pick the one closest on disk Pros Try to minimize seek time Cons Starvation

Copyright ©: Nahrstedt, Angrave, Abdelzaher 14 SCAN algorithm Move head from side to side serving all requests on the way Requests that arrived too late while scanning in one direction will be served on reverse direction

Copyright ©: Nahrstedt, Angrave, Abdelzaher 15 SCAN algorithm Method Take the closest request in the direction of travel Pros Bounded time for each request Cons Request at the other end will take a while

Copyright ©: Nahrstedt, Angrave, Abdelzaher 16 C-SCAN (Circular SCAN) Move head from side to side serving all requests on ONE way only Requests that arrived too late for one scan will be served on the next

Copyright ©: Nahrstedt, Angrave, Abdelzaher 17 C-SCAN (Circular SCAN) Method Like SCAN But, wrap around Pros Uniform service time Cons Do nothing on the return

Copyright ©: Nahrstedt, Angrave, Abdelzaher 18 Layout of a disk partition Boot block The first block in partition Executable: loads OS Followed by file system Super block Free space management File index data (i-nodes) Root dir Files and directories

Copyright ©: Nahrstedt, Angrave, Abdelzaher 19 A typical file system layout Inode table: In the EXT2 file system, the inode is the basic building block; Every file and directory in the file system is described by one and only one inode. The EXT2 inodes are kept in the inode table.

Copyright ©: Nahrstedt, Angrave, Abdelzaher 20 The EXT2 Superblock The Superblock contains a description of the basic size and shape of the file system. Among other information it holds the: Magic Number: to check that this is indeed an EXT2 file system Revision Level: The major and minor revision levels Mount Count and Maximum Mount Count Block Size: for example 1024 bytes Free Blocks: number of free blocks in the file system, Free Inodes: number of free Inodes in the file system, First Inode: inode number of the first inode in the file system (in an EXT2 would be the entry for the '/' directory.

Copyright ©: Nahrstedt, Angrave, Abdelzaher 21 Free space management Block allocation bitmap: This is used during block allocation and deallocation Inode allocation bitmap: This is used during inode allocation and deallocation. It allows the system to keep track of allocated and unallocated inodes. Bitmaps for free blocks and inodes Each bit represents one block/inode Overhead is size of bitmap

Copyright ©: Nahrstedt, Angrave, Abdelzaher 22 Mounting a file system Multiple file system trees can be mounted together Mount procedure OS is given the name of the device and the location within the file structure at which to attach the file system (called ‘mount point’ ) OS verifies that the device contains a valid file system (ask device driver to read the device directory and verify that the directory has the expected format) OS notes in its directory structure that a file system is mounted at the specified mount point

Copyright ©: Nahrstedt, Angrave, Abdelzaher 23 Examples of mounted file systems Mounting point /dev/sda3 /dev/sda6 /dev/sda2 Multiple file system trees on different machines can be mounted together by using network file system (NFS)

Copyright ©: Nahrstedt, Angrave, Abdelzaher 24 Logical view: Mounted File System Allows # files on system to grow for ever File system must be mounted before it can be available to processes on the system: The OS is given the name of the device, and the location within the file structure at which to attach the files system (mount point) A file system is contained in a partition. A disk can have many partitions.