Slides



Outline

Homework (By Wed Sep 10th): Read handout. Read textbook section 3.4.



Token Ring

Each host has two point-to-point connections (to its neighbors); the topology of the whole is a ring. Shared access is achieved by using a token protocol


Notes:


Draw a token ring. Talk about using graphs to describe networks.



Token Passing

On receipt of a token:

If the token has a packet:
  if we are the packet's destination:
    read, forward token and packet
  if this host is the packet's source:
    forward the token
else (the token has no packet)
  if we have a packet to send:
    forward the token with our packet
  else (no packet to send):
    forward the token



Token Ring Properties



FDDI



FDDI Frames

Frame format: SOF (1), control (1), destination address (6), source address (6), data (1-4478), CRC (4), EOF (1), status (3).

Control field records synchronous/asynchronous, using 16/48 bit addresses, and 6 bits of demultiplexing.

Status field records whether the frame was correctly received.

What is the maximum size of a complete FDDI Frame? What is the minimum size?



Choosing a LAN

Usually, you go with what's already there or with what you can afford.

If you have a choice:



Network Devices

The network interface moves bytes to and from the network.

The bus interface moves bytes to and from the bus (very simple in the case of programmed I/O, more complex in the case of Direct Memory Access/DMA).

The controller interrupts the host, interprets commands in the control register, sets the status bits, and may do other functions such as computing the CRC.

Internal buffering may be used to hold data.



Device Driver

The simplest device drivers have 2 parts: the lower half runs at interrupt time, the upper half is invoked by the main part of the operating system (e.g. the write system call).

The main challenges of writing device drivers are:

In addition, writing a network device driver often involves optimizing for performance.



Device Driver:
Upper Half

Generally, semaphores can be used to keep track of available buffers.



Device Driver:
Lower Half

In the x-kernel, if we are called on a receive interrupt, we create a thread to handle the data.