OS1 Flashcards

(58 cards)

1
Q

State the purpose of hardware.

A

Hardware provides basic computing resources: CPU, memory, I/O devices.

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

State the purpose of the operating system.

A

The operating system controls and coordinates the use of hardware resources.

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

State the purpose of application programs.

A

Application programs define how hardware/OS resources are used to solve the computing problems of the users.

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

State the purpose of hardware resources used by the CPU to execute programs.

A

Memory to store both programs and data. Devices for input and output. Bus to transfer information between CPU and memory/devices.

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

What does the CPU do in the fetch-execute cycle?

A

Fetches and decodes next instruction. Generate control signals and operand information. Inside the execution unit, control signals select the functional unit and operation.

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

State the purpose of the three functional units.

A

Arithmetic logic unit - read one/two registers, perform operation, write result back. Branch unit - test condition and set value of program counter. Memory access unit - generate address and use bus to read/write value.

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

What is a bus?

A

Shared communication wires.

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

State an advantage of using buses?

A

Don’t need wires everywhere - low cost and versatile.

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

State a disadvantage of using buses?

A

Is a potential bottleneck.

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

State the 3 lines in a typical bus.

A

Address lines, Data lines, Control lines.

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

State the purpose of address lines.

A

Address lines determine how many devices are on bus. Note: devices includes memory addresses and memory-mapped devices.

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

State the purpose of data lines.

A

Data lines determine how many bits can be transferred at once.

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

State the purpose of control lines.

A

Control lines indicate target devices and selected operations.

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

Describe how the buses are used to communicate.

A

In an initiator-responder manner. Initiator puts address onto bus and asserts read. Responder reads address from bus, retrieves data, and push onto bus. Initiator reads data from bus.

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

State the characteristics that may differ between buses.

A

Data width, Max number of devices, Max length.

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

What are the 4 types of buses in the bus hierarchy?

A

Processor bus, Memory bus, PCI buses, Bridges.

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

State the purpose of processor bus.

A

Used by the CPU to talk to cache.

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

State the purpose of memory bus.

A

Used by CPU to communicate with memory.

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

State the purpose of PCI buses.

A

Used to communicate with devices.

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

State the purpose of bridges.

A

To bridge forward from one bus to another.

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

What is unique about the processor bus?

A

It is the fastest and widest bus.

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

Describe how the bootstrap program (bootloader) boots the computer.

A

BIOS/UEFI stored in ROM executes when the machine powers on. It initialises all parts of the system inc. memory and devices controllers. Finds, loads and executes the kernel. Starts the operating system.

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

Describe how the operating system starts in stages.

A

The kernel enables processes to be created, devices and file system to be accessed. System processes starts.

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

State the purpose of a device controller.

A

Each device controller is responsible for a particular device type. Controls interaction between the device and the local buffer.

25
How does the CPU interact with devices?
The CPU moves data from memory to local buffers in the device controller. Device controller raise an interrupt when it has finished its operation.
26
Describe how an interrupt is handled.
The interrupt vector contains the addresses of all the interrupt service routines (ISR). Control is transferred to the ISR.
27
When does interrupts happen?
Interrupts are typically deferred to an instruction boundary.
28
Describe how a program resumes after an ISR.
The CPU typically saves value of all registers, restoring on return.
29
What is a trap/exception?
A software-generated interrupt.
30
What are traps caused by?
By either an error or a deliberate user request.
31
Define bit.
The basic unit of computer storage, containing either 0 or 1.
32
Define a byte (octet).
8 bits. Typically the smallest chunk of memory that can be referred to.
33
Define a word.
A word is a given computer architecture's native unit of data.
34
List the storage hierarchy.
Registers, Cache, Main memory, Secondary storage.
35
State the properties of the main memory.
Can be accessed directly by the CPU. Large, random access, volatile.
36
State the properties of secondary memory.
Very large, non-volatile.
37
Describe a hard disk.
Rigid metal or glass platters covered with metallic recording materials. Logically divided into tracks, which are subdivided into sectors.
38
State the purpose of a device driver.
Provides a uniform interface between the kernel and the device controller.
39
How is layering done?
Arrange components in a stack, and control interactions between components.
40
What is multiplexing?
Multiplexing is where one resource is being consumer by multiple consumers simultaneously.
41
Define latency.
It is how long an operation took.
42
Define bandwidth.
The rate at which something can occur - its throughput.
43
Define jitter.
The variation in latency.
44
What is impedence mismatch?
It is when two components operates at different latencies/bandwidths.
45
What is caching?
It is where a small amount of high-performance storage is used to mask the performance impact of lower-performance components.
46
What is buffering?
Is where memory is introduced between two components to soak up small, variable imbalances in bandwidth.
47
Describe how buffering works when reading from a hard disk.
A hard disk has memory which the disk controller writes data into. And from which the OS reads data out.
48
In what case does buffering not help?
No use if long-term average bandwidth of one component exceeds another.
49
Define bottleneck.
The most constrained resource in a system.
50
Describe a perfectly balanced system.
Such system has all resources simultaneously bottlenecked.
51
State the functionalities that an operating system provides.
Control over execution of all programs, Multiplexing of resources between programs, Abstraction over low-level details, Extensibility to meet changing demands.
52
Describe the CPU management by the operating system.
Multiplexing many running program over the CPU(s), (Process) lifecycle management, Synchronisation/communication between CPUs.
53
Describe the memory management by the operating system.
Tracking memory ownership, Managing allocation/deallocation.
54
Describe the storage management by the operating system.
Abstracting different storage media and their characteristics, Provide basic file system operations (create, delete, etc).
55
Describe the I/O management by the operating system.
Abstracting differences between devices, Providing device drivers, Manages I/O buffering and caching.
56
How does the OS prevents an application from hogging the CPU?
By time sharing - use a countdown timer, interrupts when it hits 0.
57
How is memory protection provided?
Have hardware to check every memory reference is not outside of allowed range.
58
How does the OS provides I/O protection?
I/O instructions are made privileged. Devices accessed via memory are protected on memory protection mechanisms.