Os Questions Flashcards

1
Q

Explain two reasons why two CPUs running the same ISA at the same clock speed could show different performance.##Different microarchitecture designs (e.g.

A

deeper pipelines

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

Describe the steps taken by an operating system when handling a hardware interrupt.##1. Save current CPU state

A
  1. Switch to kernel mode
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What advantages does virtual memory provide to application programs? Give two reasons.##Allows programs larger than physical RAM to execute

A

and isolates processes for better security and stability.

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

In a system using multiprogramming

A

why might the CPU be idle even when there are jobs in the system?##Processes may be waiting for I/O operations to complete; without ready jobs in memory

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

A batch system always loads the next job from tape onto memory after one job completes. What is the major limitation of this setup?##The CPU remains idle during long tape I/O operations

A

leading to poor utilization and wasted processing power.

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

State two advantages of preemptive CPU scheduling compared to non-preemptive scheduling.##1. Improves response time for short interactive processes. 2. Prevents CPU hogging by long processes.

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

Explain how starvation can occur in a system using priority scheduling.##Low-priority processes may be indefinitely postponed if higher-priority processes keep arriving

A

preventing their execution.

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

In the context of critical sections

A

explain what is meant by bounded waiting.##There must exist a limit on the number of times other processes can enter their critical section before a waiting process gets access.

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

Give two reasons why deadlock prevention by disabling Hold and Wait condition can be inefficient.##1. Processes may have to request all needed resources at once

A

leading to low resource utilization. 2. Processes might hold resources they don’t immediately need

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

How does imposing a resource ordering prevent deadlock?##Processes are forced to request resources in a predefined order

A

preventing circular wait from forming.

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

What does the Banker’s Algorithm require in order to operate correctly?##It requires knowing the maximum resource demands of each process beforehand to check if granting a request will leave the system in a safe state.

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

What is the role of the MMU (Memory Management Unit) during virtual memory address translation?##The MMU maps virtual addresses to physical addresses

A

ensuring isolation and enabling paging or segmentation.

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

Describe the action taken by an OS when a process issues a system call.##The process triggers a software interrupt (trap)

A

the CPU switches to kernel mode

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

Why is aging an important mechanism in priority scheduling?##Aging gradually increases the priority of waiting processes

A

ensuring that all processes eventually get CPU time and preventing starvation.

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

What is the function of a bootstrap loader stored in ROM?##The bootstrap loader initializes system hardware and loads the OS kernel into memory during system startup.

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

A CPU uses a round-robin scheduler with a time quantum of 10 ms. What will happen if the time quantum is significantly reduced to 1 ms?##Context-switching overhead will increase

A

reducing effective CPU utilization and causing performance degradation.

17
Q

Describe what happens during context switching at a high level.##The OS saves the state (registers

A

program counter) of the current process and loads the state of the next scheduled process.

18
Q

State one reason why a register-based machine might be faster for certain applications compared to a stack-based machine.##Register machines can access operands directly without the overhead of pushing and popping values from a stack

A

leading to faster arithmetic and memory operations.

19
Q

What is the main advantage of using multilevel feedback queue scheduling over fixed multilevel queues?##Processes are dynamically reclassified between queues based on observed behavior

A

improving responsiveness and fairness.

20
Q

What is meant by safe state in deadlock avoidance

A

and why is it important?##A safe state ensures that the system can allocate resources in some order so that all processes can eventually complete