Week 5 Flashcards

(27 cards)

1
Q

What does the CPU do with I/O devices?

A

The CPU sends/receives data to/from I/O devices.

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

What are input devices used for?

A

Set sensitivity, calibrate, switch on/off.

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

What are output devices used for? (examples)

A

Check readiness, verify success.

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

Where are I/O registers located?

A

Inside I/O devices, not the CPU.

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

How does the CPU access I/O registers?

A

Via memory-mapped I/O and port-mapped I/O.

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

What is memory-mapped I/O?

A

I/O registers mapped to special memory addresses.

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

What are the advantages of memory-mapped I/O?

A
  • Simple; no new CPU instructions needed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the disadvantages of memory-mapped I/O?

A
  • Reduces addressable memory
  • Risk of accidental access (program bugs).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is port-mapped I/O?

A

Uses dedicated I/O instructions (e.g., Input, Output).

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

What is the difference between early and modern PC I/O methods?

A

Early PCs mixed both methods; modern systems prefer memory-mapped I/O.

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

What is the definition of a program?

A

A sequence of instructions.

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

What is the definition of a process?

A

A running program.

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

What is the lifespan of a program?

A

Long (stored until deleted).

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

What is the lifespan of a process?

A

Limited (ends when execution stops).

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

What is programmed (polling) I/O?

A

CPU periodically checks I/O device status.

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

What is the main disadvantage of programmed I/O?

A

CPU constantly busy (inefficient, high power usage).

17
Q

What is interrupt-based I/O?

A

I/O device notifies CPU when ready (via hardware signal).

18
Q

What happens during an interrupt in the CPU?

A

CPU pauses current task, runs interrupt handler.

19
Q

What is Direct Memory Access (DMA)?

A

A dedicated controller handles memory transfers, bypassing CPU.

20
Q

What are the advantages of DMA?

A
  • Frees CPU for other tasks
  • Faster bulk transfers.
21
Q

What is an OS’s primary function?

A

Acts as an interface between hardware, programmers, and users.

22
Q

What is the purpose of the OS kernel?

A

Core components include process, memory, and I/O management.

23
Q

What does virtualization provide for each process?

A

Dedicated CPU, contiguous memory, exclusive hardware access.

24
Q

What is the purpose of virtual memory?

A

Prevents processes from accessing each other’s memory and expands usable memory.

25
What triggers a page fault?
Occurs when a program attempts to access a virtual memory page that is not currently loaded in physical memory
26
What is thrashing in the context of virtual memory?
Overuse of swapping causing slowdowns.
27
What are the states of a process?
* Running * Ready * Blocked.