General information

Input / Output

This session is dedicated to the support of Operating Systems for Input / Output management.

You don't have to submit source files or reports for this sessions. For this session, you will need to log into a PC running Linux. If you are at Eurecom, simply log on a PC of rooms 52 or 53.

I. Basics of Input/Ouput

  1. Open the slides on Input / Output

  2. Watch the video on the introduction to I/O

  3. Can you cite two devices of computer systems that are not given in the slides?

  4. Can you cite two sensors and two actuators of smart objects that are not given in the slides?
  5. (Help me!) A sensor is an input device connected to the microcontroller of an embedded system. An actuator is an output device of an embedded system.
    Example of sensors: lidar, camera, button, temprature sensor, ...
    Example of actuators: engine, speaker.

II. I/O from a hardware point of view

  1. Open the slides on Input / Output

  2. Watch the video on I/O from a hardware point of view

  3. Polling v.s Interrupts. Do you have any idea of devices for which polling would be preferable, and devices for which interrupts are preferable?
  4. (Help me!) Polling is better when the operation time of a device is known and quite short.
    If you consider for instance a scanner progressively scanning a page, the driver could use polling because it knows how much time it takes to scan a line (and it is probably quite quick for one given line).
    For a device working with interrupts, think of a device that you use all the time and for which the computer cannot predict when you are going to use it...

  5. In the figure on the DMA, what is meant by "CPU"?
  6. (Help me!) It is the Operating System programming the DMA!

  7. Fill the table of slide 16. To find the answers, communicate between each other and use internet.
  8. (Help me on data-transfer mode!) Character: keyboards, mice
    Block: disks, CDs

    (Help me on access method!) Sequential: keyboards, scanners, printers
    Random: disks, tapes (even if a random access to tapes is very slow)

    (Help me on transfer schedule!) Synchronous: scanners, clocks
    Asynchronous: keyboards, mice, disks, network interfaces

    (Help me on sharing!) Dedicated: mice, keyboards, printers are typical devices dedicated to one process.
    Shareable: disks, network interfaces

    (Help me on device speed!) Latency: disk latency, CD latency (physical latency), airbags, ....
    Transfer rate: modems (more generally: network interfaces), disks, CDs, mice, ...
    Delay between operations: scanners, printers, ...

    (Help me on I/O direction !) Read only: mice, keyboards, microphones, scanners, sensitive displays, ...
    Write only: printers, vibrators, LEDs, ...
    Read and Write: disks, usb keys, most network interfaces, ...

III. I/O from a software point of view

  1. Open the slides Input / Output

  2. Watch the video on I/O from a software point of view

  3. Could you explain with your own words why you need to eject a USB key before removing it from your computer?

IV. Example of a complex I/O management

  1. Open the slides Input / Output

  2. Watch the video on I/O Example: disks

  3. Fill the table of slide 26. Also, find a storage device that you commonly use, and find its characteristics (capacity, etc.).

  4. Maybe you have been surprised to find "tapes" among the list. Actually, they have very interesting features, e.g. for backups. Read the following paper on Why the Future of Data Storage is (Still) Magnetic Tape. From this paper, you may better know about the access time to a file. Yet, what is the capacity improvement law that tapes follow? Also, what usages are mentionned for tapes? What is the expected capacity for tapes in the incoming years?

  5. Figure out the head movement for the SSTF I/O request scheduling policy. Do verify that the total amount of movement is 236

  6. What is the total movement of the head for SCAN, C-SCAN and C-LOOK?

V. I/O management in Linux

  1. Open the slides Input / Output

  2. Watch the video on how I/O are managed in Linux

  3. How many devices are listed in /dev in your GNU/Linux computer? Then, identify at least 5 different ones.
  4. (Help me!)
    $ cd /dev/
    $ ls -al|wc -l

VI. Discovery of Android

At the end of this session, and also at the end of the next session, you have to work on the discovery of the Android Operating system: kernel management, handling of processes, I/O, etc.