Process and Thread MCQ Quiz - Objective Question with Answer for Process and Thread - Download Free PDF
Last updated on May 6, 2025
Latest Process and Thread MCQ Objective Questions
Process and Thread Question 1:
While scheduling processes, which of the following controls the degree of multiprogramming (the number of processes in memory)?
Answer (Detailed Solution Below)
Process and Thread Question 1 Detailed Solution
Answer: Option 2
Concept:
Long term scheduler:
- Long term scheduler is also called a job scheduler. Long term scheduler determines which programs are admitted to the system for processing. Job scheduler selects processes from the process queue and loads them into memory for execution (new to ready state).
- The primary objective of the job scheduler is to provide a balanced mix of jobs, such as I/O bound and processor bound.
- It also controls the degree of multiprogramming.
- If the degree of multiprogramming is stable, then the average rate of process creation must be equal to the average departure rate of processes leaving the system.
Additional Information
Process scheduling is the activity of selecting one process from ready state for scheduling it on the running state. Process scheduling process:
Three types of schedulers are there in this process:
- Short term scheduler: It changes the state of processes from ready to running. It moves one of the process from ready state to running state.
- Long term scheduler: It selects processes from the queue and loads them into memory for execution.
- Mid-term scheduler: It is the process of swapping. It removes processes from memory and makes space for other processes.
Dispatcher: Dispatcher helps in allocation of CPU to the processes.
Process and Thread Question 2:
The main function of the dispatcher (the portion of the process scheduler) is:
Answer (Detailed Solution Below)
Process and Thread Question 2 Detailed Solution
The correct answer is assigning ready process to the CPU.
- The dispatcher is a crucial component of the process scheduler in an operating system.
- Its primary role is to assign a ready process to the CPU, ensuring efficient process management and CPU utilization.
- When a process is in the ready state, the dispatcher switches it to the running state by loading its context into the CPU.
- This context switch involves saving the state of the current process and loading the state of the next process.
- Swapping a process to the disk: This is a function of memory management, not the dispatcher. It involves moving a process from main memory to disk (swap space) to free up memory.
- Suspending some of the processes when the CPU load is high: This is part of process management and load balancing but not specifically the dispatcher's role. It involves moving processes to a suspended state to manage CPU load.
- Bring processes from the disk to the main memory: This is also a memory management function, often handled by the swapper or pager, not the dispatcher.
Process and Thread Question 3:
In Kernel I/O Subsystem, A _____________ is a buffer that holds jobs for a device until it is ready to take them.
Answer (Detailed Solution Below)
Process and Thread Question 3 Detailed Solution
The correct answer is option 3.
Concept:
Many I/O services are provided by the kernel. Caching, scheduling, spooling, device reservation, and error handling are all tasks provided by the kernel that rely on the hardware and device driver infrastructure.
- A spooling is a type of buffer that holds the jobs for a system until the system is ready to accept the jobs.
- Spooling considers discs to be a huge buffer capable of holding as many jobs as the device requires until the output devices are ready to accept them.
- Spooling allows a user to view and, if desired, delete specific data streams.
Hence the correct answer is Spooling.
Additional InformationCaching:
Caching involves storing a replica of data in a location that is easier to reach than the original.
Buffering:
The buffer is a section of main memory used to temporarily store or keep data sent between two devices or between a device and an application.
Process and Thread Question 4:
Which of the following are not shared by the threads of the same process?
(a) Stack
(b) Registers
(c) Address Space
(d) Message Queue
Answer (Detailed Solution Below)
Process and Thread Question 4 Detailed Solution
- A thread is a lightweight process that can be managed independently by a scheduler.
- A message queue is a linked list of messages stored within the kernel and identified by a message queue identifier.
- Threads share the code and data segments and the heap, but they don't share the stack and registers. Message queue comes under data and therefore it is shared by thread.
- Threads of the same process don’t share stack and register, hence option 3 is correct
Process and Thread Question 5:
Which one of the following cannot be scheduled by the kernel ?
Answer (Detailed Solution Below)
Process and Thread Question 5 Detailed Solution
The correct answer is User level thread.
Key Points
- A user level thread is managed by a user-level library and not directly by the kernel.
- The kernel is not aware of the user-level threads, it schedules the process as a whole.
- Since user-level threads are managed in the user space, the kernel does not have visibility or control over them.
- Context switching between user-level threads is faster because it does not involve kernel mode.
- User-level threads provide better performance for applications that do not require frequent blocking system calls.
- Examples of user-level thread libraries include POSIX Threads (Pthreads) and Java Threads.
Additional Information
- User-level threads can be scheduled independently of the kernel, which can lead to better performance in certain scenarios.
- However, one of the drawbacks is that if a user-level thread performs a blocking operation, the entire process is blocked.
- Kernel-level threads, on the other hand, are managed and scheduled directly by the kernel, which allows for better handling of blocking operations.
- Hybrid threading models combine the advantages of both user-level and kernel-level threads.
- Examples of hybrid threading models include the Solaris operating system, which uses lightweight processes (LWPs) that are visible to the kernel.
Top Process and Thread MCQ Objective Questions
The processes that are residing in main memory and are ready and waiting to be executed, are kept on a list called
Answer (Detailed Solution Below)
Process and Thread Question 6 Detailed Solution
Download Solution PDFThe correct answer is Ready queue
Key PointsProcess scheduling queue or simply process queue are
- Job queue: It is the queue that keeps all the processes in the system.
- Ready queue: It is the queue that keeps a set of all processes residing in main memory, ready and waiting to execute. A new process is always put in this queue.
- Device queues: It is the processes which are blocked due to unavailability of an I/O device constitute this queue.
∴ The answer is ready queue.
Copying a process from memory to disk to allow space for other processes is called _________.
Answer (Detailed Solution Below)
Process and Thread Question 7 Detailed Solution
Download Solution PDFConcept:
Swapping is a technique of temporarily removing the inactive program from the memory of a system to allow space for other processes.
Explanation:
It moves the process from the main memory when it is blocked and deallocating the memory. This free memory is allocated to the other processes. When a process is swapped out, its executable copy is copied to the secondary memory. When the process is swapped back into the available main memory, the executable image that was swapped out is copied into the new block allocated by the memory manager.
Diagram:
The maximum number of processes that can be in Ready state for a computer system with n CPUs is:
Answer (Detailed Solution Below)
Process and Thread Question 8 Detailed Solution
Download Solution PDFImportant Points
The size of the ready queue doesn’t depend on the number of processes. A single processor system may have a large number of processes waiting in ready queue
Additional Information
Transition Diagram:
Important Points:
n CPUs → maximum n process in running state
A thread is also called:
Answer (Detailed Solution Below)
Process and Thread Question 9 Detailed Solution
Download Solution PDFConcept
Threads are sometimes called lightweight processes because they have their own stack but can access shared data. Because threads share the same address space as the process and other threads within the process, the operational cost of communication between the threads is low, which is an advantage.
Important Points:
Multiple threads of the same process share other resources of process except register, stack and stack pointer. In particular, a process is generally considered to consist of a set of threads sharing an address space, heap, static data, code segments and file descriptors.
Thread of the same process doesn't share program counter (register), stack, registers
Which of the following types of operating systems is non- interactive?
Answer (Detailed Solution Below)
Process and Thread Question 10 Detailed Solution
Download Solution PDFKey Points
Batch Operating System does not interact with the computer directly. There is an operator which takes similar jobs having the same requirement and group them into batches. It is the responsibility of the operator to sort jobs with similar needs.
Hence the correct answer is the Batch processing operating system.
The Kernel is _______ user-level threads.
Answer (Detailed Solution Below)
Process and Thread Question 11 Detailed Solution
Download Solution PDFThe correct option is (3)
unaware of
Concept:-
The kernel is unaware of the user-level threads because they are implemented at the user level.
Key Points
- User-level threads can be created and managed more quickly. It takes longer to create and manage threads at the kernel level. At the user level, implementation is handled by a thread library.
- Operating systems of this type that do not allow kernel-level threads can nonetheless use user-level threads. It is more effective and quicker.
- The kernel is the core component of an operating system for a computer (OS). All other components of the OS rely on the core to supply them with essential services.
- Like processes and interrupt handlers, kernel threads are kernel entities that the system scheduler manages.
- Although it executes within a process, a kernel thread is accessible to all other threads running on the system.
- Examples: Java threads, POSIX threads, etc. The user threads can be more easily implemented than the kernel thread.
How many states can be processed in operating system?
Answer (Detailed Solution Below)
Process and Thread Question 12 Detailed Solution
Download Solution PDFThe correct answer is option 1.
Concept:
Process States in Operating System:
The process executes when it changes the state. The state of a process is defined by the current activity of the process.
The operating system's processes can be in any of the following conditions:
NEW:
The process is being created.
READY:
The process is waiting to be assigned to a processor.
RUNNING:
Instructions are being executed.
WAITING:
The process is waiting for some event to occur(such as an I/O completion or reception of a signal).
TERMINATED:
The process has finished execution.
Hence the correct answer is 5.
The process of jointly establishing communication is called ______.
Answer (Detailed Solution Below)
Process and Thread Question 13 Detailed Solution
Download Solution PDFThe correct answer is Handshaking
Additional Information
It is the process that establishes communication between two networking devices.
Example:
Two computers first connect with each other through modems, the handshaking process determines
Hence Handshaking is the correct option.
The program in the operating system that does processor management is called _______.
Answer (Detailed Solution Below)
Process and Thread Question 14 Detailed Solution
Download Solution PDFThe correct option is (1)
Traffic controller
Concept:-
In a multiprogramming environment, the operating system determines which processes receive processor time and for how long. Process scheduling is the name for this function. For processor management, an operating system performs the following tasks:
- The primary goal of the Traffic controller is to coordinate and control the actions of hardware and software in the C.P.U.
- Keep track of the processor and the process's state. The traffic controller is the program that is in charge of this task.
- Allocates the processor (CPU) to a process.
- De-allocates processor when a process is no longer required.
Key Points
- After the scheduler, the dispatcher is finished. It assigns CPU control to the process chosen by the short-term scheduler. The dispatcher assigns CPU to the process when it has been chosen.
- Process scheduling is the action of process management, which involves removing a running process from the CPU and selecting a new process based on a set of rules.
- The new process is brought to the 'Ready State' by a long-term or job scheduler. It regulates the Degree of Multi-programming or the number of processes that are ready at any given time.
With respect to operating systems, which of the following is NOT a valid process state?
Answer (Detailed Solution Below)
Process and Thread Question 15 Detailed Solution
Download Solution PDFProcess States:
Each process goes through different states in its life cycle,
- New (Create) – In this step, the process is about to be created but not yet created, it is the program that is present in secondary memory.
- Ready – New -> Ready to run. After the creation of a process, the process enters the ready state. i.e. the process is loaded into the main memory
- Run – The process is chosen by CPU for execution and the instructions within the process are executed by any one of the available CPU cores.
- Blocked or wait – Whenever the process requests access to I/O or needs input from the user or needs access to a critical region it enters the blocked or wait state.
- Terminated or completed – Process is killed as well as PCB is deleted.
Hence the correct answer is Starving.