Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.
Process ManagementEasy
Q1. A process is:
- A.A single CPU register
- B.A program in execution✓ Correct
- C.A file held in memory
- D.A program stored on disk
Explanation
A process is a program in execution. It includes the program code, current activity (program counter), stack, data section, and heap.
Report an error in this question
Process ManagementEasy
Q2. Which of the following is NOT a state of a process?
- A.Compiling✓ Correct
- B.Ready
- C.Waiting
- D.Running
Explanation
The standard process states are: New, Ready, Running, Waiting (Blocked), and Terminated. Compiling is not a process state.
Report an error in this question
Process ManagementEasy
Q3. The Process Control Block (PCB) contains:
- A.Only the executable program code of the process
- B.Process state, program counter, CPU registers, etc✓ Correct
- C.Only the virtual and physical memory addresses
- D.Only the process name and its unique identifier
Explanation
The PCB contains all information about a process: process state, program counter, CPU registers, memory management info, I/O status, and accounting information.
Report an error in this question
Process ManagementEasy
Q4. What system call creates a new process in UNIX/Linux?
- A.new()
- B.spawn()
- C.create()
- D.fork()✓ Correct
Explanation
The fork() system call creates a new child process in UNIX/Linux. The child is a copy of the parent process.
Report an error in this question
Process ManagementEasy
Q5. A context switch occurs when:
- A.A file is saved to secondary storage
- B.The user logs out of the session
- C.The CPU switches between processes✓ Correct
- D.A new program is installed on disk
Explanation
A context switch occurs when the CPU switches from executing one process to another, saving the state of the old process and loading the state of the new one.
Report an error in this question
Process ManagementEasy
Q6. An orphan process is:
- A.A process that has no memory allocated
- B.A child process whose parent has terminated✓ Correct
- C.A process that is waiting for I/O
- D.A process that is in the ready queue
Explanation
An orphan process is a child process that continues to run after its parent process has terminated. In UNIX, orphan processes are adopted by the init process.
Report an error in this question
Process ManagementEasy
Q7. A zombie process is:
- A.A process that is stuck inside an infinite loop
- B.A process running with very high execution priority
- C.A terminated process whose exit status is uncollected✓ Correct
- D.A process consuming excessive CPU cycles continuously
Explanation
A zombie process is one that has finished execution but still has an entry in the process table because its parent has not yet called wait() to read its exit status.
Report an error in this question
Process ManagementEasy
Q8. The program counter in a process stores:
- A.The address of the next instruction to execute✓ Correct
- B.The scheduling priority assigned to the process
- C.The total amount of memory currently in use
- D.The total count of programs currently running
Explanation
The program counter (PC) holds the address of the next instruction to be executed for that process. It is saved and restored during context switches.
Report an error in this question
Process ManagementEasy
Q9. Inter-process communication (IPC) allows:
- A.A process to access hardware directly
- B.A process to run faster on the CPU
- C.A process to compile source code files
- D.Processes to exchange data and synchronize✓ Correct
Explanation
IPC mechanisms allow processes to communicate with each other and synchronize their actions. Common IPC methods include shared memory and message passing.
Report an error in this question
Process ManagementEasy
Q10. When a fork() system call is executed successfully, what does it return to the child process?
- A.Parent PID value
- B.Zero is returned✓ Correct
- C.Child PID value
- D.Negative one val
Explanation
fork() returns 0 to the child process and the child's PID to the parent process. A return value of -1 indicates an error.
Report an error in this question
Process ManagementMedium
Q11. In the producer-consumer problem using shared memory, what role does the buffer play?
- A.It handles hardware interrupt processing
- B.It is a shared region for producer-consumer✓ Correct
- C.It stores the executable program code
- D.It manages the CPU scheduling algorithm
Explanation
The buffer is a shared memory region where the producer places data items and the consumer removes them. It can be bounded (fixed size) or unbounded (theoretically unlimited).
Report an error in this question
Process ManagementMedium
Q12. What is the difference between shared memory and message passing IPC?
- A.Shared memory faster for large data; message passing for remote
- B.There is no difference between these two approaches
- C.Shared memory uses common region; message passing uses kernel
- D.Both B and C are correct descriptions of their differences✓ Correct
Explanation
Shared memory uses a common memory region accessed by both processes (faster for large data). Message passing exchanges messages through the kernel and is easier to implement across different machines.
Report an error in this question
Process ManagementMedium
Q13. What happens during a context switch?
- A.Current process state is saved, next is loaded✓ Correct
- B.All of main memory is cleared completely
- C.All running processes are terminated at once
- D.The CPU is shut down and then restarted
Explanation
During a context switch, the OS saves the state (registers, program counter, etc.) of the currently running process to its PCB and loads the saved state of the next process to be executed.
Report an error in this question
Process ManagementMedium
Q14. In UNIX, what does the exec() family of system calls do?
- A.Terminates the currently running process
- B.Replaces process image with new program✓ Correct
- C.Suspends the process until a signal
- D.Creates a brand new child process
Explanation
The exec() family of system calls replaces the current process image with a new program. After exec(), the new program runs in the same process space with the same PID.
Report an error in this question
Process ManagementMedium
Q15. What is cascading termination?
- A.Terminating processes one by one sequentially
- B.OS terminates all children when parent exits✓ Correct
- C.Restarting processes in a specific sequence
- D.Suspending processes in a particular order
Explanation
Cascading termination is when the OS terminates all descendant processes of a parent when the parent terminates, since children cannot exist without their parent in some OS implementations.
Report an error in this question
Process ManagementMedium
Q16. A pipe in UNIX provides:
- A.Bidirectional communication between any processes
- B.Network communication across remote machines
- C.Direct communication with the hardware devices
- D.Unidirectional communication between parent-child✓ Correct
Explanation
An ordinary (anonymous) pipe in UNIX provides unidirectional communication. It typically requires a parent-child relationship between processes. For bidirectional communication, two pipes are needed.
Report an error in this question
Process ManagementMedium
Q17. What is a named pipe (FIFO) and how does it differ from an ordinary pipe?
- A.It only works on Microsoft Windows platforms
- B.It provides faster data communication speed
- C.It has a name and works between unrelated processes✓ Correct
- D.It is identical to an ordinary pipe
Explanation
A named pipe (FIFO) exists as a file in the file system and can be used for communication between unrelated processes, unlike ordinary pipes which require a parent-child relationship.
Report an error in this question
Process ManagementMedium
Q18. Which scheduling queue holds processes that are in main memory and ready to execute?
- A.Wait queue
- B.Device queue
- C.Ready queue✓ Correct
- D.Job queue
Explanation
The ready queue contains all processes residing in main memory that are ready and waiting to be assigned to the CPU for execution.
Report an error in this question
Process ManagementMedium
Q19. The long-term scheduler (job scheduler) controls:
- A.Which process gets I/O device access next
- B.Which process gets swapped out to the disk
- C.Which process gets the CPU execution next
- D.Which processes are admitted to the system✓ Correct
Explanation
The long-term scheduler controls which processes are admitted from the job pool to the ready queue, thus controlling the degree of multiprogramming in the system.
Report an error in this question
Process ManagementMedium
Q20. What is the role of the short-term scheduler (CPU scheduler)?
- A.To swap processes between memory and disk
- B.To select which ready process gets the CPU✓ Correct
- C.To admit new jobs into the system queue
- D.To terminate processes that have finished
Explanation
The short-term scheduler selects from among the processes in the ready queue and allocates the CPU to one of them. It runs very frequently (e.g., every 100 milliseconds).
Report an error in this question
Process ManagementHard
Q21. In Chrome's multi-process architecture, what types of processes does it use?
- A.Only renderer display processes
- B.Background and foreground processes
- C.Only a single monolithic process
- D.Browser, renderer, and plug-in processes✓ Correct
Explanation
Chrome uses a multi-process architecture with a browser process (managing UI and I/O), renderer processes (one per website for rendering), and plug-in processes (one per plug-in type) for isolation and stability.
Report an error in this question
Process ManagementHard
Q22. What is the difference between direct and indirect communication in message passing?
- A.Direct names sender/receiver; indirect uses mailboxes✓ Correct
- B.Direct is synchronous only; indirect is asynchronous
- C.Direct uses mailboxes; indirect names each process
- D.There is no difference between the two
Explanation
In direct communication, processes explicitly name each other (send(P, msg)). In indirect communication, messages are sent to and received from mailboxes/ports, allowing multiple processes to share a mailbox.
Report an error in this question
Process ManagementHard
Q23. What is the rendezvous mechanism in synchronous message passing?
- A.A method to forcefully terminate processes
- B.Both sender and receiver block until ready✓ Correct
- C.A strategy for memory allocation
- D.A technique for CPU load balancing
Explanation
In the rendezvous mechanism, both the sender blocks until the receiver receives the message, and the receiver blocks until a message is available. This ensures synchronized communication between processes.
Report an error in this question
Process ManagementHard
Q24. In UNIX, how does the init process (PID 1) handle orphan processes?
- A.It adopts them and collects their exit status✓ Correct
- B.It moves them to a special waiting queue
- C.It terminates orphan processes immediately
- D.It ignores them and frees their resources
Explanation
When a parent terminates, its orphan children are adopted by the init process (PID 1). Init periodically calls wait() to collect exit statuses of these adopted processes, preventing zombie accumulation.
Report an error in this question
Process ManagementHard
Q25. What is a socket in the context of IPC?
- A.A type of distributed file system
- B.A physical hardware port connector
- C.An endpoint defined by IP and port✓ Correct
- D.A special-purpose CPU register set
Explanation
A socket is an endpoint for communication, defined by concatenating an IP address with a port number. Sockets enable communication between processes on different machines over a network.
Report an error in this question
Process ManagementHard
Q26. What is Remote Procedure Call (RPC) in the context of distributed process communication?
- A.A file transfer protocol for distributed systems
- B.Calling a remote procedure as if it were local✓ Correct
- C.A method to restart processes on remote machines
- D.A type of CPU scheduling algorithm for clusters
Explanation
RPC allows a process to call a procedure on a remote machine as if it were a local call. It uses stubs on client and server sides to handle the communication details transparently.
Report an error in this question
Process ManagementHard
Q27. What is the purpose of the medium-term scheduler?
- A.To select the next process for CPU execution
- B.To create new processes from program images
- C.To manage file systems on storage devices
- D.To swap processes in and out of main memory✓ Correct
Explanation
The medium-term scheduler performs swapping - moving processes between main memory and disk. It can reduce the degree of multiprogramming by swapping out processes and later swapping them back in.
Report an error in this question
Process ManagementHard
Q28. In Android, what is a Binder and what role does it play?
- A.A kernel memory allocation system
- B.An IPC framework using shared memory✓ Correct
- C.A CPU scheduler for Android apps
- D.A file management utility tool
Explanation
Android's Binder is a high-performance IPC framework that provides RPC-like functionality using shared memory as the underlying transport mechanism for efficient cross-process communication.
Report an error in this question
Process ManagementHard
Q29. What is the copy-on-write (COW) optimization used with fork()?
- A.Creating a complete full copy of the parent immediately
- B.Parent and child share pages; copy only on modification✓ Correct
- C.Writing all process data to disk before forking begins
- D.Preventing the child process from writing to any memory
Explanation
Copy-on-write allows the parent and child to initially share the same pages in memory. A page is copied only when either process tries to modify it, saving memory and improving fork() performance.
Report an error in this question
Process ManagementHard
Q30. What is the purpose of the vfork() system call?
- A.Child shares parent space; parent suspends until exec✓ Correct
- B.It creates a virtual process with no memory mapping
- C.It is identical to the standard fork() call
- D.It creates a process with higher priority than parent
Explanation
vfork() creates a child process that shares the parent's address space (no copy, not even COW). The parent is suspended until the child calls exec() or exit(), making it efficient when the child will immediately exec().
Report an error in this question