Operating System Process Management Solved MCQs
In this section of Operating System Process Management.it contain Operating System Process Management – Processes MCQs (Multiple Choice Questions Answers).All the MCQs (Multiple Choice Question Answers) requires in detail reading of Operating System subject as the hardness level of MCQs have been kept to advanced level.
It covers the below lists of topics
- Process execution states MCQs
- Process Memory MCQs
- Process Heap,Program counter,Stack,Data section,Text Section MCQs
1.When a program is loaded into the memory and it becomes a process, it can be divided into which of the sections?
- stack
- heap
- text
- data
- 1
- 1,2
- 1,2,3
- 1,2,3,4
D. 1,2,3,4 Explanation :
- stack
- heap
- text
- data
2.Which of the following includes the current activity represented by the value of Program Counter and the contents of the processor's registers.
- stack
- Text
- Data
- Heap
B. Text
3.A process is more than the program code, which is sometimes known as the __________
- text section
- contents of the processor’s registers
- stack
- data section
A. text section
4.____ section is dynamically allocated memory to a process during its run time
- stack
- Text
- Data
- Heap
D. Heap
5.A process's Current Activity is represented by
- program counter
- contents of the processor’s registers
- stack
- data section
- 1
- 1,2
- 1,2,3
- 1,2,3,4
B. 1,2 Explanation :
- program counter
- contents of the processor’s registers
6.A process generally also includes the process ______, which contains temporary data (such as function parameters, return addresses, and local variables)
- text section
- program counter
- stack
- data section
C. stack
7.A process generally also includes the process _____, which contains global variables.
- heap
- program counter
- stack
- data section
D. data section
8.A process may also include a _____, which is memory that is dynamically allocated during process run time
- heap
- program counter
- stack
- data section
A. heap
9.As a process executes, it changes state. The state of a process is defined in part by the current activity of that process. A process may be in one of the following states
- New
- Running
- Waiting
- Ready
- Terminated
- 1,2
- 1.2.3
- 1,2,3,4,5
- 1,2,3,4
C. 1,2,3,4,5 Explanation :
- New
- Running
- Waiting
- Ready
- Terminated
10.Which state of a process defined "The process is being created"
- New
- Running
- Ready
- Waiting
A. New
11.Which state of a process defined "Instructions are being executed"
- New
- Running
- Waiting
- Ready
B. Running
12..Which state of a process defined "The process is waiting for some event to occur (such as an I/O completion or reception of a signal)"
- Ready
- Running
- Waiting
- Terminated
C. Waiting
13.Which state of a process defined "The process is waiting to be assigned to a processor."
- New
- Running
- Waiting
- Ready
D. Ready
14.Which state of a process defined "The process has finished execution"
- Running
- Running
- Ready
- Terminated
D. Terminated
1.Each process is represented in the operating system by a____
- process control block
- printed circuit board
- program control block
- problem control block
A. process control block
2.Process control block (PCB) contains which of the following
- list of open files
- list of open files
- process state
- process number
- All of the above
E. All of the above
3.the address of the next instruction to be executed for the current process is stored in
- CPU registers
- program counter
- process state
- process number
B. program counter
1.The objective of multi programming is
- I. to have some process running at all times.
- II. Single process should run at a time.
- III. to maximize CPU utilization
- IV. to minimize CPU utilization
- I
- II,III
- I,III
- I,IV
C. I,III Explanation :
- to have some process running at all times.
- to maximize CPU utilization
2.For a single-processor system
- I. there will never be more than one running process
- II. if more processes, the rest will have to wait until the CPU is free and can be rescheduled.
- III. it maximize the CPU utilization
- IV. there will be more than one running process
- I, II
- II,III
- I,III
- I,IV
A. I, II Explanation :
- there will never be more than one running process
- if more processes, the rest will have to wait until the CPU is free and can be rescheduled.
3.The processes that are residing in main memory and are ready and waiting to execute are kept on a list called the
- device queue
- ready queue
- job queue
- None of the above
B. ready queue
4.The ready queue is generally stored as a______
- Array
- Stack
- Linked List
- None of the above
C. Linked List
5.Which of the following is True regarding A ready-queue header
- IT contains pointers to the first and final PCBs in the list
- IT contains pointers field that points to the next PCB in the ready queue
- Only A is True
- Both A and B
C. Only A is True Explanation :
6.The list of processes waiting for a particular I/O device is called a________
- device queue
- ready queue.
- job queue
- None of the above
A. device queue
7.Once the process is allocated the CPU and is executing, which of several events could occur:
- i. The process could issue an I/O request and then be placed in an I/O queue
- ii. The process could create a new child process and wait for the child’s termination.
- iii. The process could be removed forcibly from the CPU, as a result of an interrupt, and be put back in the ready queue.
- Only 1
- 1 and 2
- 1, 2,3
- 2 and 3
C. 1, 2,3 Explanation :
8.At which time it is removed from all queues and has its PCB and resources deallocated.
- The process could issue an I/O request and then be placed in an I/O queue
- The process could create a new child process and wait for the child’s termination.
- The process could be removed forcibly from the CPU, as a result of an interrupt, and be put back in the ready queue.
- None of the Above
D. None of the Above
9.For short-term scheduler Which of the following stands True
- i. selects from among the processes that are ready to execute and allocates the CPU to one of them.
- ii. selects processes from mass-storage device (typically a disk) and loads them into memory for execution.
- iii. The short-term scheduler must select a new process for the CPU frequently.
- iv. The short-term scheduler executes much less frequently.
- 1 only
- 2 and 3 only
- 1 ,2 and 4 only
- 1,3 only
D. 1,3 only Explanation :
- selects from among the processes that are ready to execute and allocates the CPU to one of them
- The short-term scheduler must select a new process for the CPU frequently.
10.For Long-term scheduler which of the following stands true
- i. The long-term scheduler executes much less frequently.
- ii. Because of the longer interval between executions, the long-term scheduler can afford to take more time to decide which process should be selected for execution
- iii. Because of the smaller interval between executions, the long-term scheduler can afford to take Less time to decide which process should be selected for execution
- iv. The long-term scheduler executes More frequently.
- 1,2 only
- 1 only
- 1 and 3 only
- 1 ,2 and 3 only
A. 1,2 only Explanation :
- The long-term scheduler executes much less frequently.
- Because of the longer interval between executions, the long-term scheduler can afford to take more time to decide which process should be selected for execution
11.Which of the following is TRUE for An I/O-bound process.
- i. is one that spends more of its time doing I/O
- ii. is one that spends more of its time doing computations.
- iii. If all processes are I/O bound, the ready queue will almost always be empty
- iv. If all processes are I/O bound, the ready queue will almost always be Full
- 1 only
- 1 and 3 only
- 2 and 4 only
- 2 and 3 Only
B. 1 and 3 only Explanation :
- is one that spends more of its time doing I/O
- If all processes are I/O bound, the ready queue will almost always be empty
12.Which of the following is TRUE for CPU bound process?
- i. is one that spends more of its time doing I/O
- ii. is one that spends more of its time doing omputations.
- iii. If all processes are CPU bound, the I/O waiting queue will almost always be empty
- iv. If all processes are CPU bound, the I/O waiting queue will almost always be Full
- 1 only
- 1 and 3 only
- 2 and 3 only
- 2 and 4
C. 2 and 3 only Explanation :
13.Copying a process from memory to disk to allow space for other processes is called
- Swapping
- Deadlock
- Demand Paging
- Page Fault
A. Swapping
14.The process is swapped out of memory, and is later swapped into memory, by the________
- Long-term Scheduler
- Short-term Scheduler
- medium-term scheduler
- None of the Above
C. medium-term scheduler
15.Switching the CPU to another process requires performing a state save of the current process and a state restore of a different process. This task is known as a ____________.
- Swapping
- context switch
- Demand Paging
- Page Fault
B. context switch
1.Most operating systems (including UNIX, Linux, and Windows) identify processes according to a unique __________
- program counter
- process state
- process number
- Process Identifier
D. Process Identifier
2.The init process which always has a pid of
- 0
- 1
- 2
- 3
B. 1
3.When a process creates a new process, two possibilities for execution exist:
- The parent continues to execute concurrently with its children.
- The parent Stop to execute concurrently with its children.
- The parent waits until some or all of its children have terminated.
- The parent do not wait until some or all of its children have terminated.
- 1 and 2
- 2 and 3
- 2 and 4
- 1 and 3
D. 1 and 3
4.When a process creates a new process,There are also two address-space possibilities for the new process:
- The child process is a duplicate of the parent process (it has the same program and data as the parent).
- The child process is a Not duplicate of the parent process (it has not have the same program and data as the parent).
- The child process has a new program loaded into it.
- The child process has a same program loaded into it.
- 2 and 4
- 2 and 3
- 1 and 3
- 1 and 4
C. 1 and 3
5.The new process consists of a copy of the ____ of the original process. This mechanism allows the parent process to communicate easily with its child process
- address space
- process state
- process number
- Process Identifier
A. address space
6.Both processes (the parent and the child) continue execution at the instruction after the fork(), with one difference: the return code for the fork() is ______ for the new (child) process, whereas the _____ process identifier of the child is returned to the parent
- Negative integer, Zero
- Zero, Negative integer
- nonzero integer, Zero
- Zero, nonzero integer
D. Zero, nonzero integer
7.Creating a separate process using the UNIX _______system call.
- fork
- init
- exec
- wait
A. fork
8.After a fork() system call, one of the two processes typically uses the _____ system call to replace the process’s memory space with a new program.
- exit
- init
- exec
- wait
C. exec
9.The parent can create more children; or, if it has nothing else to do while the child runs, it can issue a ____system call to move itself off the ready queue until the termination of the child
- exit
- exit
- exec
- wait
D. wait
10.Processes are created in the Windows API using the ______ function, which is similar to fork() in that a parent creates a new child process.
- CreateProcess()
- InitiateProcess()
- StartProcess()
- None of the above
A. CreateProcess()
11..A process terminates when it finishes executing its final statement and asks the operating system to delete it by using the ___ system call.
- wait()
- exit()
- forck()
- exec()
B. exit()
12.A parent may terminate the execution of one of its children for a variety of reasons, Which of the following is true:
- The child has exceeded its usage of some of the resources that it has been allocated.
- The task assigned to the child is no longer required.
- The parent is exiting, and the operating system does not allow a child to continue if its parent terminates.
- 1 only
- 1 and 2 only
- 2 and 3 only
- all of the above
D. all of the above
13.A process that has terminated, but whose parent has not yet called wait(), is known as a ___ process.
- zombie
- orphans
- terminated
- None of the above
A. zombie
14.if a parent did not invoke wait() and instead terminated, thereby leaving its child processes as it is ,the child process is known as ___
- zombie
- orphans
- terminated
- None of the above
B. orphans
15.When a process creates a new process using the fork() operation, which of the following states is shared between the parent process and the child process?
- Stack
- Heap
- Shared memory segments
- None of the above
C. Shared memory segments
1.Which are two fundamental models of interprocess communication:
- shared memory
- message passing.
- independent
- cooperating
- 1,2
- 2,3
- 3,4
- 1,4
A. 1,2
2.Which of the following is True for Shared Memory and message passing interprocess communicatoin.
I. In the shared-memory model, a region of memory that is shared by cooperating processes is established.
II. In the message-passing model, communication takes place by means of messages exchanged between the cooperating processes
III. Message passing is useful for exchanging Biger amounts of data, because no conflicts need to be avoided.
IV. Message passing is also Difficult to implement in a distributed system than shared memory.
V. Shared memory can be faster than message passing, since message-passing systems are typically implemented using system calls
I. In the shared-memory model, a region of memory that is shared by cooperating processes is established.
II. In the message-passing model, communication takes place by means of messages exchanged between the cooperating processes
III. Message passing is useful for exchanging Biger amounts of data, because no conflicts need to be avoided.
IV. Message passing is also Difficult to implement in a distributed system than shared memory.
V. Shared memory can be faster than message passing, since message-passing systems are typically implemented using system calls
- 1 2 3 only
- 1 2 5 only
- 2 3 4 only
- 1 3 4 only
B. 1 2 5 only
3.In producer–consumer problem using shared memory ,Select appropriate statement from the below.
- we must have available a buffer of items that can be filled by the producer and emptied by the consumer
- A producer can consume one item while the consumer is producing another item
- No synchronization required between The producer and consumer , so that the consumer does not try to consume an item that has not yet been produced.
- the buffer will reside in a region of memory that need not be to shared by the producer and consumer processes.
A. we must have available a buffer of items that can be filled by the producer and emptied by the consumer Explanation :
4.Using producer–consumer problem using Shared Memory Interprocess Communication using Unbounded Buffer:
- There is Limit on the size of the buffer.
- Assumes a fixed buffer size.
- the consumer must wait if the buffer is empty, and the producer must wait if the buffer is full
- There is no practical limit on the size of the buffer. The consumer may have to wait for new items, but the producer can always produce new items
D. There is no practical limit on the size of the buffer. The consumer may have to wait for new items, but the producer can always produce new items Explanation :
5.Using producer–consumer problem using Shared Memory Interprocess Communication using Bounded Buffer:
- There is Limit on the size of the buffer.
- There is a fixed buffer size
- The consumer must wait if the buffer is empty, and the producer must wait if the buffer is full
- There is no practical limit on the size of the buffer. The consumer may have to wait for new items, but the producer can always produce new items.
- B and C
E. B and C Explanation :
6.Message passing provides a mechanism to allow processes to communicate and to synchronize their actions
- By sharing the same address space
- without sharing the same address space
- by sharing the same process number and Process Identifier
- None of the above
B. without sharing the same address space
7.In Message-Passing Systems of Interprocess Communication
- Messages sent by a process can be either fixed or variable in size.
- Messages sent by a process can be fixed in size
- Messages sent by a process can be variable in size
- None of the above
A. Messages sent by a process can be either fixed or variable in size.
8.In Message-Passing Systems ,A message-passing facility provides at least two operations:
- send(message) and delete(message)
- delete(message) and receive (message)
- send(message) and receive(message)
- write(message) and delete(message)
C. send(message) and receive(message)
9.Under direct communication, each process P and Q that wants to communicate must explicitly name the recipient or sender of the communication. In this scheme, which of the following primitives are required:
- send(P, message)-Send a message to process P.
- receive(Q, message)-Receive a message from process Q..
- receive(id, message)-Receive a message from any process.
- send(id, message)-Send a message to any process
- 1 and 3
- 2 and 4
- 3 and 4
- 1 and 2
D. 1 and 2
10.Under direct communication, when asymmetry in addressing scheme is employed. the send() and receive() primitives are defined as follows:
- send(P, message)-Send a message to process P.
- receive(Q, message)-Receive a message from process Q..
- receive(id, message) - Receive a message from any process.
- send(id, message) - Send a message to any process
- 1 and 3
- 2 and 4
- 3 and 4
- 1 and 2
A. 1 and 3
1.Thread shares with other threads belonging to the same process its
- thread ID
- program counter
- register set and a stack
- code section and data section
D. code section and data section
2.A process can be
- single threaded
- multithreaded
- both single threaded and multithreaded
- none of the above
C. both single threaded and multithreaded
3.User threads
- are supported above the kernel and are managed without kernel support
- are supported below the kernel and are managed without kernel support
- are supported above the kernel and are managed with kernel support
- are supported below the kernel and are managed with kernel support
A. are supported above the kernel and are managed without kernel support
4.kernel threads
- Cannot be supported and managed directly by the operating system
- can be supported and managed directly by the operating system
- are supported below the kernel and are managed without kernel support
- None of the above
A. Cannot be supported and managed directly by the operating system
5.Which of the following Multithreading model maps many user-level threads to one kernel thread.
- Many to One model
- One to Many model
- Many to Many model
- One to One model
A. Many to One model
6.which of the following Multithreading model ,The entire process will block if a thread makes a blocking system call.
- Many to One model
- One to Many model
- Many to Many model
- One to One model
A. Many to One model
7.Which of the following Multithreading model,only one thread can access the kernel at a time, multiple threads are unable to run in parallel on multicore systems
- Many to One model
- One to Many model
- Many to Many model
- One to One model
A. Many to One model
8.Which of the following Multithreading model maps each user thread to a kernel thread?
- Many to One model
- One to Many model
- Many to Many model
- One to One model
D. One to One model
9.Which of the following Multithreading model provides more concurrency than the many-to-one model by allowing another thread to run when a thread makes a blocking system call.
- Many to One model
- One to Many model
- Many to Many model
- One to One model
D. One to One model
10.Which of the following Multithreading model also allows multiple threads to run in parallel on multiprocessors
- Many to One model
- One to Many model
- Many to Many model
- One to One model
D. One to One model
11.Which of the following Multithreading model has drawback "that creating a user thread requires creating the corresponding kernel thread".
- Many to One model
- One to Many model
- Many to Many model
- One to One model
D. One to One model
12.Which of the following Multithreading model multiplexes many user-level threads to a smaller or equal number of kernel threads?
- Many to One model
- One to Many model
- Many to Many model
- One to One model
C. Many to Many model
13.Which of the following components of program state are shared across threads in a multithreaded process?
- Register values
- Heap memory
- Global variables
- Stack memory
- B and C
E. B and C Explanation :
Post a Comment