IO Management and Disk Scheduling - PowerPoint PPT Presentation

About This Presentation
Title:

IO Management and Disk Scheduling

Description:

IO devices. Device Characteristics. IO Design Objectives. A model of IO Organization ... Hardware characteristics underlying IO devices are abstracted for presenting ... – PowerPoint PPT presentation

Number of Views:43
Avg rating:3.0/5.0
Slides: 22
Provided by: kumarm8
Learn more at: https://cse.buffalo.edu
Category:

less

Transcript and Presenter's Notes

Title: IO Management and Disk Scheduling


1
IO Management and Disk Scheduling
  • B. Ramamurthy

2
Introduction
  • In addition to primary memory (volatile),
    computer systems provide users secondary storage
    units which may be used for persistent (or
    permanent) storage.
  • A file is a collection of data elements grouped
    together for the purposes of access control,
    retrieval and modification.
  • A file system together with IO management
    subsystem accomplish the mapping of abstract user
    interface into the actual collection of hardware
    such as disk, tape etc. of varying
    characteristics.
  • Recently there has been lot of interest in a
    storage medium called RAID. We will look into
    this (11.6)
  • We will study IO management in this discussion
    (Ch.11) and File system in the next chapter (Ch.
    12)

3
Topics for discussion
  • IO devices
  • Device Characteristics
  • IO Design Objectives
  • A model of IO Organization
  • Buffering
  • Disk IO
  • Disk scheduling
  • Disk cache
  • RAID storage
  • Summary

4
IO Devices
  • IO devices can be grouped into three categories
  • Human readable Suitable for use with computer
    user. Example video display terminals, keyboard,
    mouse and printers.
  • Machines readable Example disks, tapes,
    sensors, controllers.
  • Communication Suitable for communicating with
    remote devices Drivers, modems, sockets, etc.

5
Device Characteristics
  • Devices vary widely in characteristics such as
    Data rate, applications, complexity of control,
    unit of transfer, data representation, Error
    conditions.
  • Programmed IO , Interrupt-driven IO and
    Direct-memory access are three techniques for
    performing IO.

6
IO Design Objectives
  • Efficiency IO operations often form the
    bottleneck in a computing system.
  • Generality Handle all devices in a uniform
    manner. How?
  • Use hierarchical, modular approach to design of
    IO subsystem.
  • This approach hides most of the details of device
    details in lower-levels so that processes and
    upper levels of OS see devices in terms of
    general functions such as Read, Write, Open,
    Lock, UnLock etc.

7
A Model of IO Organization
User Processes
User Processes
User Processes
Dir. Mgt.
Comm. Arch.
Logical IO
File System
Physical Org.
Device IO
Sched. Control
Hardware
Local Peripheral Device
Comm Port
File System
8
Buffering
  • In order to avoid inefficiencies associated with
    direct transfer from user-process to IO device,
    buffering schemes can be used.
  • Buffering smoothes out the peaks in IO demand.
  • Buffering depends on the type of IO device
    Block-oriented (Ex disks) and Stream-oriented
    (terminal, comm. ports).
  • Stream-oriented IO single buffering
  • Block-oriented Devices double buffer, circular
    buffer

9
Disk IO
  • A disk contains a stack of recording surfaces
    each surface with a movable read/write head.
  • Each surface has circular tracks and each track
    divided into sectors. A stack of tracks make up a
    cylinder.
  • To read or write, the head must be positioned at
    the desired track and at the beginning of the
    desired sector.

10
Disk IO
  • Seek Time (Ts) is the time it takes to position
    the head at the desired track.
  • Rotational Delay (Tr) is the time it takes to to
    line up the head at the beginning of the desired
    sector.
  • Access Time (Ta ) Ts Tr
  • The data transfer time (Tt) is the time to
    read/write data at the desired position.

11
Disk Scheduling
  • Among the times Seek time is the most critical.
    Average access time can be improved by reducing
    the average Seek Time.
  • Assumption A queue of requests for each IO
    device is maintained. At any time a number of
    requests from various processes are in the queue.
    Consider a sequence of n-requests for scheduling.
  • Example Tracks 55, 58, 39, 18, 90, 160, 150, 38
  • Using FIFO, SSTF, SCAN, C-SCAN. Table 11.3,
    Fig.11.7

12
Disk Cache
  • A disk cache is a buffer in main memory for disk
    sectors.
  • Cache contains a copy of the some of the sectors
    on the disk.
  • When a IO request is made for a particular
    sector, if the data is available on disk cache it
    is taken. Otherwise it can be brought into the
    cache from the disk.
  • Similar to virtual memory principles. Directory
    blocks are good candidates for caching.

13
Redundant Array of Independent Disks (RAID)
  • Is a set of disk drives viewed by operating
    system as a single logical device.
  • Data are distributed across the physical drives
    of an array.
  • Redundant disk capacity is used to store parity
    information, which guarantees data recoverability
    in case of disk failure.
  • Raid levels 0 to 7

14
RAID Levels
  • RAID 0 - striping
  • RAID 1 - Mirrored
  • RAID 2 - Error correcting using Hamming code
  • RAID 3 - bit-interleaved parity
  • RAID 4 - Block-interleaved parity (independent
    access)
  • RAID 5 - Block-interleaved parity (independent
    access)
  • RAID 6 - P Q redundancy
  • RAID 7 - heterogeneous devices

15
RAID (contd.)
  • Unique contribution of the RAID is to address the
    need for redundancy.
  • Principle redundancy compensate for reduced
    reliability
  • Even though use of multiple heads and actuators
    result in higher transfer rates, they also
    introduce higher probability of failure.
  • To compensate for this decreased reliability,
    RAID makes use of stored parity information to
    recover data lost due to disk failure.

16
RAID 1
  • RAID 0 data is striped across many disks
    similar to interleaved memory.
  • Not actually RAID.
  • No redundancy but high transfer rate due to
    organization.
  • RAID 1 redundancy is achieved by simple
    duplicating.
  • Read can be performed by either disk which ever
    has lower seek and rotational time.
  • Write can be performed simultaneous on the two
    disks.
  • Recovery from failures is simple use the
    surviving disk.

17
RAID 2
  • RAID 2 - RAID 5 have some kind of parity.
  • RAID 2
  • striping
  • Hamming error correcting code
  • 4 data disks , 3 Hamming code disks
  • Effective in environment which are error prone.

18
RAID 3
  • Similar to RAID but only one single redundant
    disk.
  • Single redundant disk contains the parity info of
    the bits across the four disks.
  • Single disk failure can be tolerated with
    slightly lower transfer rate until the failed
    disk is replaced.

19
RAID 4 and 5
  • Independently accessible.
  • Strip parity (text calls it block parity).
  • Large strips.
  • In RAID 4 parity is stored on a single disk, and
    in RAID 5 parity is distributed over disks.

20
RAID 6 and RAID 7
  • RAID 6 real fault tolerance hardware included.
    Significantly more expensive than RAID 5.
  • RAID 7 using distributed and heterogenous
    sources of data.

21
Summary
  • Look at exercises 11.1, 11.2, 11.7, 11.8
  • Hardware characteristics underlying IO devices
    are abstracted for presenting easier-to-use and
    uniform logical interface to the processes.
  • Performance improvement is another important
    objective which is achieved through buffering
    schemes and scheduling algorithms.
Write a Comment
User Comments (0)
About PowerShow.com