I/O Hardwares. Some typical device, network, and data base rates

Size: px
Start display at page:

Download "I/O Hardwares. Some typical device, network, and data base rates"

Transcription

1 Input/Output 1

2 I/O Hardwares Some typical device, network, and data base rates 2

3 Device Controllers I/O devices have components: mechanical component electronic component The electronic component is the device controller may be able to handle multiple devices Controller's tasks convert serial bit stream to block of bytes perform error correction as necessary 3

4 Device Driver Interface Device Interface Printer Driver Disk Driver Printer Controller Disk Controller Device interface is standard for all the I/O devices and in POSIX compliant systems it consists of Open(), Close(), Read(), Write(), Seek(), and Control() functions. Drivers implement the device interface functions specific to a device 4

5 Device Management Device manager is responsible to provide services to the file manager and application software. It has a device independent infrastructure and a collection of device-dependent drivers 5

6 I/O Strategies I/O with polling I/O with interrupts DMA I/O 6

7 I/O With Polling CPU is responsible for determining if the I/O operation has completed Transferring the data between the main memory and the device controller data registers Steps for performing direct I/O with polling (for read operation) 1. Application process requests a read operation 2. The device driver queries the status register to determine if the device is idle. If the device is busy, the driver waits for it to become idle. 3. The driver stores an input command into the controllers command register, starting the device 4. The driver repeatedly reads the status register while waiting for the device to complete the operation 5. The driver copies the contents of the controller s data registers into the user s process space. 7

8 I/O With Interrupts Polling wastes CPU cycles. Interrupts eliminate the need for the device driver to constantly poll the controller status register Instead of polling, the device controller automatically notifies the device manager when the operation is complete. Device manager should have the following parts The driver part that initiates the operation Device status table Interrupt handler Device handler 8

9 I/O With Interrupts An input operation using interrupts 1. The application process requests a read operation 2. The device driver queries the status register to determine if the device is idle. If the device is busy, the driver waits for the device to become idle 3. The device driver stores an input command into the controllers command register starting the device 4. The device driver saves information regarding the operation that it began in the device status table. This table contains an entry for each device in the system. The information saved is the return address of the original call, and any special parameters for the I/O operation. 5. The device manager invokes the scheduler (so that some other process can use the CPU) and terminates 9

10 I/O With Interrupts 5. When the device completes the operation, it interrupts the CPU, and causes the interrupt handler to run 6. The interrupt handler determines which device caused the interrupt, and branches to the device handler for that device 7. The device handler retrieves the pending I/O status information from the device status table 8. The device handler copies the contents of the controller s data registers into the user process s space 9. The device handler returns control to the application process 10

11 I/O with DMA Used when the hardware has a DMA controller DMA controller has access to the system bus independent of the CPU. Contains several registers that can be written and read by the CPU The control registers specify the I/O port to use, the direction of transfer, and the unit of transfer Memory address register specifies where to write or read Byte count register specifies the amount read or written 11

12 Memory-Mapped I/O (1) Separate I/O and memory space Memory-mapped I/O Hybrid 12

13 Memory-Mapped I/O (2) (a) A single-bus architecture (b) A dual-bus memory architecture 13

14 Interrupts Revisited How interrupts happens. Connections between devices and interrupt controller actually use interrupt lines on the bus rather than dedicated wires 14

15 Disks Disk Hardware (1) Disk parameters for the original IBM PC floppy disk and a Western Digital WD hard disk 15

16 Disk Hardware (2) Physical geometry of a disk with two zones A possible virtual geometry for this disk 16

17 Disk Hardware (5) Recording structure of a CD or CD-ROM 17

18 Disk Hardware (6) Logical data layout on a CD-ROM 18

19 Disk Hardware (7) Cross section of a CD-R disk and laser not to scale Silver CD-ROM has similar structure without dye layer with pitted aluminum layer instead of gold 19

20 Disk Hardware (8) A double sided, dual layer DVD disk 20

21 Disk Formatting (1) A disk sector 21

22 Disk Formatting (2) An illustration of cylinder skew 22

23 Disk Formatting (3) No interleaving Single interleaving Double interleaving 23

24 Disk Arm Scheduling Algorithms (1) Time required to read or write a disk block determined by 3 factors 1. Seek time 2. Rotational delay 3. Actual transfer time Seek time dominates Error checking is done by controllers 24

25 Disk Arm Scheduling Algorithms FCFS: First Come First Served Assume that the initial disk arm position is on cylinder 11 (cylinders are numbered starting from 0) If the new requests are 1, 36, 16, 34, 9, 12 (these are cylinder numbers) Then total of = 111 cylinders will be traversed SSF : Shortest Seek First What is the total number of cylinders traversed for the same requests, 1, 36, 16, 34, 9, 12? The arm motions of SSF is depicted in the next slide 25

26 Disk Arm Scheduling Algorithms (2) Initial position Pending requests Shortest Seek First (SSF) disk scheduling algorithm 26

27 SSF What could be the disadvantage of SSF? Elevator algorithm is proposed to overcome the disadvantages: The direction of the disk arm is important for scheduling decisions Disk arm direction going towards higher cylinder numbers is called UP, and the reverse is called DOWN After the current request was processed the next request that is closest in the direction of the disk arm is processed Assuming the disk arm direction is UP, and the requests are : 1,36,16, 34, 9, 12 then what would be the total number of cylinders traversed? 27

