input and output Flashcards

1
Q

what does memory mapped io do

A

attaches io devices to a processor via a single unified memory bus

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

what is a memory bus

A

a linear address space in main memory

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

what is the point of the io device having memory on it

A

provides us control of it and can manage how the device is operating
allows us to transfer data into it

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

what does the status register in an io device tell us

A

if the device is ready to accept more data or if it has data to pass into memory

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

what is the biggest benefit of memory mapped io

A

attaching devices to the memory bus allows programs to access the device the same as anything else

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

how do we usually access memory mapped devices

A

c pointers

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

what is the negative of memory mapped io and how do we fix it

A

we can only make memory as fast as the the slowest thing attached to the memory bus and some io devices such as a mouse or keyboard are quite slow
fixed via isolated io

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

isolated io

A

separate memory bus for slow io devices

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

what is the benefit of isolated io

A

simple devices can remain simple; dont need extra hardware e.g. high speed/performance chips

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

what is the negative of isolated io

A

programs dont understand the second bus as its a separate address space therefore special processor instructions have to be used to address these devices

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

how do we write instructions to address devices in isolated io

A

functions to access the control/status register and memory in assembly (can be wrapped in c functions but underlying code has to be assembly)

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

in which two ways can we optimise memory use

A

circular queues
direct memory access

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

how do circular queues optimise memory use

A

2 circular queues one for input and output for messages going in and out

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

how does direct memory access optimise memory use (positive of it)

A

means that the cpu can do other things instead of data transfer
good as it could be with a slow device

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

how does direct memory access work

A

when we want to transfer data, we configure a dma controller ( a little processor)
the dma gets/sends the data whilst the cpu does something else
once complete the controller signals back to the cpu that the operation is complete

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

when configuring the dma controller what information do we want it to have

A

the address of memory were transferring
the number of bytes being transferred
control information to and from the device

17
Q

what is the alternative of programmed io

A

direct memory access

18
Q

what is programmed io

A

the cpu actively controls the data transfer and must be waiting for the device to be ready

19
Q

what is RTC (real clock time) and what is it used for

A

the actual time which is used for time stamps

20
Q

what is PIT (programmable interrupt time)

A

a device that sends signals to the processor in a particular amount of milliseconds
how we manage process scheduling etc

21
Q

why do we use PIT (programmable interrupt time)

A

the os needs to know when events are occuring which happens at defined times/intervals

22
Q

what happens if the PID interval is is too low

A

the system will seem unresponsive

23
Q

what happens if the PID interval is is too high

A

managing events + overhead becomes dominant in the running of the system as there may be lots of devices with lots of messages

24
Q

how do we ensure theres a balance in the frequency of PID intervals

A

having a queue of events; instead of the interval timer being a fixed amount, we configure the next interval after each event