Lecture Notes for Operating Systems

Devices, 13 October 1999


These are provisional lecture notes, expect changes.

  1. objectives

    1. virtual machine - api

    2. performance - multiplexing, buffering, scheduling

  2. block-oriented devices

    1. large chunks of data moved between system and device

    2. operations - open, close, read, write, ioctl, scatter-gather i-o

    3. partitioning

  3. ram disks and other main store drivers

    1. ram disk - a section of main storage treated like a disk

    2. /dev/mem - access to physical main storage

    3. /dev/kmem - access to kernel space

    4. /dev/null - the null device

    5. implementation - straightforward

      1. open - where to create; what size; what name

      2. close - when to delete

      3. read, write - block or character oriented

      4. ioctl - set new sizes, gather statistics

      5. scatter-gather i-o - probably not relevent due to i-o speed

  4. disks

    1. hardware - disks, cylinders, sectors

    2. controllers - handles much of the ugliness

    3. driver software

      1. disk arm scheduling

        1. arm movement expensive; reasonable response time; no starvation

        2. first come first served

        3. shortest next

        4. elevator algorithm

      2. caching - pre-fetch

      3. multiple devices off the driver

      4. error detection and correction - parameters; data errors, transient or permanent, hardware errors


This page last modified on 19 October 1999.