28 Disk Arm Scheduling Algorithms (3) The elevator algorithm for scheduling disk requests 28

29 Error Handling Metal oxide coating The linear recording density has limits (ex 5000bits/mm) High recording density means higher manufacturing errors 29

30 Error Handling Bad sectors result from manufacturing defects ECC can be used to handle a few defected bits Bigger errors can be handled by Controller OS 30

31 Error Handling A disk track with a bad sector Substituting a spare for the bad sector Shifting all the sectors to bypass the bad one 31

32 Error Handling Errors may occur during the normal operation of the disk which may be Transient (dust etc) Can be fixed by the ECC Repeated errors: spare sectors should be used before the sector dies completely 32

33 Error Handling OS can handle bad sectors by re-mapping tables Read the entire disk to construct a list of bad sectors Both allocated and free blocks need to be tested Backup system should also consider bad sectors Seek errors may also occur if the disk head can not be positioned in the right track The disk dead needs to be recalibrated when such an error occurs 33

34 RAID SLED : Single Large Expensive Disk The speed of Mechanic v.s. Electronic components Parallelism in CPU proved to be effective Why not parallelism in I/O? (by Patterson et.al. 1988) RAID (Redundant Array of Inexpensive Disks) Adopted by the industry as Redundant Array of Independent Disks 34

35 RAID RAID is a set of disks with a single RAID controller Its aim is to improve the fault tolerance and performance with a reasonable cost The disks in RAID appear as a single disk to the OS There are six different RAID organizations (0 5) RAID level 0 : Data striping is employed, i.e., the whole disk consists of strips of size k-sectors partitioned into individual disks in round robin fashion There is no redundant data storage in this approach Is this better for requests of larger or smaller chunks of read requests? No performance gain if the requests are one sector at a time! What about reliability? 35

36 36

37 RAID There are six different RAID organizations (0 5) RAID level 1: Data striping is used. It also duplicates all the disks. 37

38 In the above case we have 4 primary disks and 4 backup disks Every strip is written twice! Either of the two copies could be read! 38

39 How do you think the read and write performance is in RAID level 1? Is it fault tolerant? 39

40 How do you think the read and write performance is in RAID level 1? Is it fault tolerant? Write performance is the same Read performance can be twice as good Fault tolerance is excellent Recovery is easy, buy a new drive, and replace it with the one that crashed 40

41 RAID There are six different RAID organizations (0 5) RAID level 2: Works in very small granularity striping with hamming code for error detection and correction. For example a byte is divided into 4bit chunks, and 3 parity bits are added to form a 7 bit word which is partitioned bit by bit to 7 disks. Disk drives must be synchronized for read and write. 41

42 RAID level 2: Works in very small granularity striping with hamming code for error detection and correction. For example a byte is divided into 4bit chunks, and 3 parity bits are added to form a 7 bit word which is partitioned bit by bit to 7 disks. Disk drives must be synchronized for read and write. 42

43 RAID RAID organizations cont d (0 5) RAID level 3 : simplified version of level 2, where only checksum is stored. It can do error detection but not error correction in case there are random bit errors. What would be the effect of a single disk crash? RAID level 4: use data striping. With a strip of k bytes, an extra disk drive stores k-byte long parities constructed by performing an exclusive or on the strips in each disk. RAID level 5: It is like RAID level 4, but parity bits are distributed over the RAID disks to reduce the risk induced by parity disk crash. 43

44 RAID RAID organizations cont d (0 5) RAID level 3 : simplified version of level 2, where only checksum is stored. It can do error detection but not error correction in case there are random bit errors. What would be the effect of a single disk crash? Assume that one of the drives crashes, can we do Error detection Error correction! 44

45 Disk Hardware (4) Raid levels 3 through 5 Backup and parity drives are shaded 45

46 Stable Storage RAID deals with correct reads and fault tolerance against crashes How about writes? Desired Property: When a write is issued, the disk either correctly writes the data or it does nothing at all (Called Stable Storage) 46

47 Stable Storage Following can be handled: A written sector can suddenly become unreadable CPU can fail leading to incorrect data Following can not be handled: Student drops the computer out of the window of a skyscraper Student sets the computer room on fire Natural disasters 47

48 Stable Storage Stable storage uses a pair of identical disks with the corresponding blocks form an error-free block Stable write: Write the block on drive 1 Read it back and verify it, if not correct repeat the operation After n consecutive failures the block is remapped to a spare one and the operation continues After the write to drive 1 succeeds, the corresponding block on drive 2 is written and re-read until it succeeds After the stable write completes, the block is successfully written to both drives 48

49 Stable Storage Stable storage uses a pair of identical disks with the corresponding blocks form an error-free block Stable read: First read from drive 1 If the ECC indicates and error, then reread If after n iterations, the error occurs, then the corresponding block is read from drive 2 Assumption: probability that the same block in both drives will go bad is practically 0 49

50 Crash recovery Stable Storage Scan both disks and compare the corresponding blocks If one of the has ECC error, then the good one is written over the bad one If both have ECC good, but they are different, then the block in drive 1 is overwritten to drive 2. 50

