adplus-dvertising

Welcome to the Operating System MCQs Page

Dive deep into the fascinating world of Operating System with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Operating System, a crucial aspect of GATE CSE Exam. In this section, you will encounter a diverse range of MCQs that cover various aspects of Operating System, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within GATE CSE Exam.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Operating System. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of GATE CSE Exam.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Operating System. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Operating System MCQs | Page 15 of 16

Q141.
Processes P1 and P2 use critical_flag in the following routine to achieve mutual exclusion. Assume that critical_flag is initialized to FALSE in the main program.

get_exclusive_access ( ) { if (critical _flag == FALSE) { critical_flag = TRUE ; critical_region () ; critical_flag = FALSE; } }

Consider the following statements.
i. It is possible for both P1 and P2 to access critical_region concurrently.
ii. This may lead to a deadlock.
Which of the following holds?
Discuss
Answer: (c).(i) is true and (ii) is false
Q142.
An operating system implements a policy that requires a process to release all resources before making a request for another resource. Select the TRUE statement from the following:
Discuss
Answer: (b).Starvation can occur but deadlock cannot occur
Q143.
If the time-slice used in the round-robin scheduling policy is more than the maximum time required to execute any process, then the policy will
Discuss
Answer: (c).degenerate to first come first serve
Q144.
Consider the following C code for process P1 and P2. a=4, b=0, c=0 (initialization)
P1 P2
if (a < 0) b = 10;
c = b-a; a = -3;
else
c = b+a;
If the processes P1 and P2 executes concurrently (shared variables a, b and c), which of the following cannot be the value of ‘c’ after both processes complete?
Discuss
Answer: (c).10
Discuss
Answer: (c).Never request a resource after releasing any resource
Discuss
Answer: (b).exploit the spatial locality of reference in a program
Q147.
Consider Peterson’s algorithm for mutual exclusion between two concurrent processes i and j. The program executed by process is shown below.

repeat
flag [i] = true;
turn = j;
while ( P ) do no-op;
Enter critical section, perform actions, then exit critical
section
flag [ i ] = false;
Perform other non-critical section actions.
until false;

For the program to guarantee mutual exclusion, the predicate P in the while loop should be.
Discuss
Answer: (b).flag[j] = true and turn = j
Q148.
Which combination of the following features will suffice to characterize an OS as a multi-programmed OS?

(a) More than one program may be loaded into main memory
at the same time for execution.
(b) If a program waits for certain events such as I/O,
another program is immediately scheduled for execution.
(c) If the execution of program terminates, another program
is immediately scheduled for execution.
Discuss
Answer: (b).a and b
Q149.
Consider the following statements with respect to user-level threads and kernel supported threads

i. context switch 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?
Discuss
Answer: (a).(ii), (iii) and (iv) only
Q150.
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by
Discuss
Answer: (a).the instruction set architecture

Suggested Topics

Are you eager to expand your knowledge beyond Operating System? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!