Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  GATE Computer Science Engineering(CSE) 2025 Mock Test Series  >  Test: Operating System - 1 - Computer Science Engineering (CSE) MCQ

Test: Operating System - 1 - Computer Science Engineering (CSE) MCQ


Test Description

10 Questions MCQ Test GATE Computer Science Engineering(CSE) 2025 Mock Test Series - Test: Operating System - 1

Test: Operating System - 1 for Computer Science Engineering (CSE) 2024 is part of GATE Computer Science Engineering(CSE) 2025 Mock Test Series preparation. The Test: Operating System - 1 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Operating System - 1 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Operating System - 1 below.
Solutions of Test: Operating System - 1 questions in English are available as part of our GATE Computer Science Engineering(CSE) 2025 Mock Test Series for Computer Science Engineering (CSE) & Test: Operating System - 1 solutions in Hindi for GATE Computer Science Engineering(CSE) 2025 Mock Test Series course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Operating System - 1 | 10 questions in 30 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study GATE Computer Science Engineering(CSE) 2025 Mock Test Series for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Operating System - 1 - Question 1

Consider a system having 20 resources of same type. These resources are shared by 4 process which have peak demands of 4, 5, x, y respectively. What is the maximum value of x + y to ensure that there will be no deadlock in the system?

Detailed Solution for Test: Operating System - 1 - Question 1

Given:

20 resources of same type.

Four processes with demand of 4, 5, x, y respectively.

So, (4 - 1) + (5 - 1) + (x -1) + (y -1) + 1 = 20

3 + 4 + x – 1 + y – 1 + 1 = 20

7 + x – 1 + y = 20

x + y + 7 = 21

x + y = 14

Maximum value of x + y so that there will be no deadlock in system = 14.

Test: Operating System - 1 - Question 2

At time 0, an OS with round-robin scheduling (time quantum = 5 units) has 5 processes P1, P2, P3, P4, P5 with burst times 15, 10, 20, 5, 15 respectively. What is the average turn-around time?

Detailed Solution for Test: Operating System - 1 - Question 2

The round-robin (RR) scheduling algorithm is designed especially for timesharing systems.

It is similar to FCFS scheduling, but preemption is added to enable the system to switch between processes.

A small unit of time, called a time quantum or time slice, is defined.

The ready queue is treated as a circular queue. The CPU scheduler goes around the ready queue, allocating the CPU to each process for a time interval of up to 1-time​ quantum.

Time quantum = 5 units

Gantt Chart:

Calculations

 

Average turn around time = 20 + 35 + 50 + 60 + 65 / 5 = 46

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Operating System - 1 - Question 3

Consider the following scenario: A, B, C, D are processes and X, Y are resources used by the processes.

If Resources available: [X: 40 Y: 40] then what will be a safe sequence so that the processes complete execution without deadlock?

Detailed Solution for Test: Operating System - 1 - Question 3

Data:

Remaining Need(X) = (max-needs-X) – (has-X)

Remaining Need(Y) = (max-needs-Y) – (has-Y)

Calculation:

Available resource of X = 40

Available resource of Y = 40

Sequence: ACDB

Need of A(30, 30) ≤ available of (40, 40)

A is executed and release the resource held by it

Available of X = 40 + 35 = 75

Available of Y = 40 + 10 = 55

Available of (X, Y) = (75, 55)

Need of C(75, 30) ≤ available of (75, 55)

Also Need of D(X, Y) ≤ available of (X, Y)

Taking C first (as an exercise take D and solve)

C is executed and release the resource held by it

Available of X = 75 + 35 = 110

Available of Y = 55 + 20 = 75

Available of (X, Y) = (110, 75)

Need of D(50, 20) ≤ available of (110, 75)   // B won't be satisfied

D is executed and release the resource held by it

Available of X = 110 + 0 = 110

Available of Y = 75 + 70 = 145

Available of (X, Y) = (110, 140)

Need of B(50, 140) ≤ available of (110, 140)

B is executed and release the resource held by it

Available of X = 110 + 50 = 160

Available of Y = 145 + 140 = 285

Available of (X, Y) = (160, 2885)

∴ safe sequence is ACDB

Similarly, safe sequence is ADCB

Test: Operating System - 1 - Question 4

Which of the following is/are not true about the deadlock scheme?

I.  In deadlock avoidance, number the resource uniquely and never requests a lower-numbered resource

II. In deadlock avoidance, the request for the resources is always granted if the resulting state is safe.

III. In deadlock prevention, never request a resource after releasing any resource.

Detailed Solution for Test: Operating System - 1 - Question 4

Statement I: not true (False)

In deadlock prevention, number the resource uniquely and never requests a lower-numbered resource

Statement II:  True

In deadlock avoidance, the request for the resources is always granted if the resulting state is safe.

Statement IIiI not true (False)

In deadlock prevention, the request can be made after releasing the resource

Statement I and III are not true

Test: Operating System - 1 - Question 5

