Second Half Flashcards

1
Q

What is the primary function of the I/O subsystem in an OS?

A

To manage communication between the computer and external devices.

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

What are the types of I/O devices?

A

Input devices (e.g., keyboard, mouse), output devices (e.g., monitor, printer), and storage devices (e.g., hard drives).

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

What is the purpose of device drivers in I/O management?

A

To act as an interface between the operating system and hardware devices.

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

What is direct memory access (DMA)?

A

A feature allowing devices to transfer data directly to/from memory without CPU intervention.

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

How does the OS manage multiple I/O requests?

A

By using I/O scheduling algorithms to optimize device usage.

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

What is buffering in I/O systems?

A

Temporarily storing data in memory during I/O operations to improve performance.

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

What is spooling in I/O?

A

A technique for managing output devices by storing jobs in a queue until the device is ready.

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

What is the role of an I/O scheduler?

A

To decide the order in which I/O requests are processed to optimize system performance.

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

What is the difference between synchronous and asynchronous I/O?

A

Synchronous I/O waits for operations to complete, while asynchronous I/O allows processes to continue executing.

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

How does the OS ensure fairness in I/O management?

A

By using priority-based or round-robin scheduling for I/O requests.

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

What is a file in the context of an operating system?

A

A collection of related data stored on secondary storage, identified by a name.

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

What are the main operations supported by a file system?

A

Creation, deletion, reading, writing, and updating files.

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

What is a directory in a file system?

A

A structure that organizes and manages files within a storage device.

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

What are file attributes?

A

Metadata about a file, such as name, type, size, creation date, and permissions.

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

What is file allocation?

A

The method by which disk space is assigned to files (e.g., contiguous, linked, or indexed).

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

How does the OS ensure file security?

A

By implementing access control lists (ACLs) and file permissions.

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

What is a file descriptor?

A

A reference to an open file used by the OS to manage file operations.

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

What is the purpose of a file system hierarchy?

A

To organize files and directories in a structured manner for easy navigation.

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

What is journaling in file systems?

A

A technique to keep track of changes in a log to prevent data loss during system crashes.

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

What are examples of file systems?

A

FAT32, NTFS, ext4, HFS+, and APFS.

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

What is disk scheduling in operating systems?

A

A technique to optimize the order of disk I/O requests to improve performance.

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

What is the First-Come, First-Served (FCFS) disk scheduling algorithm?

A

A simple method where requests are processed in the order they arrive.

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

What is the Shortest Seek Time First (SSTF) algorithm?

A

A scheduling method that selects the request closest to the current disk head position.

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

What is the SCAN (Elevator) disk scheduling algorithm?

A

It moves the disk head back and forth across the disk to service requests.

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

What is the C-SCAN algorithm?

A

A variant of SCAN that services requests in one direction and quickly returns to the start.

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

What is disk fragmentation?

A

A condition where files are scattered across non-contiguous areas of the disk.

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

What is defragmentation?

A

The process of reorganizing disk contents to store files in contiguous blocks.

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

What is RAID in disk management?

A

A technology for combining multiple disks to improve performance and redundancy.

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

What are the types of RAID configurations?

A

RAID 0 (striping), RAID 1 (mirroring), RAID 5 (striping with parity), and more.

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

What is the role of a disk cache?

A

To temporarily store frequently accessed data to improve read and write speeds.

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

What is the goal of CPU scheduling algorithms?

A

To optimize CPU utilization, response time, throughput, and fairness.

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

What is the Round Robin (RR) scheduling algorithm?

A

A pre-emptive algorithm that allocates CPU time in fixed time slices or quantums.

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

What is the Shortest Job Next (SJN) algorithm?

A

A non-pre-emptive algorithm that selects the process with the shortest CPU burst time.

34
Q

How does the Multi-Level Feedback Queue (MLFQ) work?

A

It uses multiple queues with different priorities, allowing processes to move between queues based on execution history.

35
Q

What is the Highest Response Ratio Next (HRRN) algorithm?

A

A non-pre-emptive algorithm that considers both waiting time and burst time to calculate process priority.

36
Q

What is starvation in scheduling?

A

When a process never gets CPU access due to constant selection of higher-priority processes.

37
Q

How does aging prevent starvation?

A

By gradually increasing the priority of processes that have waited too long.

38
Q

What is the difference between CPU-bound and I/O-bound processes?

A

CPU-bound processes spend more time on computation, while I/O-bound processes spend more time waiting for I/O operations.

39
Q

What is the difference between static and dynamic priority scheduling?

A

Static assigns fixed priorities, while dynamic adjusts priorities based on factors like aging or process behavior.

40
Q

How are scheduling algorithms evaluated?

A

Using metrics like average wait time, turnaround time, and throughput.

41
Q

What is synchronization in the context of concurrency?

A

Ensuring that processes execute in a coordinated manner to avoid conflicts when accessing shared resources.

42
Q

What is a race condition?

A

