Chapter 1 Flashcards

(35 cards)

1
Q

What is the main benefit of allowing concurrent execution of CPU and I/O devices?

A

It increases CPU utilization and throughput by allowing the CPU to execute while I/O operations are ongoing.

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

In early systems, what happened when CPU needed I/O?

A

The CPU had to wait until the I/O completed, wasting CPU cycles.

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

Modern operating systems are primarily ________-driven.

A

Interrupt-driven

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

What is an interrupt?

A

A signal from hardware or software that informs the CPU that attention is required.

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

What is the difference between hardware and software interrupts?

A

Hardware interrupts come from devices (keyboard, disk). Software interrupts (traps) come from program errors or system calls.

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

What happens when an interrupt occurs?

A

CPU saves state, jumps to interrupt service routine (ISR), executes it, restores state, and resumes program.

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

What is the purpose of Direct Memory Access (DMA)?

A

It allows device controllers to transfer data directly between memory and device without CPU intervention for every byte.

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

What is the advantage of DMA over traditional I/O?

A

CPU is interrupted once per block transfer instead of every byte, reducing CPU overhead.

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

In the storage hierarchy, arrange from fastest to slowest: Disk, Cache, Main Memory, Registers.

A

Registers → Cache → Main Memory → Disk

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

Why are faster memory types smaller in size?

A

Because they are more expensive to manufacture.

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

What is the principle of locality of reference?

A

Programs tend to access recently used instructions and data repeatedly, making caching effective.

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

What is a single-processor system?

A

A system with one CPU that executes all instructions, possibly with device-specific processors for I/O.

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

What is asymmetric multiprocessing (AMP)?

A

A multiprocessor system where one master CPU controls all other subordinate CPUs.

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

What is symmetric multiprocessing (SMP)?

A

A multiprocessor system where all CPUs are equal, share memory, and can run tasks independently.

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

What is the benefit of SMP?

A

Improves performance, scalability, and fault tolerance by balancing workload across CPUs.

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

What is a clustered system?

A

A group of computers connected via high-speed LAN to work together for reliability and performance.

17
Q

What is the main benefit of clustering?

A

Fault tolerance and high availability — if one node fails, others can continue running.

18
Q

What is a batch processing system?

A

A system that executes jobs without user interaction, focusing on maximizing CPU utilization.

19
Q

What is a time-sharing system?

A

An interactive system where multiple users share CPU time, giving illusion of simultaneous execution.

20
Q

What is the main difference between batch and time-sharing systems?

A

Batch focuses on throughput without user interaction; time-sharing focuses on responsiveness and interactivity.

21
Q

Example of a batch system?

A

Payroll processing or data backups.

22
Q

Example of a time-sharing system?

A

A Linux server with multiple logged-in users.

23
Q

What is dual-mode operation in operating systems?

A

Separation of user mode (restricted) and kernel mode (privileged) to protect system resources.

24
Q

What is user mode?

A

Restricted execution mode for applications, without direct access to hardware resources.

25
What is kernel mode?
Privileged execution mode where the OS can directly control hardware and system resources.
26
What hardware feature enforces dual-mode operation?
The mode bit, which indicates if CPU is in user or kernel mode.
27
What happens when a system call is made?
Execution switches from user mode to kernel mode, the OS performs the request, then returns to user mode.
28
Give an example of a system call.
Reading a file from disk using read().
29
Why are system calls necessary?
They allow user programs to request services from the OS securely, without direct hardware access.
30
Does adding two numbers require a system call?
No, it is performed entirely in user mode without OS intervention.
31
Does reading a file require a system call?
Yes, file operations require kernel-level hardware access.
32
Why are interrupts important?
They let CPU respond to events as they happen, improving efficiency and responsiveness.
33
Why do we need both batch and time-sharing systems historically?
Batch maximized resource usage, while time-sharing introduced interactive computing for multiple users.
34
What is the purpose of protecting kernel mode?
To prevent user programs from crashing or corrupting the entire system by directly accessing hardware.
35
Why is dual-mode operation a benefit?
It increases system security and stability by separating user processes from kernel operations.