CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

Similar documents
CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition,

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

Overview of Mass Storage Structure

EIDE, ATA, SATA, USB,

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Free Space Management

CS420: Operating Systems. Mass Storage Structure

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

V. Mass Storage Systems

Chapter 10: Mass-Storage Systems

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

CS3600 SYSTEMS AND NETWORKS

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

CS370 Operating Systems

Chapter 12: Mass-Storage

Mass-Storage Systems. Mass-Storage Systems. Disk Attachment. Disk Attachment

Module 13: Secondary-Storage Structure

Disk Scheduling. Based on the slides supporting the text

Chapter 14: Mass-Storage Systems. Disk Structure

Mass-Storage Structure

Mass-Storage Systems

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

I/O Systems and Storage Devices

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall

Frequently asked questions from the previous class survey

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

Disc Allocation and Disc Arm Scheduling?

Silberschatz, et al. Topics based on Chapter 13

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Frequently asked questions from the previous class survey

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

Access time based on initial head position in disk scheduling

Disk Scheduling. Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001

Frequently asked questions from the previous class survey

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

Frequently asked questions from the previous class survey

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Chapter 13: Mass-Storage Systems. Disk Scheduling. Disk Scheduling (Cont.) Disk Structure FCFS. Moving-Head Disk Mechanism

Chapter 13: Mass-Storage Systems. Disk Structure

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

Chapter 12: Mass-Storage Systems

CS370 Operating Systems

Chapter 10: Mass-Storage Systems

CS370: Operating Systems [Spring 2016] Dept. Of Computer Science, Colorado State University

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

Frequently asked questions from the previous class survey

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

Principles of Operating Systems CS 446/646

Disk Scheduling COMPSCI 386

Chapter 14: Mass-Storage Systems

Outline. Operating Systems: Devices and I/O p. 1/18

CS370: Operating Systems [Spring 2016] Dept. Of Computer Science, Colorado State University

Module 13: Secondary-Storage

MASS-STORAGE STRUCTURE

A Disk Head Scheduling Simulator

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition

Chapter 11: Mass-Storage Systems

Frequently asked questions from the previous class survey

Frequently asked questions from the previous class survey

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

Frequently asked questions from the previous class survey

CSE 4/521 Introduction to Operating Systems. Lecture 27 (Final Exam Review) Summer 2018

Frequently asked questions from the previous class survey

Mass-Storage Structure

Lecture 9. I/O Management and Disk Scheduling Algorithms

Lecture 16: Storage Devices

Mass-Storage. ICS332 - Fall 2017 Operating Systems. Henri Casanova

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File

CSCI-GA Operating Systems. I/O : Disk Scheduling and RAID. Hubertus Franke

Frequently asked questions from the previous class survey

Disk scheduling Disk reliability Tertiary storage Swap space management Linux swap space management

Chapter 12: Mass-Storage Systems. Operating System Concepts 9 th Edition

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University

CHAPTER 12 AND 13 - MASS-STORAGE STRUCTURE & I/O- SYSTEMS

CSE 451: Operating Systems Winter Lecture 12 Secondary Storage. Steve Gribble 323B Sieg Hall.

Operating Systems. Operating Systems Professor Sina Meraji U of T

Operating Systems. V. Input / Output. Eurecom

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CS370 Operating Systems

Chapter 7: Mass-storage structure & I/O systems. Operating System Concepts 8 th Edition,

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1

Chapter 5: Input Output Management. Slides by: Ms. Shree Jaswal

MODULE 4. FILE SYSTEM AND SECONDARY STORAGE

Secondary Storage Management Rab Nawaz Jadoon

CSE 451: Operating Systems Winter Secondary Storage. Steve Gribble. Secondary storage

Transcription:

CS 370: SYSTEM ARCHITECTURE & SOFTWARE [DISK SCHEDULING ALGORITHMS] Frequently asked questions from the previous class survey Shrideep Pallickara Computer Science Colorado State University L30.1 L30.2 Topics covered in this lecture Swap space management Disk scheduling algorithms SWAP SPACE MANAGEMENT L30.3 L30.4 Virtual memory uses the disk space as an extension of main memory Using swap space decreases system performance Main objective of swap space Provide best possible throughput for the virtual memory system Swap space location Carved out of the normal file system Navigating directory and allocation data structures n Time consuming n Could result in additional disk accesses Use a raw partition Separate swap-space manager (De)allocate blocks from the raw partition L30.5 L30.6 SLIDES CREATED BY: SHRIDEEP PALLICKARA L30.1

