p.10
Inter-Process Communication (IPC)
What are the two methods of communication for cooperating processes in OS?
Cooperation by Sharing and Cooperation by Message Passing.
p.10
Inter-Process Communication (IPC)
How does communication by message passing work?
The producer process sends a message to the kernel, which then sends it to the consumer process.
p.11
Definition and Concept of Process
What are the main functions of the kernel?
Process management, file management, memory management, and I/O management.
p.12
Inter-Process Communication (IPC)
What is the benefit of dividing a task into several subtasks?
It improves computation speed and makes execution faster.
p.17
Threads and Multithreading Models
What is a disadvantage of kernel-level threads?
The implementation of kernel threads is more difficult than user threads.
p.2
Process Life Cycle and States
What does the Ready state indicate for a process?
The process is waiting for a processor to be assigned to it.
p.20
CPU Scheduling Algorithms
What is Preemptive Scheduling?
Preemptive Scheduling occurs when a process switches from running state to ready state or from waiting state to ready state.
p.20
CPU Scheduling Algorithms
What is the First Come First Serve (FCFS) scheduling algorithm?
FCFS allocates the CPU to the process that requests it first, using a FIFO queue.
p.10
Inter-Process Communication (IPC)
What is required for cooperating processes in an operating system?
A communication method to exchange data and information.
p.17
Threads and Multithreading Models
What is a key advantage of kernel-level threads?
The kernel-level thread is fully aware of all threads.
p.12
Inter-Process Communication (IPC)
What is required for achieving computation speed in a system?
Multiple CPUs and input/output devices.
p.17
Threads and Multithreading Models
What are the components of a thread?
Program counter, register set, and stack space.
p.12
Inter-Process Communication (IPC)
How does data sharing among cooperating processes improve execution?
It allows processes to access the same files concurrently, increasing speed and efficiency.
p.12
Inter-Process Communication (IPC)
What is process starvation in the context of cooperating processes?
It occurs when a process has to wait until a message is received by a previous process.
p.3
Process Life Cycle and States
What happens in the RUNNING state?
Execution of the instructions.
p.22
CPU Scheduling Algorithms
What is a key characteristic of the Round Robin scheduling method?
It is simple, easy to use, and starvation-free as all processes get balanced CPU allocation.
p.22
CPU Scheduling Algorithms
How does SRTF determine which process to execute?
It selects the process with the smallest amount of time remaining until completion.
p.12
Inter-Process Communication (IPC)
What advantage does modularity provide in task execution?
It allows breaking complex tasks into modules for more efficient and faster execution.
p.2
Process Life Cycle and States
What triggers a process to enter the Waiting state?
When it needs to wait for a resource, such as user input or a file.
p.12
Inter-Process Communication (IPC)
What risk does modularity pose to data integrity in cooperating processes?
It can lead to data damage due to improper handling.
p.3
Process Life Cycle and States
What does the WAITING state mean?
The process is waiting for some event to occur.
p.11
Process Life Cycle and States
What is process starvation?
When a consumer process does not receive a message it needs to execute a task.
p.22
CPU Scheduling Algorithms
What is the nature of the Shortest Remaining Time First (SRTF) scheduling method?
It is a preemptive version of the Shortest Job First (SJF) method.
p.12
Inter-Process Communication (IPC)
Why do we need cooperating processes in an operating system?
Because different processes need to communicate with each other.
p.20
CPU Scheduling Algorithms
What are the two main types of CPU scheduling methods?
Preemptive Scheduling and Non-Preemptive Scheduling.
p.17
Threads and Multithreading Models
Why is context switching faster between threads than processes?
The context switching period between threads is less than that for processes, which incurs more overhead.
p.20
CPU Scheduling Algorithms
What are the characteristics of FCFS?
FCFS supports both non-preemptive and preemptive scheduling, is easy to implement, but has high wait times.
p.17
Threads and Multithreading Models
What are the three types of multithreading models?
Many-to-many, many-to-one, and one-to-one relationships.
p.10
Inter-Process Communication (IPC)
How do cooperating processes communicate by sharing?
By using shared resources such as data, memory, variables, and files.
p.20
CPU Scheduling Algorithms
What does turnaround time refer to?
Turnaround time is the total time taken for a process to arrive in the ready queue and complete.
p.11
Inter-Process Communication (IPC)
What are the four types of needs for cooperating processes in an OS?
Information Sharing, Computation Speed, Convenience, Modularity.
p.17
Threads and Multithreading Models
How do threads enhance system throughput?
By splitting a process into many threads, increasing the number of jobs done in unit time.
p.3
Process Life Cycle and States
What are the different states a process can be in?
NEW, READY, RUNNING, WAITING, TERMINATED.
p.17
Threads and Multithreading Models
Why is communication simpler with multiple threads?
Threads share the same address space, unlike processes which require exclusive communication strategies.
What is an independent process in an operating system?
A process that does not affect or impact any other process and does not share data with them.
p.10
Inter-Process Communication (IPC)
What is a critical section in the context of shared communication?
A section that provides data integrity and avoids data inconsistency.
p.2
Process Life Cycle and States
What are the five states a process can be in during its life cycle?
Start, Ready, Running, Waiting, Terminated (or Exit).
p.22
CPU Scheduling Algorithms
What is an advantage of SRTF?
Short processes are handled very quickly.
p.20
CPU Scheduling Algorithms
What is Non-Preemptive Scheduling?
Non-Preemptive Scheduling occurs when a process terminates or switches from running state to waiting state.
p.2
Process Control Block (PCB)
What information does a PCB store?
Process state, process privileges, process ID, pointer to parent process, and program counter.
p.20
CPU Scheduling Algorithms
What are the disadvantages of FCFS?
FCFS suffers from the Convoy effect and has a higher average waiting time compared to other algorithms.
p.11
Definition and Concept of Process
What is the kernel in an operating system?
The heart and core of an operating system that interacts with hardware to execute processes.
p.22
CPU Scheduling Algorithms
What happens to newly created processes in Round Robin scheduling?
They are added to the end of the ready queue.
p.20
CPU Scheduling Algorithms
What is throughput in CPU scheduling?
Throughput is the total number of processes completed per unit of time, representing the total work done by the CPU.
p.11
Inter-Process Communication (IPC)
What is the need for cooperating processes in an operating system?
To allow processes to share data and information, affecting each other.
p.10
Inter-Process Communication (IPC)
What is the role of the kernel in message passing?
To receive messages from the producer process and send them to the consumer process.
p.3
Process Control Block (PCB)
What does memory management information include?
Information from the page table, memory limitations, and segment table.
p.20
CPU Scheduling Algorithms
What is response time in the context of CPU scheduling?
Response time is the time taken from the submission of a process until its first response is produced.
p.2
Process Life Cycle and States
What happens when a process enters the Running state?
The OS scheduler assigns a processor to the process, and it executes the process instructions.
p.3
Process Control Block (PCB)
What does IO status information include?
A list of the process’s I/O devices.
p.2
Process Life Cycle and States
What occurs in the Terminated state of a process?
The process waits for removal from main memory after execution or termination.
p.3
Process Life Cycle and States
What does the NEW state represent?
The creation of the process.
p.12
Inter-Process Communication (IPC)
What sensitive issue can arise during information sharing among cooperating processes?
Sensitive user data may be shared unintentionally with other processes.
p.17
Threads and Multithreading Models
What resources can be shared among threads within a process?
Code, data, and files, but not stack and register.
p.3
Process Life Cycle and States
What does the TERMINATED state signify?
A process has completed execution.
p.22
CPU Scheduling Algorithms
Why is Round Robin considered fair?
Because every process gets an equal share of CPU.
p.11
Inter-Process Communication (IPC)
How do processes A and B communicate in the given example?
Process A sends a message to the kernel, which then sends it to Process B.
p.3
Process Control Block (PCB)
What type of information is required for CPU scheduling?
Process priority and additional scheduling information.
p.22
CPU Scheduling Algorithms
What is a disadvantage of SRTF compared to SJF?
SRTF has more context switches, consuming valuable CPU time.
p.17
Threads and Multithreading Models
What is the benefit of threads in a multiprocessor system?
More than one thread can be scheduled on multiple processors.
p.17
Threads and Multithreading Models
What is a benefit of using multiple threads in terms of responsiveness?
When a thread completes execution, the process can respond as soon as possible.
p.20
CPU Scheduling Algorithms
What are the advantages of FCFS?
FCFS is easy to implement and follows a first-come, first-serve method.
p.17
Threads and Multithreading Models
What does the many-to-many model do?
It multiplexes any number of user threads onto an equal or smaller number of kernel threads.
p.17
Threads and Multithreading Models
How does the scheduler benefit from kernel-level threads?
The scheduler may decide to spend more CPU time on processes with a large number of threads.
p.3
Process Control Block (PCB)
What does accounting information in a PCB comprise?
CPU use for process execution, time constraints, and execution ID.
p.12
Inter-Process Communication (IPC)
What is a potential disadvantage of cooperating processes?
Deadlock can occur if a consumer process waits for a message that is not received.
p.3
Process Life Cycle and States
What does the READY state indicate?
The process is waiting to be assigned to any processor.
p.20
CPU Scheduling Algorithms
How can a scheduling algorithm affect waiting time?
A scheduling algorithm can minimize the waiting time of a process, but cannot change the time required for execution.
p.11
Inter-Process Communication (IPC)
How does information sharing benefit cooperating processes?
It allows different processes to access the same file concurrently, making execution more efficient.
p.22
CPU Scheduling Algorithms
What is a potential disadvantage of SRTF regarding long processes?
Long processes may be held off indefinitely if short processes are continually added.
p.2
Process Control Block (PCB)
What is a Process Control Block (PCB)?
A data structure managed by the operating system that contains all information required to track a process.
p.12
Inter-Process Communication (IPC)
What are the two types of processes in a system?
Independent and cooperating processes.
What is an example of a simple program in C?
#include <stdio.h> int main() { printf(“Hi, Subhadip!
”); return 0; }
p.2
Process Control Block (PCB)
What is the purpose of the Process ID (PID) in a PCB?
To uniquely identify each process in the operating system.
What is the difference between a program and a process?
A program is a piece of code, while a process is the running representation of that code.
p.2
Process Control Block (PCB)
What does the program counter in a PCB refer to?
It points to the address of the process’s next instruction.