IO Systems: Understanding Disk Behavior, Management, and Interfaces, Slides of Computer Science

An in-depth exploration of io systems, focusing on mass storage, disk characteristics, scheduling, and attachment. Topics include disk formatting, bad blocks, swap space management, disk attachment through i/o ports and buses, and reliability techniques such as mirroring and raid. Learn about various levels of raid, disk striping, and the role of polling, interrupts, and dma in io communication.

Typology: Slides

2012/2013

Uploaded on 03/28/2013

ekana
ekana ๐Ÿ‡ฎ๐Ÿ‡ณ

4

(44)

370 documents

1 / 25

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
12: IO Systems 1
OPERATING SYSTEMS
IO SYSTEMS
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19

Partial preview of the text

Download IO Systems: Understanding Disk Behavior, Management, and Interfaces and more Slides Computer Science in PDF only on Docsity!

12: IO Systems 1

OPERATING SYSTEMS

IO SYSTEMS

12: IO Systems 2

IO SYSTEMS

This material covers Silberschatz Chapters 12 and 13.

Mass Storage - hardware

This is about Disk Behavior and Management.

  • Disk Characteristics
  • Space Management
  • RAID
  • Disk Attachment

IO Interface โ€“ how the OS interfaces to the hardware

The busses in the computer and how the O.S. interfaces to it.

  • Talking to the IO โ€“ Polling, Interrupts and DMA
  • Application IO Interface
  • Kernel IO Subsystem

12: IO Systems 4

Disk Scheduling

The components making up disk service time include:

time = setup + seek + rotation time + transfer + wrap-up

The methods discussed below try to optimize seek time but make no attempt to account for the total time. The ideal method would optimize the total time and many controllers are now able to accomplish this.

Mass-Storage Structure

12: IO Systems 5

Disk

Management

Disk formatting Creates a logical disk from the raw disk. Includes setting aside chunks of the disk for booting, bad blocks, etc. Also provides information needed by the driver to understand its positioning.

Boot block That location on the disk that is accessed when trying to boot the operating system. It's a well-known location that contains the code that understands how to get at the operating system

  • generally this code has a rudimentary knowledge of the file system.

Bad blocks The driver knows how to compensate for a bad block on the disk. It does this by putting a pointer, at the location of the bad block, indicating where a good copy of the data can be found.

Swap Space Management The Operating System requires a contiguous space where it knows that disk blocks have been reserved for paging. This space is needed because a program can't be given unshared memory unless there's a backing store location for that memory.

Mass-Storage Structure

12: IO Systems 7

Disk

Attachment

Network-attached storage

  • Network-attached storage ( NAS ) is storage made available over a network rather than over a local connection (such as a bus)
  • NFS and CIFS are common protocols
  • Implemented via remote procedure calls (RPCs) between host and storage
  • New iSCSI protocol uses IP network to carry the SCSI protocol

Mass-Storage Structure

12: IO Systems 8

Disk

Attachment

Storage-Area Network

  • Common in large storage environments (and becoming more common)
  • Multiple hosts attached to multiple storage arrays - flexible

Mass-Storage Structure

12: IO Systems 10

RAID

These are the various levels of RAID.

The reliability increases with higher levels.

In practice, only levels 0, 1, 5 and 10 are typically used.

  • Several improvements in disk-use techniques involve the use of multiple disks working cooperatively.
  • Disk striping uses a group of disks as one storage unit.
  • RAID schemes improve performance and improve the reliability of the storage system by storing redundant data. - Mirroring or shadowing keeps duplicate of each disk. - Block interleaved parity uses much less redundancy.

Mass-Storage Structure

12: IO Systems 11

RAID

RAID 10 becoming more and

more popular.

Mass-Storage Structure

12: IO Systems 13

IO Hardware

  • Incredible variety of I/O devices
  • Common concepts
    • Port
    • Bus ( daisy chain or shared direct access)
    • Controller ( host adapter )
  • I/O instructions control devices
  • Devices have addresses, used by - Direct I/O instructions - Memory-mapped I/O

IO SYSTEMS

12: IO Systems 14

IO Hardware

Memory Mapped IO:

Works by associating a memory address with a device and a function on that device.

IO SYSTEMS

12: IO Systems 16

Polling and Interrupts

When you get an interrupt, you need to be able to figure out the device that gave you the interrupt.

These are the interrupt vectors for an Intel Processor.

Notice that most of these are actually exceptions.

IO SYSTEMS

12: IO Systems 17

Synchronous or

Asynchronous

Synchronous does the whole job โ€“ all at one time โ€“ data is obtained from the device by the processor.

Asynchronous has the device and the processor acting in time independent of each other.

IO SYSTEMS

12: IO Systems 19

Streams

  • STREAM โ€“ a full-duplex communication channel between a user-level process and a device in Unix System V and beyond
  • A STREAM consists of:
    • STREAM head interfaces
    • driver end interfaces with the device
    • zero or more STREAM modules between them.
  • Each module contains a read queue and a write queue
  • Message passing is used to communicate between queues

IO SYSTEMS

12: IO Systems 20

Interfaces

Block and Character Devices

  • Typical for disks โ€“ use read(), write(), seek() sequence.

Network Devices

Clocks and Timers

  • The OS uses an incredible number of clock calls โ€“ many events are timestamped within the OS

Blocking and Non-Blocking IO

  • Non- Blocking: Some devices are started by the OS, and then proceed on without further OS intervention. The delay timer in our project works this way.
  • Blocking: Any Read-Device will be blocking since the program canโ€™t proceed until it gets the information it wanted from the device.

IO SYSTEMS