Using the raw partition Swap space accessed more frequently than the file system Algorithms are optimized for speed not efficiency Internal fragmentation may be higher BUT swap space data have shorter life spans n Acceptable trade-off MASS STORAGE STRUCTURE L30.7 L30.8 Disk drives are attached to the computer by a set of wires called an I/O bus Enhanced integrated drive electronics (EIDE) Advanced technology attachment (ATA) Serial ATA (SATA) Universal serial bus (USB) Small computer systems interface (SCSI) Disk controllers are built into each disk drive Computer places a command using memory mapped I/O ports Disk controller operates the disk hardware to perform command L30.9 L30.10 Magnetic tape Early secondary-storage medium Slow access times Moving to correct spot on tape is time consuming 1000 times slower than magnetic disk for random access Mainly for backup Disk Structure One dimensional array of blocks Mapped onto sectors of the disk Sector 0 1 st sector of 1 st track on outermost cylinder Mapping proceeds from the outermost cylinders to the innermost one L30.11 L30.12 SLIDES CREATED BY: SHRIDEEP PALLICKARA L30.2

Can we map logical block to physical disk address {cylinder, track, sector} Disks have defective sectors Manufacturers hide this by substituting spare sectors from elsewhere on disk Number of sectors per track Not constant in some drives Rotation speed and density of disks Density of bits is uniform Outer tracks have greater length n More sectors = greater capacity Drive increases rotation speed as it moves from inner track to outer ones n Constant linear velocity Disk rotation can stay constant Density of bits decreases from inner tracks to outer ones L30.13 L30.14 Disk scheduling: Objectives DISK SCHEDULING ALGORITHMS Fast access times Seek time n Move disk arm to the right cylinder Rotational latency n Rotate to the desired sector Disk bandwidth Transfer rates L30.15 L30.16 Disk scheduling: Premise With many processes, there are many pending disk I/O requests Improve access time and bandwidth By managing the order in which disk I/O requests are serviced Disk I/O request string We consider requests to I/O blocks on cylinders Initial head position: 53 Number of cylinders: 200 n 0-199 L30.17 L30.18 SLIDES CREATED BY: SHRIDEEP PALLICKARA L30.3

First Come Fist Served Scheduling Plotting the disk head movement: FCFS Process these requests in the order they arrive Wild swings 183 à 37, 122 à 14 Total head movement is way too high In our example: 640 14 ß 122 37 ß 183 L30.19 L30.20 Shortest-Seek-Time-First (SSTF) targets disk head movement Plotting the disk head movement: SSTF Select request with the lowest seek time Service requests closest to current disk head position Initially at 53 Series1 {65, 67, 37, 14, 98, 122, 124, 183} Total head movement= 236 cylinders L30.21 L30.22 Contrasting disk head movements in FCFS and SSTF FIFO SSTF SSTF This is a form of shortest-job-first Can cause starvation in some requests Not optimal SSTF: {65, 67, 37, 14, 98, 122, 124, 183} n Total head movement: 236 cylinders We can do better n Could have done: {53, 37, 14, 65, 67, 98, 122, 124, 183} n Total head movement: 208 cylinders L30.23 L30.24 SLIDES CREATED BY: SHRIDEEP PALLICKARA L30.4

Start at one end of disk & move to the other end Servicing requests Reverse directions at the other end Also called elevator algorithm SCAN SCHEDULING AND VARIANTS L30.25 L30.26 Before applying the algorithm to our schedule We need to know The disk head s current position Direction of the head movement Initially at 53 Disk arm is moving towards 0 53 {14, 37, 65, 67, 98, 122, 124, 183} Plot of the disk head movement in 0 20 40 60 80 100 120 140 L30.27 L30.28 When requests have been serviced From one end to other Plot of the disk head movement in C- { 53, 65, 67, 98, 122, 124, 183, 199, 0, 14, 37 } When the disk head reaches one end Heaviest density of requests is at the other end The requests have also waited the longest n Go there first? 0 50 100 150 200 250 L30.29 L30.30 SLIDES CREATED BY: SHRIDEEP PALLICKARA L30.5

LOOK scheduling is a variant of C- Arm goes only as far as the final request Reverse direction Without going all the way to the end Plot of the disk head movement in LOOK scheduling { 53, 65, 67, 98, 122, 124, 183, 199, 0, 14, 37 } L30.31 L30.32 Selection of disk scheduling algorithms Depends on number and types of requests If there is always just one outstanding request n All algorithms behave the same way Requests for disk service influenced by fileallocation method Location of directories and index blocks OS has other constraints on the order in which these requests are serviced Demand paging has priority over application I/O If cache is running out of free pages Writes are more important than reads Order a set of disk writes To make file system more robust to system crashes L30.33 L30.34 The contents of this slide-set are based on the following references Andrew S Tanenbaum. Modern Operating Systems. 4 th Edition, 2014. Prentice Hall. ISBN: 013359162X/ 978-0133591620 Avi Silberschatz, Peter Galvin, Greg Gagne. Operating Systems Concepts, 9 th edition. John Wiley & Sons, Inc. ISBN-13: 978-1118063330. [Chapter 1] Kay Robbins & Steve Robbins. Unix Systems Programming, 2nd edition, Prentice Hall ISBN-13: 978-0-13-042411-2. [Chapter 1] L30.35 SLIDES CREATED BY: SHRIDEEP PALLICKARA L30.6