# Test: Introduction, Process, Threads & CPU Scheduling- 2

## 15 Questions MCQ Test GATE Computer Science Engineering(CSE) 2023 Mock Test Series | Test: Introduction, Process, Threads & CPU Scheduling- 2

Description
Attempt Test: Introduction, Process, Threads & CPU Scheduling- 2 | 15 questions in 45 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study GATE Computer Science Engineering(CSE) 2023 Mock Test Series for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
QUESTION: 1

### The only state transition that is initiated by the user process itself is

Solution:

The only state transition that is initiated by user process itself is block.

QUESTION: 2

### Pre-emptive scheduling, is the strategy of temporarily suspending a running process

Solution:

In pre-emptive scheduling suspanding temporarily a running process is done before the CPU time slice expires.

QUESTION: 3

### In Round Robin CPU scheduling, as the time quantum is increased, the average turn around time

Solution:

The Round Robin CPU scheduling technique will become insignificance if the time slice is very small or very large. When it is large it acts as FIFO which does not have a fixed determination over the turn around time. If processes with small burst arrived earlier turn around time will be less else it will be more.

QUESTION: 4

Suppose that a process spends a fraction p of its time in I/O wait state. With n processes in memory at once, the probability that all n processes are waiting for I/O is

Solution:

Considering that a process spends a fraction p of its time in I/O wait state. As n processes are there is memory at once, then Probability that all n processes are waiting for I/O = p x p x p x ... p (n times) = pn
Note: Moreover, the CPU utilization is given by the formula CPU utilization = 1 - pn.

QUESTION: 5

In a multi-user operating system, 20 requests are made to use a particular resource per hour, on an average. The probability that no requests are made in 45 minutes is

Solution:

The arrival pattern is a Poission distribution.

QUESTION: 6

In which of the following scheduling policies doe context switching never take place?
1. Round-robin
2. Shortest job first(non pre-emptive)
3. Pre-emptive
4. First-cum-first-served

Solution:

Context switching takes place when a process is preempted (forcefully) and another process goes into the running state. In FIFO and SJF (non- preemptive) techniques, the processes finishes their execution then only their context is switched to other processes.

QUESTION: 7

Which of the following is the most suitable scheduling scheme in a real-time operating system?

Solution:

In preemptive scheduling the process with higher priority is executed first and then next higher process with least priority is executed after the higher priority processes are executed, if occured simultaneously. This is the ideal technique to be used in real time O.S. in which critical or higher priority processes are to be entertained first.

QUESTION: 8

Which of the following scheduling algorithms gives minimum average waiting time?

Solution:

SJF will gives minimum average waiting time. SJF ensures that all smaller processes will finish first. So, less processes will be waiting since more smaller processes will end up in less number of time. Use processes waiting means less waiting time overall which will decrease the average waiting time.

QUESTION: 9

A process executes the following code:

The total number of child processes created is

Solution:

A fork () call creates the child processes for the following loop creates 2n - 1 child processes, excluding the parent process. And including parent it is 2n.

QUESTION: 10

While designing a kernel, an operating system designer must decide whether to support kernel- level or user-level threading. Which of the following statements is/are true?
1. Kernel-level threading may be preferable to user-level threading because storing information about user-level threads in the process control block would create a security risk.
2. User-level threading may be preferable to kernel-level threading because in user-level threading, if one thread blocks on I/O, the process can continue.

Solution:

Kernel level threading may be preferrable to user level threading because storing information about user level thread in a PCB would create a security risk i.e. with each access to the non-critical services. We are going to the domain where both critical and non-critical services are residing. Any harm in this domain may creates problems to the critical services. Hence Kernel level threading is preferable.

QUESTION: 11

Which of the following should be allowed only in Kernel mode?
1. Changing mapping from virtual to physical address.
3. Disabling all interrups

Solution:

Only critical services must resides in the kernel. All services mentioned except reading status of processors and reading time of the day are critical.

QUESTION: 12

Consider the following statements with respect to user-level threads and Kernel-supported threads
(i) Context switching is faster with Kernel- supported threads.
(ii) For user-level threads, a system call can block the entire process.
(iii) Kernel-supported threads can be scheduled independently.
(iv) User-level threads are transparent to the Kernel.
Which of the above statements are true?

Solution:

Kernel level threads can be scheduled independently. For user level threads a system call can block the entire process and are not transparent to Kernel.

QUESTION: 13

Consider the following statements about user level threads and kernel level threads. Which one of the following statements is FALSE?

Solution:
• User level threads are not recognised by operating system, hence do not need any hardware support. Since, user level threads are not recognised by operating system, no separate PCB (Process Control Block) information is to stored. Hence, context switching is faster.
• Since, Kernel level threads are like separate processes. So, blocking one thread will not block other threads.
QUESTION: 14

Which of the following algorithms favour CPU bound processes?
1. Round-robin
2. Rirst-come-first-served
3. Multilevel feedback queues

Solution:

Only FCFS and non-preempting algorithms favour CPU bound processes.

QUESTION: 15

Consider a system contains two types of processes CPU bound processes and I/O bound processes, what will be the sufficient condition when ready queue becomes empty.

Solution:

It all the processes are I/O bound, they will go or reside into BLOCKED state and hence READY QUEUE becomes empty.

 Use Code STAYHOME200 and get INR 200 additional OFF Use Coupon Code