MCQ On OS Process
Q1. The systems which allow only one process execution at a time, are called __________.
- uniprogramming systems
- uniprocessing systems
- unitasking systems
- none of the mentioned
Answer: b, uniprocessing systems
Solution: Those systems which allow more than one process execution at a time are multiprocessing systems. Uniprocessing means only one processor.
Q2. In operating system, each process has its own __________.
- address space and global variables
- open files
- pending alarms, signals and signal handlers
- all of the mentioned
Answer: d, all of the mentioned
Solution: Each process has its own address space (code, data, stack, heap), open files, pending alarms, signals, and handlers.
Q3. A process can be terminated due to __________.
- normal exit
- fatal error
- killed by another process
- all of the mentioned
Answer: d, all of the mentioned
Solution: Processes can terminate normally, due to fatal error, or be killed by another process.
Q4. What is the ready state of a process?.
- when process is scheduled to run after some execution
- when process is unable to run until some task has been completed
- when process is using the CPU
- none of the mentioned
Answer: a, when process is scheduled to run after some execution
Solution: Ready state means the process has all resources needed and is waiting for CPU allocation.
Q5. What is interprocess communication?.
- communication within the process
- communication between two process
- communication between two threads of same process
- none of the mentioned
Answer: b, communication between two process
Solution: IPC allows processes to communicate and synchronize without sharing the same address space.
Q6. A set of processes is deadlock if __________.
- each process is blocked and will remain so forever
- each process is terminated
- all processes are trying to kill each other
- none of the mentioned
Answer: a, each process is blocked and will remain so forever
Solution: Deadlock occurs when each process is blocked, waiting for a resource held by another.
Q7. A process stack does not contain __________.
- Function parameters
- Local variables
- Return addresses
- PID of child process
Answer: d, PID of child process
Solution: Process stack contains parameters, local variables, return addresses, but not child PID.
Q8. Which system call can be used by a parent process to determine the termination of child process?.
- wait
- exit
- fork
- get
Answer: a, wait
Solution: wait() is used by the parent to determine termination and collect child’s exit status.
Q9. A Process Control Block(PCB) does not contain which of the following?.
- Code
- Stack
- Bootstrap program
- Data
Answer: c, Bootstrap program
Solution: PCB contains code, stack, data but not bootstrap program.
Q10. The number of processes completed per unit time is known as __________.
- Output
- Throughput
- Efficiency
- Capacity
Answer: b, Throughput
Solution: Throughput = number of processes completed per unit time.
Q11. The state of a process is defined by __________.
- the final activity of the process
- the activity just executed by the process
- the activity to next be executed by the process
- the current activity of the process
Answer: d, the current activity of the process
Solution: Process state is defined by the current activity of the process.
Q12. Which of the following is not the state of a process?.
- New
- Old
- Waiting
- Running
Answer: b, Old
Solution: There is no state called 'Old'. Valid states are New, Ready, Running, Waiting, Terminated.
Q13. What is a Process Control Block?.
- Process type variable
- Data Structure
- A secondary storage section
- A Block in memory
Answer: b, Data Structure
Solution: PCB is a data structure containing process state, program counter, CPU registers, etc.
Q14. The entry of all the PCBs of the current processes is in __________.
- Process Register
- Program Counter
- Process Table
- Process Unit
Answer: c, Process Table
Solution: All PCBs of current processes are stored in the Process Table.
Q15. What is the degree of multiprogramming?.
- the number of processes executed per unit time
- the number of processes in the ready queue
- the number of processes in the I/O queue
- the number of processes in memory
Answer: d, the number of processes in memory
Solution: Degree of multiprogramming = number of processes in memory.
Q16. A single thread of control allows the process to perform __________.
- only one task at a time
- multiple tasks at a time
- only two tasks at a time
- all of the mentioned
Answer: a, only one task at a time
Solution: A single thread can perform only one task at a time.
Q17. What is the objective of multiprogramming?.
- Have a process running at all time
- Have multiple programs waiting in a queue ready to run
- To increase CPU utilization
- None of the mentioned
Answer: c, To increase CPU utilization
Solution: Objective: maximize CPU utilization by keeping processes ready.
Q18. The child process completes execution, but the parent keeps executing, then the child process is known as __________.
- Orphan
- Zombie
- Body
- Dead
Answer: b, Zombie
Solution: A terminated child whose parent still runs is a Zombie.
Q19. The child process can __________.
- be a duplicate of the parent process
- never be a duplicate of the parent process
- cannot have another program loaded into it
- never have another program loaded into it
Answer: a, be a duplicate of the parent process
Solution: Child process may be a duplicate of parent.
Q20. Which of the following do not belong to queues for processes?.
- Job Queue
- PCB queue
- Device Queue
- Ready Queue
Answer: b, PCB queue
Solution: Queues: Job, Ready, Device exist. PCB queue does not.
Q21. When the process issues an I/O request __________.
- It is placed in an I/O queue
- It is placed in a waiting queue
- It is placed in the ready queue
- It is placed in the Job queue
Answer: a, It is placed in an I/O queue
Solution: I/O requests place process into I/O queue.
Q22. What will happen when a process terminates?.
- It is removed from all queues
- It is removed from all, but the job queue
- Its process control block is de-allocated
- Its process control block is never de-allocated
Answer: a, It is removed from all queues
Solution: On termination, process is removed from all queues.
Q23. What is a long-term scheduler?.
- It selects processes which have to be brought into the ready queue
- It selects processes which have to be executed next and allocates CPU
- It selects processes which heave to remove from memory by swapping
- None of the mentioned
Answer: a, It selects processes which have to be brought into the ready queue
Solution: Long-term scheduler selects jobs into the ready queue.
Q24. What is a medium-term scheduler?.
- It selects which process has to be brought into the ready queue
- It selects which process has to be executed next and allocates CPU
- It selects which process to remove from memory by swapping
- None of the mentioned
Answer: c, It selects which process to remove from memory by swapping
Solution: Medium-term scheduler swaps processes in/out of memory.
Q25. What is a short-term scheduler?.
- It selects which process has to be brought into the ready queue
- It selects which process has to be executed next and allocates CPU
- It selects which process to remove from memory by swapping
- None of the mentioned
Answer: b, It selects which process has to be executed next and allocates CPU
Solution: Short-term scheduler selects next process to execute on CPU.
Q26. The primary distinction between the short term scheduler and the long term scheduler is __________.
- The length of their queues
- The type of processes they schedule
- The frequency of their execution
- None of the mentioned
Answer: c, The frequency of their execution
Solution: Main difference: frequency (short-term is frequent, long-term less frequent).
Q27. The only state transition that is initiated by the user process itself is __________.
- block
- wakeup
- dispatch
- none of the mentioned
Answer: a, block
Solution: Only user-initiated transition is block (e.g., I/O request).
Q28. In a time-sharing operating system, when the time slot given to a process is completed, the process goes from the running state to the __________.
- Blocked state
- Ready state
- Suspended state
- Terminated state
Answer: b, Ready state
Solution: Time slice over ? process moves from Running to Ready.
Q29. In a multiprogramming environment __________.
- the processor executes more than one process at a time
- the programs are developed by more than one person
- more than one process resides in the memory
- a single user can execute many programs at the same time
Answer: c, more than one process resides in the memory
Solution: Multiprogramming: more than one process resides in memory.
Q30. Suppose that a process is in “Blocked” state waiting for some I/O service. When the service is completed, it goes to the __________.
- Running state
- Ready state
- Suspended state
- Terminated state
Answer: b, Ready state
Solution: On I/O completion, process goes from Blocked ? Ready.
Q31. The context of a process in the PCB of a process does not contain __________.
- the value of the CPU registers
- the process state
- memory-management information
- context switch time
Answer: d, context switch time
Solution: PCB context excludes context switch time.
Q32. Which of the following does not interrupt a running process?.
- A device
- Timer
- Scheduler process
- Power failure
Answer: c, Scheduler process
Solution: Schedulers select processes but do not interrupt running processes.