Input/Output - Week 8 Flashcards

(34 cards)

1
Q

What is Input/Output (I/O)?

A

Any transfer of information between the computer and the external world.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the basic ways to transfer information between the computer and external devices

A

Programmed I/O
Interrupts
Direct memory access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are I/O devices controlled

A

Busy waiting
Polling
Interrupts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is data transfer managed

A

Memory mapping
Cycle stealing
Buffering

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In the von Neumann model, what counts as I/O?

A

Any transfer beyond CPU and main memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why is I/O challenging?

A

Devices vary in speed, format, and data volume, and are slower than CPU/RAM.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the five functions of an I/O module?

A

Control & timing
Processor communication
Device communication
Data buffering
Error detection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the purpose of data buffering?

A

To balance speed differences between CPU/memory and devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the 3 techniques for I/O operations

A

Programmed I/O
Interrupt-driven I/O
Direct memory access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is programmed I/O?

A

CPU waits for device to finish I/O before continuing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Main disadvantage of programmed I/O?

A

If the processor is faster than the I/O module this is wasteful of processor time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is interrupt‑driven I/O?

A

Processor sends an I/O request, then continues doing other work.

When the device finishes, it sends an interrupt to tell the CPU, which pauses, handles it, then carries on.

The parent tells the kid to do a chore, then carries on with their own work. When the kid finishes, they come back and interrupt the parent, who pauses, deals with them, then continues working.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is DMA?

A

The I/O module and main memory exchange data directly without processor involvement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which I/O technique has no interrupts and has I/O to memory transfer through processor

A

Programmed I/O

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which I/O technique uses interrupts and has I/O to memory transfer through processor

A

Interrupt driven I/O

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which I/O technique uses interrupts and has direct I/O to memory transfer

A

Direct memory access

17
Q

What is the first step in controlling I/O devices

A

A stored instruction is fetched to the IR in the CPU and turns out, upon decoding, to be an I/O operation.

18
Q

What happens after an I/O instruction is decoded?

A

An instruction from the control unit to the I/O control unit causes the I/O control unit to send signals to the device to set it into action.

19
Q

What must happen after the device is set into action?

A

Data will need to be transferred to the device (a write) or from the device (a read).

20
Q

Where is the data placed during I/O transfers?

A

A data register.

21
Q

What must the I/O instructions be structured and coded into a bit pattern with 3 parts describe

A

An I/O operation code
The direction of transfer
The address of the device

22
Q

Where is I/O data placed in multiple device control?

A

I/O data is placed on a common I/O data bus.

23
Q

Where is address information placed in multiple device control?

A

can also be placed on a common I/O address bus.

24
Q

Whats the main advantages of having a shared I/O bus

A

Simplicity and flexibility - a single I/O control system with a single connection to the CPU.

25
What are the disadvantages of having a shared I/O bus
Cost of building a shared bus Possibility of contention for the shared resources of the bus
26
What is memory‑mapped I/O?
Memory-mapped I/O is when I/O devices are assigned addresses in memory, allowing the processor to interact with them using standard memory instructions (load and store).
27
Advantages of memory mapping
Simplifies I/O control, freeing CPU space for other uses
28
Disadvantages of memory mapped I/O
Uses address space, which then cant be used for storage I/O devices are in contention with the store for the same bus Programs may be harder to understand, as I/O and storage can be confused
29
What is the major problam with I/O programming
I/O device operation often involves some sort of electro-mechanical process This is much slower than electronic transfer of data within a CPU ** SLOW
30
Describe the busy wait strategy
Load next data to send to I/O device x Initiate I/O device x Test I/O device x's status flag If flag not set, repeat last instruction wait write data to device
31
Describe polling strategy
load next data to send to I/O device x; initiate I/O device x; test I/O device x’s status flag; if flag not set, do something else for a while, and go to previous step (test) write data to device
32
Advantage of polling
Allows us to get on with background computation
33
Disadvantages of polling
Unresponsiveness Multiple devices Complexity
34
What are the protocols for programmed I/O transfer using device flags
Busy waiting Polling