51 Stable Storage Analysis of the influence of crashes on stable writes 51

52 Clock Hardware A programmable clock Generates a CPU interrupt when the counter is 0 These are called clock ticks Can be programmed to occur very 2 nsecs to 8.6 secs Computers also have battery-powered to recover the current time when the computer is turned on Original starting time for windows is 12 AM Jan 1, For Unix, it is 12 AM, Jan

53 Clock drivers job: Maintain time of day Clock Software Prevent processes from running longer than they are allowed to Accounting CPU usage Providing watchdog timers etc 53

54 Clock Software (1) Three ways to maintain the time of day 54

55 Simulating multiple virtual clocks Maintain a table The signal times for all pending timers stored in the table Whenever the time of day is updated, the driver checks to see if the closest signal has occured 55

56 Clock Software (2) Simulating multiple timers with a single clock Pending signals are for 4203, 4207, 4213, 4215,

57 ALS Assume that the initial disk arm position is on cylinder 11 (cylinders are numbered starting from 0) If the new requests are 1, 36, 16, 34, 9, 12 (these are cylinder numbers) Total number of tracks traversed by SSF? Elevator? 57

58 Character Oriented Terminals RS-232 Terminal Hardware An RS-232 terminal communicates with computer 1 bit at a time Called a serial line bits go out in series, 1 bit at a time Windows uses COM1 and COM2 ports, first to serial lines Computer and terminal are completely independent 58

59 Input Software (1) Central buffer pool Dedicated buffer for each terminal 59

60 Input Software (2) Characters handled specially in canonical mode 60

61 Output Software The ANSI escape sequences accepted by terminal driver on output ESC is ASCII character (0x1B) n,m, and s are optional numeric parameters 61

62 Display Hardware (1) Parallel port Memory-mapped displays driver writes directly into display's video RAM 62

63 Display Hardware (2) A video RAM image simple monochrome display character mode Corresponding screen the xs are attribute bytes 63

64 Input Software Keyboard driver delivers a number driver converts to characters uses a ASCII table Exceptions, adaptations needed for other languages many OS provide for loadable keymaps or code pages 64

65 Output Software for Windows (1) Sample window located at (200,100) on XGA display 65

66 Output Software for Windows (2) Skeleton of a Windows main program (part 1) 66

67 Output Software for Windows (3) Skeleton of a Windows main program (part 2) 67

68 Output Software for Windows (4) An example rectangle drawn using Rectangle 68

69 Output Software for Windows (5) Copying bitmaps using BitBlt. before after 69

70 Output Software for Windows (6) Examples of character outlines at different point sizes 70

71 Network Terminals X Windows (1) Clients and servers in the M.I.T. X Window System 71

72 X Windows (2) Skeleton of an X Windows application program 72

73 The SLIM Network Terminal (1) The architecture of the SLIM terminal system 73

74 The SLIM Network Terminal (2) Messages used in the SLIM protocol from the server to the terminals 74

75 Power Management (1) Power consumption of various parts of a laptop computer 75

76 Power management (2) The use of zones for backlighting the display 76

77 Power Management (3) Running at full clock speed Cutting voltage by two cuts clock speed by two, cuts power by four 77

78 Power Management (4) Telling the programs to use less energy may mean poorer user experience Examples change from color output to black and white speech recognition reduces vocabulary less resolution or detail in an image 78

Chap. 3. Input/Output

Chap. 3. Input/Output Chap. 3. Input/Output 17 janvier 07 3.1 Principles of I/O hardware 3.2 Principles of I/O software 3.3 Deadlocks [3.4 Overview of IO in Minix 3] [3.5 Block Devices in Minix 3] [3.6 RAM Disks] 3.7 Disks

More information

I/O Devices. Chapter 5 Input/Output. Memory-Mapped I/O (2) Memory-Mapped I/O (1) Interrupts Revisited. Direct Memory Access (DMA) 11/26/2013

I/O Devices. Chapter 5 Input/Output. Memory-Mapped I/O (2) Memory-Mapped I/O (1) Interrupts Revisited. Direct Memory Access (DMA) 11/26/2013 MODERN OPERATING SYSTEMS I/O Devices Third Edition ANDREW S. TANENBAUM Chapter 5 Input/Output Figure 5-1. Some typical device, network, and bus data rates. Memory-Mapped I/O (1) Memory-Mapped I/O (2) Figure

More information

Chapter 5 Input/Output

Chapter 5 Input/Output Chapter 5 Input/Output 5.1 Principles of I/O hardware 5.2 Principles of I/O software 5.3 I/O software layers 5.4 Disks 5.5 Clocks 5.6 Character-oriented terminals 5.7 Graphical user interfaces 5.8 Network

More information

Input/Output. Chapter 5: I/O Systems. How fast is I/O hardware? Device controllers. Memory-mapped I/O. How is memory-mapped I/O done?

Input/Output. Chapter 5: I/O Systems. How fast is I/O hardware? Device controllers. Memory-mapped I/O. How is memory-mapped I/O done? Input/Output : I/O Systems Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Character-oriented terminals Graphical user interfaces Network terminals Power management

More information

CSE 380 Computer Operating Systems

