I/O
Important Charecteristics of I/O devices
- Behavior: Input (read once), Output (write only), Storage (can be
reread and rewritten)
- Partner: Human or Machine
- Data Rate: The peak rate at which data can be transferred between
the I/O device and the main memory or processor.
Disks
Disks consist of a collection of platters, each of which has two
surfaces. Each surface is divided into a number of tracks (500 to
2000) and each track into a number of sectors (usually 512 bytes).
Reading something from a disk involves positioning the magnetic head
over the appropriate track and waiting for the appropriate sector to
rotate under the head. Disk latencies are fairly high. Positioning
the head (seeking) takes between 10 and 20 msec, while rotational
latency is between 5 and 8 msec.
Networks
Networks are the major medium used to communicate between computers.
Networks can span any distance, from small local area networks (i.e
ethernet), to wide area networks (i.e. internet). Communication over
a network can be seen at multiple layers starting from the raw wire,
all the way to what the application sees. ISO has standardized a set
of layers that are built on top of the raw wire abstraction and
facilitate the way we think (and implement) network communication.
There are 7 layers:
- Physical Layer: This is the layer that deals with bits. Design
issues involve how many volts to use to represent an 1, how many
microseconds a bit occupies, etc.
- Data Link Layer: This is the layer that puts bits together into
more meaningful chunks (frames). It needs to recognize the beginning
and end of frames and implement error correction and control flow.
- Network Layer: This is the layer responsible for routing, adding
header information to packets, congestion control, and accounting.
- Transport Layer: This is the layer that splits larger messages
into packets, can multiplex a single connection over multiple lines,
or single line over multiple connections. It is also the first layer
that implements true end-to-end communication. It does not need to
know about the intermediate hops a message will take.
- Session Layer: Essentially the user-interface layer. Implements
authentication (binding), higher level functionality.
- Presentation Layer: Built on top of the session layer (sometimes
they can be combined) it implements functionality that may be commonly
needed. For example encryption, compression etc.
- Application Layer: Implementats application-specific
functionality. For example which messages the application should
accept, what to do with them etc.
Important Network Characteristics
Important Network Characteristics include the degree (maximum number
of connection to any node), the diameter (the maximum number of nodes
a message need to traverse before it reaches its destination), and the
bisection bandwidth. Bisection bandwidth is the amount of data that
can go through a cut in the network. That is if we divide the network
in two parts at what rate can these two parts communicate.
Buses
Buses are used to connect multiple devices cheaply. Buses consist of
a set of lines for address, another set for data, and another set for
control. Buses can be synchronous or asynchronous. Synchronous buses
expect operations to take a fixed amount of time, while asynchronous
buses go through a handshaking protocol to determine when operations
start and when they end. When a device needs access to a bus it needs
to arbitrate with other (possibly competing devices). Arbitration can
be done in a number of ways. The simplest is to use a central
arbiter. Arbitration by collision detection is a particularly
interesting variation since it does not require any specialized
hardware. In this scheme each device requests the bus and monitors
the bus to make sure it is the only one requesting it. If it detects
a collision it then backs off for a random amount of time. The scheme
is used on Ethernet based networks.