First half Flashcards

1
Q

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

A

A program in execution, consisting of executable code, associated data, and a Process Control Block (PCB).

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

What information does the OS maintain in control structures?

A

Tables for memory, I/O devices, files, and processes.

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

What is the role of the Process Control Block (PCB)?

A

It contains all information required by the OS to manage a process, such as identifiers, CPU state, and control information.

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

What is stored in the memory tables of the OS?

A

Information about memory allocation, protection, and management.

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

What do I/O tables track?

A

The status and allocation of input/output devices and channels.

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

What is the purpose of the file tables?

A

To manage information about file existence, location, and status.

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

How are processes organized in the process tables?

A

Using cross-references to memory, I/O, and file tables.

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

What is the primary function of the Process Control Block?

A

To store process attributes for management and administration by the OS.

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

What are the three main categories of information in a PCB?

A

Process identification, CPU state information, and process control information.

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

Why are PCBs essential in process management?

A

They allow the OS to access all attributes of a process for efficient management and execution.

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

What are the seven process states in an operating system?

A

NEW, READY, RUNNING, BLOCKED, BLOCKED SUSPEND, READY SUSPEND, and TERMINATED.

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

What happens in the NEW state?

A

The process is newly created and awaiting resource allocation.

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

What triggers a process to transition to the READY state?

A

The process is fully built, loaded into RAM, and waiting for CPU allocation.

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

When does a process enter the RUNNING state?

A

When the CPU is allocated to it by the scheduler.

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

What causes a process to transition to the BLOCKED state?

A

Waiting for a resource or I/O task.

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

What is the BLOCKED SUSPEND state?

A

A process in a blocked state is swapped out to secondary memory due to insufficient RAM.

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

What happens in the READY SUSPEND state?

A

A ready process is swapped out of main memory to secondary memory.

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

When does a process enter the TERMINATED state?

A

When it has completed execution, and its PCB is deleted.

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

What is a state transition diagram?

A

A visual representation of process state changes and the triggers for each transition.

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

How does the OS decide on process state transitions?

A

Based on events like CPU allocation, resource availability, or process completion.

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

What are threads in an operating system?

A

Units of dispatch within a process that share resources but operate independently.

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

What are the two types of threads?

A

User-level threads and kernel-level threads.

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

How do user-level threads differ from kernel-level threads?

A

User-level threads are managed by applications, while kernel-level threads are managed by the OS.

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

What is an advantage of multiple threads in a single process?

A

They allow concurrent execution paths with shared memory and resources.

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

What is a process switch?

A

A switch where the CPU is allocated to a different process, involving context saving and scheduling.

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

What is a mode switch?

A

A hardware-level switch where the CPU resumes execution of the same process.

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

What triggers a process switch?

A

Events like external interrupts, system calls, or traps.

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

What is the main difference between a process switch and a mode switch?

A

A process switch changes the active process, while a mode switch resumes the same process.

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

Why are threads faster to switch than processes?

A

They share the same process memory space, requiring less context saving.

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

How does inter-thread communication compare to inter-process communication?

A

Inter-thread communication is more efficient because threads share the same address space.

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

What is the aim of CPU scheduling?

A

To optimize system performance by allocating CPU access among processes.

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

What are common evaluation criteria for scheduling algorithms?

A

Response time, throughput, predictability, and fairness.

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

What is the difference between pre-emptive and non-pre-emptive scheduling?

A

Pre-emptive allows process interruption, while non-pre-emptive waits for a process to finish or block.

34
Q

What is a time slice or quantum in scheduling?

A

A fixed duration allocated to each process in Round Robin scheduling.

35
Q

What is First Come, First Served (FCFS) scheduling?

A

A non-pre-emptive algorithm where processes are served in the order they arrive.

36
Q

How does Round Robin scheduling address fairness?

A

By rotating processes in the ready queue with a fixed time quantum.

37
Q

What is the Shortest Process Next (SPN) algorithm?

A

A non-pre-emptive scheduling method where the process with the shortest expected burst time is selected.

38
Q

What is starvation in CPU scheduling?

A

A situation where a process never gets CPU access due to higher-priority processes.

39
Q

How does the Highest Response Ratio Next (HRRN) algorithm avoid starvation?

A

By considering both waiting time and burst time to calculate process priority.

40
Q

What is Multi-Level Feedback (MLF) scheduling?

A

A strategy that uses multiple queues with different priorities and rules to manage processes effectively.

41
Q

What is the purpose of memory management in an operating system?

A

To manage and allocate memory space efficiently for processes.

42
Q

What is the difference between main memory and secondary memory?