Consider a shared variable with initial value 10, this shared variable is used by four concurrent processes A, B, C and D. Process A reads the shared variable and decrements it by two and process B reads the shared variable and increment it by three before writing it to the memory. Process C reads the shared variable and decrement it by three while process D reads the shared variable and increment it by two before writing it to the memory. All the process before reading the value performs the wait operation on a counting semaphore variable S and after writing it to the memory, a signal operation is performed before the processes get terminated. Find the minimum possible value of the shared variable in the memory if S is 2?

Detailed Solution for Test: Operating System - 1 - Question 5

Concepts:

V(S): Signal will increment the semaphore variable, that is, S++. 

P(S): Signal will decrement the semaphore variable., that is, S--. 

Data:

Shared variable = x = 10

Counting semaphore = S = 2

Calculation:

If Process A is executed completely

x = 10 – 2 = 8

and S = 2

Process C reads the value and decrement it by 3

x = 8 – 3 = 5

S = 1

Note that still process C doesn’t write it to memory

If Process B is executed completely

x = 8 + 3 = 11

S = 1

If Process D is executed completely

x = 11 + 2 = 13

S = 1

Now, C writes the value x = 5

∴ minimum possible value is 5.

Test: Operating System - 1 - Question 6

Consider a counting semaphore S. The operation P(S) performs the operation S = S – 1 and operation V(S) performs the operation V = V + 1. During program execution, 13P and 5V operation is performed in the some order. Find the number of processes in a blocked state with initial counting semaphore value 1.

Detailed Solution for Test: Operating System - 1 - Question 6

Concepts:

V(S): Signal will increment the semaphore variable, that is, S++. 

P(S): Signal will decrement the semaphore variable., that is, S--. 

Data:

Initial counting semaphore = x = 1

Signal operation = 11 V

Wait operation = 17 P

n process in blocked state

Final counting semaphore (F) = -n

Formula:

n = x + 13P + 5V

Calculation:

n = 1 + 13(-1) + 5(+1)

∴ n = -7

∴ number of process in blocked state is 7

Test: Operating System - 1 - Question 7

Consider six memory partitions of size 250KB, 470KB, 600 KB, 500 KB, 300KB, and 410 KB where KB refers to kilobyte. These partitions need to be allotted to four processes of sizes 350 KB, 200 KB , 468 KB and 480 KB in that order. Which partitions are not allotted to any process when we use best fit and worst fit algorithm?

Detailed Solution for Test: Operating System - 1 - Question 7

Concept:

Best fit algorithm: In this method, algorithm searches the complete list of partitions and then chooses the smallest hole in which process can fit with minimum internal fragmentation.

Worst fit algorithm: In this method, algorithm searches the complete list of partitions and then chooses the largest hole in which process can fit with maximum internal fragmentation.

Given partitions are:

250KB, 470KB, 600 KB, 500 KB, 300KB, and 410 KB

Processes are: 350 KB, 200 KB, 468 KB and 480 KB

Using best fit policy:

Using worst fit policy:

Using worst fit, one process cannot be allocated any partition. 

Test: Operating System - 1 - Question 8

A computer uses 48 bits Virtual Address Space, 256 GB of physical memory with page size of 4 KB. The page table size is 4 bytes and if each entry fits in a single page the number of levels of paging required is _____.

Detailed Solution for Test: Operating System - 1 - Question 8

Data:

Virtual address space (VAS) = 48 bits

Virtual memory (VA) = 248 Byte

Physical Memory (PA) = 256 GB

Page size (PS) = 4 KB = 212 B

Page Table size (PTS) = 4 bytes

Formula:

pagetablesize=VAPS×PTS

Calculation:

The number of levels of paging required is 4.

Important Points:

If page table size (PTS) is less than or equal to page size, then page table can be stored in that level.

Test: Operating System - 1 - Question 9

 demand - paging uses a TLB (Translation Look - aside Buffer) and single level page table stored in main memory. The memory access time is 5 μs and the page fault service time is 25 ms. If 70% of access is in TLB with no page fault and of the remaining, 20% is not present in main memory. The effective memory access time in ms is _________. (Write answer up to two decimal places)

Detailed Solution for Test: Operating System - 1 - Question 9

EAT = ht (tt + tm) + (1 – ht) [p * (tt + (n + 1) tm) + (1 – p) = td]

= 0.7 * (0 + 5 μs) + 0.3 * [0.8(0 + 2 * 5 μs) + 0.2 * 25 ms]

= 3.5 μs + 0.3 * [8 μs + 5000 μs]

= 1505.9 μs = 1.5 ms

Test: Operating System - 1 - Question 10

Which of the following is/are TRUE about user-level threads and kernel-level threads?

Detailed Solution for Test: Operating System - 1 - Question 10

Option 1: TRUE:

If a user-level thread block then entire process will get blocked

Option 2: FALSE

Kernel level threads are independent that is why they also require more context switch than user – level threads.

Option 3: TRUE

Every thread has its own register and stack

Option 4: TRUE

Communication between multiple threads is easier, as the threads shares common address space. while in process we have to follow some specific communication technique for communication between two process.

55 docs|215 tests
Information about Test: Operating System - 1 Page
In this test you can find the Exam questions for Test: Operating System - 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Operating System - 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)