A situation where the system’s behavior depends on the sequence or timing of uncontrollable events, leading to unpredictable outcomes.

43
Q

What are semaphores used for?

A

To control access to shared resources by processes, preventing simultaneous access that could cause conflicts.

44
Q

What is a mutex?

A

A mutual exclusion lock that allows only one thread or process to access a resource at a time.

45
Q

What is a critical section?

A

A portion of a program that accesses shared resources and must not be executed by more than one process at a time.

46
Q

What are the conditions necessary for a deadlock to occur?

A

Mutual exclusion, hold and wait, no preemption, and circular wait.

47
Q

How can deadlocks be prevented?

A

By breaking one or more of the necessary conditions, such as avoiding circular wait or allowing resource preemption.

48
Q

What is deadlock detection?

A

Monitoring resource allocation to identify and resolve deadlocks when they occur.

49
Q

What is the dining philosophers problem?

A

A classic synchronization problem demonstrating the challenges of allocating resources without causing deadlocks.

50
Q

What is the banker’s algorithm?

A

A deadlock-avoidance algorithm that dynamically allocates resources while ensuring system safety.

51
Q

What is the purpose of CPU scheduling simulations?

A

To evaluate and compare the performance of different scheduling algorithms.

52
Q

What is the first step in running a scheduling simulation?

A

Calculate the total service units and create a grid to track processes.

53
Q

How are processes ranked in simulations for non-pre-emptive algorithms?

A

Based on criteria like arrival time or burst time.

54
Q

How does Round Robin scheduling handle time slices in simulations?

A

Each process gets a fixed quantum, and the queue is updated after every time slice.

55
Q

What is Normalized Turnaround Time (NTT)?

A

A ratio of turnaround time to service burst time, used to measure the fairness of an algorithm.

56
Q

How is wait time calculated in simulations?

A

By summing the time spent waiting for the CPU between arrival and execution.

57
Q

What does the turnaround time represent in simulations?

A

The total time a process spends in the system, from arrival to completion.

58
Q

Why is NTT important in evaluating scheduling algorithms?

A

It normalizes turnaround time, accounting for the process’s burst length.

59
Q

What are the benefits of running simulations for scheduling?

A

To analyze algorithm efficiency and identify bottlenecks in CPU usage.

60
Q

How are pre-emptive algorithms simulated differently?

A

The CPU becomes available based on time limits or new process arrivals, requiring frequent re-ranking.

61
Q

What is the difference between Shortest Process Next (SPN) and Shortest Remaining Time (SRT)?

A

SPN is non-pre-emptive, while SRT is a pre-emptive scheduling algorithm.

62
Q

How does the Multi-Level Feedback Queue (MLFQ) algorithm prioritize processes?

A

By dynamically adjusting process priority based on execution history and wait time.

63
Q

What is the primary goal of the Highest Response Ratio Next (HRRN) algorithm?

A

To balance fairness and efficiency by considering both waiting time and service burst.

64
Q

What is starvation in scheduling, and how is it addressed?

A

Starvation occurs when lower-priority processes are indefinitely delayed, and it is addressed through aging.

65
Q

How does the exponential average method estimate process burst time?

A

By giving higher weight to recent bursts using a smoothing factor.

66
Q

What is the role of context switching in pre-emptive scheduling?

A

To save and restore process states when switching between tasks.

67
Q

Why is process aging important in dynamic priority scheduling?

A

To ensure long-waiting processes eventually get CPU access.

68
Q

How does Round Robin improve fairness in scheduling?

A

By assigning fixed quanta, ensuring each process gets regular CPU access.

69
Q

What is a time slice, and how does its size affect scheduling performance?

A

A fixed duration for process execution; shorter slices improve response time but increase overhead.

70
Q

How do scheduling algorithms balance CPU-bound and I/O-bound processes?

A

By using strategies that account for process characteristics and system workload.

71
Q

Why is understanding operating systems crucial for developers?

A

It helps them manage system resources like CPU, RAM, and file systems effectively.

72
Q

How do operating systems impact software performance?

A

By optimizing resource allocation and managing process concurrency.

73
Q

What lessons can developers learn from operating system algorithms?

A

Approaches to solving complex resource management problems.

74
Q

Why are operating systems considered templates for programming solutions?

A

Their solutions address classic design challenges and can be adapted to various domains.

75
Q

How does studying operating systems improve debugging skills?

A

By providing insights into low-level system operations and resource conflicts.

76
Q

What role do operating systems play in process scheduling?

A

They allocate CPU time to processes based on algorithms that balance efficiency and fairness.

77
Q

Why is concurrency a significant focus in operating systems?

A

It ensures that multiple processes can execute efficiently without conflicts.

78
Q

How does virtual memory benefit application developers?

A

By allowing programs to use more memory than physically available on the system.

79
Q

What real-world problems are addressed by file systems?

A

Data organization, retrieval speed, and ensuring data integrity.

80
Q

What is the ultimate goal of learning about operating systems?

A

To gain a holistic understanding of how software interacts with hardware.