CSE 380 Computer Operating Systems CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note on Disk I/O 1 I/O Devices Storage devices Floppy, Magnetic disk, Magnetic tape, CD-ROM, DVD User

More information

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara Operating Systems Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ Input and Output Input/Output Devices The OS is responsible for managing I/O devices Issue requests Manage

More information

CS510 Operating System Foundations. Jonathan Walpole

CS510 Operating System Foundations. Jonathan Walpole CS510 Operating System Foundations Jonathan Walpole Disk Technology & Secondary Storage Management Disk Geometry Disk head, surfaces, tracks, sectors Example Disk Characteristics Disk Surface Geometry

More information

OPERATING SYSTEMS CS136

OPERATING SYSTEMS CS136 OPERATING SYSTEMS CS136 Jialiang LU Jialiang.lu@sjtu.edu.cn Based on Lecture Notes of Tanenbaum, Modern Operating Systems 3 e, 1 Chapter 5 INPUT/OUTPUT 2 Overview o OS controls I/O devices => o Issue commands,

More information

CSE380 - Operating Systems. Communicating with Devices

CSE380 - Operating Systems. Communicating with Devices CSE380 - Operating Systems Notes for Lecture 15-11/4/04 Matt Blaze (some examples by Insup Lee) Communicating with Devices Modern architectures support convenient communication with devices memory mapped

More information

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

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College CISC 7310X C11: Mass Storage Hui Chen Department of Computer & Information Science CUNY Brooklyn College 4/19/2018 CUNY Brooklyn College 1 Outline Review of memory hierarchy Mass storage devices Reliability

More information

Lecture 21 Disk Devices and Timers

Lecture 21 Disk Devices and Timers CS 423 Operating Systems Design Lecture 21 Disk Devices and Timers Klara Nahrstedt Fall 2011 Based on slides by YY Zhou and Andrew S. Tanenbaum CS 423 - Fall 2011 Overview Administrative announcements

More information

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware CSE 120 July 27, 2006 Day 8 Input/Output Instructor: Neil Rhodes How hardware works Operating Systems Layer What the kernel does API What the programmer does Overview 2 Kinds Block devices: read/write

More information

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security Input/Output Today Principles of I/O hardware & software I/O software layers Disks Next Protection & Security Operating Systems and I/O Two key operating system goals Control I/O devices Provide a simple,

More information

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices Introduction Operating Systems Input/Output Devices (Ch12.1-12.3, 12.7; 13.1-13.3, 13.7) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple

More information

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

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University I/O, Disks, and RAID Yi Shi Fall 2017 Xi an Jiaotong University Goals for Today Disks How does a computer system permanently store data? RAID How to make storage both efficient and reliable? 2 What does

More information

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

CSCI-GA Operating Systems. I/O : Disk Scheduling and RAID. Hubertus Franke CSCI-GA.2250-001 Operating Systems I/O : Disk Scheduling and RAID Hubertus Franke frankeh@cs.nyu.edu Disks Scheduling Abstracted by OS as files A Conventional Hard Disk (Magnetic) Structure Hard Disk

More information

Chapter 5. Input / Output

Chapter 5. Input / Output Chapter 5 Input / Output 1 The Spectrum of I/O Devices 2 Device Controllers The Device vs. its Controller Some duties of a device controller: Interface between CPU and the Device Start/Stop device activity

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Input/Output Systems part 2 (ch13, ch12) Shudong Chen 1 Recap Discuss the principles of I/O hardware and its complexity Explore the structure of an operating system s I/O subsystem

More information

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. (done)

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. (done) Introduction Operating Systems Input/Output Devices (Ch 13.3, 13.5; 14.1-14.3) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple to use

More information

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

Chapter 13: Mass-Storage Systems. Disk Scheduling. Disk Scheduling (Cont.) Disk Structure FCFS. Moving-Head Disk Mechanism Chapter 13: Mass-Storage Systems Disk Scheduling Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices

More information

Chapter 13: Mass-Storage Systems. Disk Structure

Chapter 13: Mass-Storage Systems. Disk Structure Chapter 13: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices Operating System

More information

Part IV I/O System. Chapter 12: Mass Storage Structure

Part IV I/O System. Chapter 12: Mass Storage Structure Part IV I/O System Chapter 12: Mass Storage Structure Disk Structure Three elements: cylinder, track and sector/block. Three types of latency (i.e., delay) Positional or seek delay mechanical and slowest

More information

Disk Scheduling. Based on the slides supporting the text

Disk Scheduling. Based on the slides supporting the text Disk Scheduling Based on the slides supporting the text 1 User-Space I/O Software Layers of the I/O system and the main functions of each layer 2 Disk Structure Disk drives are addressed as large 1-dimensional

More information

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. One OS function is to control devices Introduction Operating Systems Input/Output Devices (Ch12.1-12.3, 12.7; 13.1-13.3, 13.7) One OS function is to control devices significant fraction of code (80-90% of Linux) Want all devices to be simple

More information

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

Disk scheduling Disk reliability Tertiary storage Swap space management Linux swap space management Lecture Overview Mass storage devices Disk scheduling Disk reliability Tertiary storage Swap space management Linux swap space management Operating Systems - June 28, 2001 Disk Structure Disk drives are

