Buses & I/O

What is a bus

It is a connection that allows for data to be passed around a computer

What is bus skew

When data on data lines travels at different speeds, due to a high clock speed

What is a bridge

It is a device that connects two or more LANs

Types of buses

Draw and describe the following

Single bus
  • Has one bus for the whole device

Configurations

  • interrupt
  • Master / Slave
  • Arbitrated

Hierarchical Buses
  • In the real world we tend to use multiple buses
  • They are used in a hierarchical structure
  • Reduces conflict
  • Controllers and Bridges control the buses
Modern Buses
  • Made up of a north and south gate
North gate

Connects the CPU to high speed devices like RAM and external cache, even the GPU

South gate

Connects the CPU to slower devices like Secondary storage, I/O devices

Characteristics of buses

What is bus width?

How many bits can be sent in one go along a bus

Name a limitation with the following

Address line

Limits the amount of data the CPU can address

solution

Have a bigger bus

problem

costly

Data line

Limits the amount of data that the CPU can receive

solution

Increase clock speed

problem

Increased clock speed can lead to data skew

How do you solve these limitations?

Have a multiplexed bus

Draw a standard bus model vs a multiplexed bus model

Draw a master and slave network diagram
What is the control line
  • Single directional
  • Sends acknowledgements and requests
  • What type of data
What is the data & address lines
  • data addresses and complex comands are sent on this line
  • bidirectional
What does a bus transaction consist of?
  1. Master sends out a command with a address
  1. Slave with either store or send data

define the following

Synchronous bus
  • Control line needed for clock speed
  • Data transfer relative to clock speed
  • Fixed communication protocol
Asynchronous bus
  • Un-clocked
  • Additional control lines allow for handshaking protocol needed for synchronisation

What is bus arbitration

This is were multiple devices are trying to used the bus at the same time

What should a bus arbitration scheme attempt to balance

Fairness

Priority

Name all the arbitration scheme classes

https://www.ques10.com/p/8753/what-is-bus-arbitration-explain-any-two-techniqu-3/

Daisy chain arbitration

Device that is closest to the central bus arbitrator, has priority

Centralised / parallal arbitration

Single device controls the priority

Distributive arbitration by self selection

Individual devices identify them selves on a bus and will individually and consistently identify priority

Distributive arbitration by collision detection

Devices use the bus when its not busy and if it is they try again later (ethernet uses this)

PCI and USB buses

Note: These wont appear in the exam however you must know them well

What does PCI stand for

Peripheral Component Interconnect

Generalised PCI bus structure diagram

What does USB stand for

Universal Serial Bus

What does each of the pins do?
What kind of flow control does it have?

Stop and wait

What is the max length for full speed?

5meters

Managing I/O using Polling and Interrupts

What is polling?

This is when the processor will cycle through the devices, asking if it is ready (busy-wait I/O)

When is polling used?

When the processor is faster than the devices

What is interrupts?

This is when the device will ask the CPU for data

How does interrupts work?
  1. Device will notify CPU need/has data
  1. Device must wait till CPU is ready
  1. CPU will context switch (baso store the PC value somewhere else ready to come back to it later)
  1. CPU will then do the process
  1. CPU will then restore context (revert back to the original value of the PC)