A

Main memory is fast, volatile, and costly, while secondary memory is slower, non-volatile, and cheaper.

43
Q

What is fixed/static partitioning in memory management?

A

Dividing memory into fixed-sized chunks, which can lead to internal fragmentation.

44
Q

What is dynamic/variable partitioning?

A

Allocating memory in variable-sized partitions based on process requirements, which may cause external fragmentation.

45
Q

What is paging in memory management?

A

Where processes in primary memory(RAM) are divided into equal-sized pages and stored in available memory frames in secondary memory.

46
Q

How does paging prevent external fragmentation?

A

By ensuring all page frames are usable and eliminating the need for contiguous memory allocation.

47
Q

What is a page table?

A

A table that maps a process’s pages to physical memory frames.

48
Q

What is a logical address in paging?

A

An address relative to a process’s starting point, consisting of a page number and an offset.

49
Q

What is a physical address in paging?

A

The actual memory location in RAM, determined by translating the logical address using the page table.

50
Q

What are the advantages of paging?

A

It eliminates external fragmentation, minimizes internal fragmentation, and allows flexible memory allocation.

51
Q

What is virtual memory (VM)?

A

A memory management technique that uses disk space to simulate additional RAM.

52
Q

What is the primary goal of virtual memory?

A

To increase efficiency and flexibility by allowing larger processes and more processes to run simultaneously.

53
Q

What is a page fault?

A

An event where a process tries to access a page not currently in main memory.

54
Q

What happens during a page fault?

A

The required page is loaded from disk into a free memory frame, and the process is blocked until the operation completes.

55
Q

What is the resident set in

A

The set of pages currently loaded in main memory for a process.

56
Q

in virtual memory, How does the principle of locality of reference help.

A

It predicts which pages a process will access soon, minimizing page faults.

57
Q

What is the role of the page table in virtual memory?

A

To record the location of all process pages, whether in memory or on disk.

58
Q

What is thrashing in virtual memory?

A

A situation where excessive page faults occur, causing constant swapping and reducing performance.

59
Q

How can thrashing be avoided?

A

By using strategies like the Page Fault Frequency method to balance memory allocation.

60
Q

What are the benefits of virtual memory?

A

It allows for efficient multitasking, supports larger applications, and improves resource utilization.

61
Q

What is a page replacement policy?

A

A strategy used to decide which page to remove from memory when a new page is loaded.

62
Q

What is the First-In, First-Out (FIFO) page replacement algorithm?

A

It removes the oldest page in memory when a new page is needed.

63
Q

What is the Least Recently Used (LRU) algorithm?

A

It replaces the page that has not been used for the longest time.

64
Q

What is the Least Frequently Used (LFU) algorithm?

A

It replaces the page that has been used the least frequently.

65
Q

How does the Clock (Second Chance) algorithm work?

A

It gives pages a second chance if they have been accessed recently, using a circular queue.

66
Q

What is the purpose of the Not Recently Used (NRU) algorithm?

A

To categorize pages based on their recent usage and replace the least used ones.

67
Q

What is a cleaning policy in page replacement?

A

A method to decide when and how to write modified pages back to disk.

68
Q

What is a fetch policy in virtual memory?

A

A strategy that determines when pages should be loaded into memory, either on demand or in advance.

69
Q

What is the principle of ‘aging’ in page replacement?

A

A method that approximates LRU by keeping track of page usage over time.

70
Q

How do replacement algorithms affect system performance?

A

They impact the frequency of page faults and the efficiency of memory utilization.

71
Q

What is process concurrency?

A

The simultaneous execution of multiple processes or threads in a system.

72
Q

What problems arise from process concurrency?

A

Issues like deadlocks, race conditions, and resource contention.

73
Q

What is a critical section?

A

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

74
Q

What is mutual exclusion?

A

Ensuring that only one process can enter the critical section (the segment of code that can access or modify a shared resource) at a time.

75
Q

What are semaphores in concurrency control?

A

Variables used to control access to shared resources.

76
Q

What is a deadlock?

A

A situation where processes are stuck waiting for resources held by each other, with no progress.

77
Q

What is a race condition?

A

A flaw where the system’s behavior depends on the sequence of process execution.

78
Q

What is a monitor in concurrency?

A

A synchronization mechanism that allows threads to have mutual exclusion
(the requirement that only one process or thread can enter a critical section at a time)

79
Q

am i cooked

80
Q

How can deadlocks be prevented?

A

By avoiding circular wait, holding resources while requesting others, and prioritizing resource allocation.

81
Q

is yasantha the goat?