More information

Part IV I/O System Chapter 1 2: 12: Mass S torage Storage Structur Structur Fall 2010

Part IV I/O System Chapter 1 2: 12: Mass S torage Storage Structur Structur Fall 2010 Part IV I/O System Chapter 12: Mass Storage Structure Fall 2010 1 Disk Structure Three elements: cylinder, track and sector/block. Three types of latency (i.e., delay) Positional or seek delay mechanical

More information

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09

I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January WT 2008/09 22 I/O Management (2) I/O Design, I/O Subsystem, I/O-Handler Device Driver, Buffering, Disks, RAID January 28 2009 WT 2008/09 2009 Universität Karlsruhe, System Architecture Group 1 Roadmap Motivation

More information

Chapter 14: Mass-Storage Systems

Chapter 14: Mass-Storage Systems Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices Operating System

More information

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

Disk Scheduling. Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001 Disk Scheduling Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001 1 User-Space I/O Software Layers of the I/O system and the main functions of each layer 2 Disks

More information

Tape pictures. CSE 30341: Operating Systems Principles

Tape pictures. CSE 30341: Operating Systems Principles Tape pictures 4/11/07 CSE 30341: Operating Systems Principles page 1 Tape Drives The basic operations for a tape drive differ from those of a disk drive. locate positions the tape to a specific logical

More information

CSE380 - Operating Systems

CSE380 - Operating Systems CSE380 - Operating Systems Notes for Lecture 17-11/10/05 Matt Blaze, Micah Sherr (some examples by Insup Lee) Implementing File Systems We ve looked at the user view of file systems names, directory structure,

More information

Module 13: Secondary-Storage

Module 13: Secondary-Storage Module 13: Secondary-Storage Disk Structure Disk Scheduling Disk Management Swap-Space Management Disk Reliability Stable-Storage Implementation Tertiary Storage Devices Operating System Issues Performance

More information

Chapter 11. I/O Management and Disk Scheduling

Chapter 11. I/O Management and Disk Scheduling Operating System Chapter 11. I/O Management and Disk Scheduling Lynn Choi School of Electrical Engineering Categories of I/O Devices I/O devices can be grouped into 3 categories Human readable devices

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall 1 2 Differences

More information

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel Chapter-6 SUBJECT:- Operating System TOPICS:- I/O Management Created by : - Sanjay Patel Disk Scheduling Algorithm 1) First-In-First-Out (FIFO) 2) Shortest Service Time First (SSTF) 3) SCAN 4) Circular-SCAN

More information

Mass-Storage Structure

Mass-Storage Structure CS 4410 Operating Systems Mass-Storage Structure Summer 2011 Cornell University 1 Today How is data saved in the hard disk? Magnetic disk Disk speed parameters Disk Scheduling RAID Structure 2 Secondary

More information

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

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006 November 21, 2006 The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds MBs to GBs expandable Disk milliseconds

More information

Operating Systems. V. Input / Output

Operating Systems. V. Input / Output Operating Systems V. Input / Output Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Devices of a Computer System Applications OS CPU Memory

More information

2. Which of the following resources is not one which can result in deadlocking processes? a. a disk file b. a semaphore c. the central processor (CPU)

2. Which of the following resources is not one which can result in deadlocking processes? a. a disk file b. a semaphore c. the central processor (CPU) CSCI 4500 / 8506 Sample Questions for Quiz 4 Covers Modules 7 and 8 1. Deadlock occurs when each process in a set of processes a. is taking a very long time to complete. b. is waiting for an event (or

More information

CSE 120. Operating Systems. March 27, 2014 Lecture 17. Mass Storage. Instructor: Neil Rhodes. Wednesday, March 26, 14

CSE 120. Operating Systems. March 27, 2014 Lecture 17. Mass Storage. Instructor: Neil Rhodes. Wednesday, March 26, 14 CSE 120 Operating Systems March 27, 2014 Lecture 17 Mass Storage Instructor: Neil Rhodes Paging and Translation Lookaside Buffer frame dirty? no yes CPU checks TLB PTE in TLB? Free page frame? no yes OS

More information

Module 13: Secondary-Storage Structure

Module 13: Secondary-Storage Structure Module 13: Secondary-Storage Structure Disk Structure Disk Scheduling Disk Management Swap-Space Management Disk Reliability Stable-Storage Implementation Operating System Concepts 13.1 Silberschatz and

More information

UNIT 4 Device Management

UNIT 4 Device Management UNIT 4 Device Management (A) Device Function. (B) Device Characteristic. (C) Disk space Management. (D) Allocation and Disk scheduling Methods. [4.1] Device Management Functions The management of I/O devices

More information

Chapter 14: Mass-Storage Systems. Disk Structure

Chapter 14: Mass-Storage Systems. Disk Structure 1 Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space Management RAID Structure Disk Attachment Stable-Storage Implementation Tertiary Storage Devices Operating System

More information

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

Ref: Chap 12. Secondary Storage and I/O Systems. Applied Operating System Concepts 12.1 Ref: Chap 12 Secondary Storage and I/O Systems Applied Operating System Concepts 12.1 Part 1 - Secondary Storage Secondary storage typically: is anything that is outside of primary memory does not permit

More information

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

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011 CSE325 Principles of Operating Systems Mass-Storage Systems David P. Duggan dduggan@sandia.gov April 19, 2011 Outline Storage Devices Disk Scheduling FCFS SSTF SCAN, C-SCAN LOOK, C-LOOK Redundant Arrays

More information

Operating Systems, Fall

Operating Systems, Fall Input / Output & Real-time Scheduling Chapter 5.1 5.4, Chapter 7.5 1 I/O Software Device controllers Memory-mapped mapped I/O DMA & interrupts briefly I/O Content I/O software layers and drivers Disks

More information

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

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne 2013 Objectives To describe the physical structure of secondary storage devices and its effects on the uses of the devices To explain the

More information

Chapter 5 Input/Output. I/O Devices

Chapter 5 Input/Output. I/O Devices Chapter 5 Input/Output 5.1 Principles of I/O hardware 5.2 Principles of I/O software 5.3 I/O software layers 5.4 Disks 5.5 Clocks 5.6 Character-oriented terminals 5.7 Graphical user interfaces 5.8 Network

More information

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems COP 4610: Introduction to Operating Systems (Spring 2016) Chapter 10: Mass-Storage Systems Zhi Wang Florida State University Content Overview of Mass Storage Structure Disk Structure Disk Scheduling Disk

More information

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13 I/O Handling ECE 650 Systems Programming & Engineering Duke University, Spring 2018 Based on Operating Systems Concepts, Silberschatz Chapter 13 Input/Output (I/O) Typical application flow consists of

More information

V. Mass Storage Systems

V. Mass Storage Systems TDIU25: Operating Systems V. Mass Storage Systems SGG9: chapter 12 o Mass storage: Hard disks, structure, scheduling, RAID Copyright Notice: The lecture notes are mainly based on modifications of the slides

More information

Chapter 9: Peripheral Devices: Magnetic Disks

Chapter 9: Peripheral Devices: Magnetic Disks Chapter 9: Peripheral Devices: Magnetic Disks Basic Disk Operation Performance Parameters and History of Improvement Example disks RAID (Redundant Arrays of Inexpensive Disks) Improving Reliability Improving

More information

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

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne 2013 Chapter 10: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management Swap-Space

More information

Silberschatz, et al. Topics based on Chapter 13

Silberschatz, et al. Topics based on Chapter 13 Silberschatz, et al. Topics based on Chapter 13 Mass Storage Structure CPSC 410--Richard Furuta 3/23/00 1 Mass Storage Topics Secondary storage structure Disk Structure Disk Scheduling Disk Management

More information

CSCI-GA Database Systems Lecture 8: Physical Schema: Storage

CSCI-GA Database Systems Lecture 8: Physical Schema: Storage CSCI-GA.2433-001 Database Systems Lecture 8: Physical Schema: Storage Mohamed Zahran (aka Z) mzahran@cs.nyu.edu http://www.mzahran.com View 1 View 2 View 3 Conceptual Schema Physical Schema 1. Create a

More information

A track on a magnetic disk is a concentric rings where data is stored.

A track on a magnetic disk is a concentric rings where data is stored. CS 320 Ch 6 External Memory Figure 6.1 shows a typical read/ head on a magnetic disk system. Read and heads separate. Read head uses a material that changes resistance in response to a magnetic field.

More information

Input/Output. Today. Next. ! Principles of I/O hardware & software! I/O software layers! Secondary storage. ! File systems

Input/Output. Today. Next. ! Principles of I/O hardware & software! I/O software layers! Secondary storage. ! File systems Input/Output Today! Principles of I/O hardware & software! I/O software layers! Secondary storage Next! File systems Operating systems and I/O! Two key operating system goals Control I/O devices Provide

More information

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102 Semiconductor Memory Types Microprocessor Design & Organisation HCA2102 Internal & External Memory Semiconductor Memory RAM Misnamed as all semiconductor memory is random access Read/Write Volatile Temporary

More information

I/O CANNOT BE IGNORED

I/O CANNOT BE IGNORED LECTURE 13 I/O I/O CANNOT BE IGNORED Assume a program requires 100 seconds, 90 seconds for main memory, 10 seconds for I/O. Assume main memory access improves by ~10% per year and I/O remains the same.

More information

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne 2013 Chapter 10: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management Swap-Space

More information

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review Administrivia CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Homework #4 due Thursday answers posted soon after Exam #2 on Thursday, April 24 on memory hierarchy (Unit 4) and

More information

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

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition, Chapter 12: Mass-Storage Systems, Silberschatz, Galvin and Gagne 2009 Chapter 12: Mass-Storage Systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management

More information

Input/Output Systems Prof. James L. Frankel Harvard University

Input/Output Systems Prof. James L. Frankel Harvard University Input/Output Systems Prof. James L. Frankel Harvard University Version of 5:20 PM 28-Feb-2017 Copyright 2017, 2015 James L. Frankel. All rights reserved. I/O Overview Different kinds of devices Mass storage

More information

I/O Management and Disk Scheduling. Chapter 11

I/O Management and Disk Scheduling. Chapter 11 I/O Management and Disk Scheduling Chapter 11 Categories of I/O Devices Human readable used to communicate with the user video display terminals keyboard mouse printer Categories of I/O Devices Machine

More information

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

Chapter 7: Mass-storage structure & I/O systems. Operating System Concepts 8 th Edition, Chapter 7: Mass-storage structure & I/O systems, Silberschatz, Galvin and Gagne 2009 Mass-storage structure & I/O systems Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling

More information

I/O CANNOT BE IGNORED

I/O CANNOT BE IGNORED LECTURE 13 I/O I/O CANNOT BE IGNORED Assume a program requires 100 seconds, 90 seconds for main memory, 10 seconds for I/O. Assume main memory access improves by ~10% per year and I/O remains the same.

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 9: Mass Storage Structure Prof. Alan Mislove (amislove@ccs.neu.edu) Moving-head Disk Mechanism 2 Overview of Mass Storage Structure Magnetic

More information

Chapter 5 - Input / Output

Chapter 5 - Input / Output Chapter 5 - Input / Output Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 5 - Input / Output 1 / 90 1 Motivation 2 Principle of I/O Hardware I/O Devices Device Controllers Memory-Mapped

More information

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

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File File File System Implementation Operating Systems Hebrew University Spring 2007 Sequence of bytes, with no structure as far as the operating system is concerned. The only operations are to read and write

More information

CS370 Operating Systems

CS370 Operating Systems CS370 Operating Systems Colorado State University Yashwant K Malaiya Spring 2018 Lecture 24 Mass Storage, HDFS/Hadoop Slides based on Text by Silberschatz, Galvin, Gagne Various sources 1 1 FAQ What 2

More information

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

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University l Chapter 10: File System l Chapter 11: Implementing File-Systems l Chapter 12: Mass-Storage

More information

UNIT-7. Overview of Mass Storage Structure

UNIT-7. Overview of Mass Storage Structure Overview of Mass Storage Structure UNIT-7 Magnetic disks provide bulk of secondary storage of modern computers Drives rotate at 60 to 200 times per second Transfer rate is rate at which data flow between

More information

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Secondary storage. File systems

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Secondary storage. File systems Input/Output Today Principles of I/O hardware & software I/O software layers Secondary storage Next File systems Operating systems and I/O Two key OS goals Control I/O devices Provide a simple, easy-to-use,

More information

Department of Computer Science and Engineering UNIT-V MEMORY SYSTEM MEMORY AND I/O SYSTEMS 1.Give the classification of the Optical Media Optical media can be classified as CD-ROM Compact Disk Read Only

More information

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems Chapter 10: Mass-Storage Systems Silberschatz, Galvin and Gagne Overview of Mass Storage Structure Magnetic disks provide bulk of secondary storage of modern computers Drives rotate at 60 to 200 times

More information

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Computer Organization and Structure. Bing-Yu Chen National Taiwan University Computer Organization and Structure Bing-Yu Chen National Taiwan University Storage and Other I/O Topics I/O Performance Measures Types and Characteristics of I/O Devices Buses Interfacing I/O Devices

More information

Storage Systems. Storage Systems

Storage Systems. Storage Systems Storage Systems Storage Systems We already know about four levels of storage: Registers Cache Memory Disk But we've been a little vague on how these devices are interconnected In this unit, we study Input/output

More information

I/O SYSTEMS. Sunu Wibirama

I/O SYSTEMS. Sunu Wibirama I/O SYSTEMS Sunu Wibirama Are you surely IT class member? Then you should know these pictures... Introduction Main job of computer : I/O and processing (the latter is rarely happened) Browsing: read and

More information

Major Device Number specifies the device class, floppy disk, hard disk, terminal (selects device driver)

Major Device Number specifies the device class, floppy disk, hard disk, terminal (selects device driver) Disk I/O Major/Minor Device Numbers All special files have a major device number and a minor device number. Major Device Number specifies the device class, floppy disk, hard disk, terminal (selects device

More information

Chapter 11: File System Implementation. Objectives

Chapter 11: File System Implementation. Objectives Chapter 11: File System Implementation Objectives To describe the details of implementing local file systems and directory structures To describe the implementation of remote file systems To discuss block

More information

Storage Devices for Database Systems

Storage Devices for Database Systems Storage Devices for Database Systems 5DV120 Database System Principles Umeå University Department of Computing Science Stephen J. Hegner hegner@cs.umu.se http://www.cs.umu.se/~hegner Storage Devices for

More information

Input Output (IO) Management

Input Output (IO) Management Input Output (IO) Management Prof. P.C.P. Bhatt P.C.P Bhatt OS/M5/V1/2004 1 Introduction Humans interact with machines by providing information through IO devices. Manyon-line services are availed through

More information

Storage. Hwansoo Han

Storage. Hwansoo Han Storage Hwansoo Han I/O Devices I/O devices can be characterized by Behavior: input, out, storage Partner: human or machine Data rate: bytes/sec, transfers/sec I/O bus connections 2 I/O System Characteristics

More information

Lecture 23: Storage Systems. Topics: disk access, bus design, evaluation metrics, RAID (Sections )

Lecture 23: Storage Systems. Topics: disk access, bus design, evaluation metrics, RAID (Sections ) Lecture 23: Storage Systems Topics: disk access, bus design, evaluation metrics, RAID (Sections 7.1-7.9) 1 Role of I/O Activities external to the CPU are typically orders of magnitude slower Example: while

More information

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 6 External Memory

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 6 External Memory William Stallings Computer Organization and Architecture 8 th Edition Chapter 6 External Memory Types of External Memory Magnetic Disk RAID Removable Optical CD-ROM CD-Recordable (CD-R) CD-R/W DVD Magnetic

More information

RAID (Redundant Array of Inexpensive Disks)

RAID (Redundant Array of Inexpensive Disks) Magnetic Disk Characteristics I/O Connection Structure Types of Buses Cache & I/O I/O Performance Metrics I/O System Modeling Using Queuing Theory Designing an I/O System RAID (Redundant Array of Inexpensive

More information

I/O Systems and Storage Devices

I/O Systems and Storage Devices CSC 256/456: Operating Systems I/O Systems and Storage Devices John Criswell! University of Rochester 1 I/O Device Controllers I/O devices have both mechanical component & electronic component! The electronic

More information

Chapter 6 Storage and Other I/O Topics

Chapter 6 Storage and Other I/O Topics Department of Electr rical Eng ineering, Chapter 6 Storage and Other I/O Topics 王振傑 (Chen-Chieh Wang) ccwang@mail.ee.ncku.edu.tw ncku edu Feng-Chia Unive ersity Outline 6.1 Introduction 6.2 Dependability,

More information

Chapter 6 - External Memory

Chapter 6 - External Memory Chapter 6 - External Memory Luis Tarrataca luis.tarrataca@gmail.com CEFET-RJ L. Tarrataca Chapter 6 - External Memory 1 / 66 Table of Contents I 1 Motivation 2 Magnetic Disks Write Mechanism Read Mechanism

More information

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 6 Supporting Hard Drives

A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e. Chapter 6 Supporting Hard Drives A+ Guide to Hardware: Managing, Maintaining, and Troubleshooting, 5e Chapter 6 Supporting Hard Drives Objectives Learn about the technologies used inside a hard drive and how data is organized on the drive

More information

Physical Storage Media

Physical Storage Media Physical Storage Media These slides are a modified version of the slides of the book Database System Concepts, 5th Ed., McGraw-Hill, by Silberschatz, Korth and Sudarshan. Original slides are available

More information

William Stallings Computer Organization and Architecture 6 th Edition. Chapter 6 External Memory

William Stallings Computer Organization and Architecture 6 th Edition. Chapter 6 External Memory William Stallings Computer Organization and Architecture 6 th Edition Chapter 6 External Memory Types of External Memory Magnetic Disk RAID Removable Optical CD-ROM CD-Recordable (CD-R) CD-R/W DVD Magnetic

More information

Magnetic Disk. Optical. Magnetic Tape. RAID Removable. CD-ROM CD-Recordable (CD-R) CD-R/W DVD

Magnetic Disk. Optical. Magnetic Tape. RAID Removable. CD-ROM CD-Recordable (CD-R) CD-R/W DVD External Memory Magnetic Disk RAID Removable Optical CD-ROM CD-Recordable (CD-R) CD-R/W DVD Magnetic Tape Disk substrate coated with magnetizable material (iron oxide rust) Substrate used to be aluminium

More information

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

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 I/O Device Controllers I/O Systems CS 256/456 Dept. of Computer Science, University of Rochester 10/20/2010 CSC 2/456 1 I/O devices have both mechanical component & electronic component The electronic

More information

u Covered: l Management of CPU & concurrency l Management of main memory & virtual memory u Currently --- Management of I/O devices

u Covered: l Management of CPU & concurrency l Management of main memory & virtual memory u Currently --- Management of I/O devices Where Are We? COS 318: Operating Systems Storage Devices Jaswinder Pal Singh Computer Science Department Princeton University (http://www.cs.princeton.edu/courses/cos318/) u Covered: l Management of CPU

More information

Storage. CS 3410 Computer System Organization & Programming

Storage. CS 3410 Computer System Organization & Programming Storage CS 3410 Computer System Organization & Programming These slides are the product of many rounds of teaching CS 3410 by Deniz Altinbuke, Kevin Walsh, and Professors Weatherspoon, Bala, Bracy, and

More information

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access File File System Implementation Operating Systems Hebrew University Spring 2009 Sequence of bytes, with no structure as far as the operating system is concerned. The only operations are to read and write

More information

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage Chapter 12: Mass-Storage Systems Chapter 12: Mass-Storage Systems Revised 2010. Tao Yang Overview of Mass Storage Structure Disk Structure Disk Attachment Disk Scheduling Disk Management Swap-Space Management

More information

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili Virtual Memory Lecture notes from MKP and S. Yalamanchili Sections 5.4, 5.5, 5.6, 5.8, 5.10 Reading (2) 1 The Memory Hierarchy ALU registers Cache Memory Memory Memory Managed by the compiler Memory Managed

More information

Computer System Architecture

Computer System Architecture CSC 203 1.5 Computer System Architecture Department of Statistics and Computer Science University of Sri Jayewardenepura Secondary Memory 2 Technologies Magnetic storage Floppy, Zip disk, Hard drives,

More information