Operating Systems questions

Q18

GATE CS 2017 CS-1Processes and ThreadsMCQ1 mark−1/3 if wrong
Threads of a process share
Show answer without attempting

Answer: D

Q24

GATE CS 2017 CS-1SchedulingNAT1 mark
Consider the following CPU processes with arrival times (in milliseconds) and length of CPU bursts (in milliseconds) as given below:
ProcessArrival timeBurst time
P107
P233
P355
P462
If the pre-emptive shortest remaining time first scheduling algorithm is used to schedule the processes, then the average waiting time across all processes is ____________ milliseconds.
Show answer without attempting

Answer: 3.0

Q27

GATE CS 2017 CS-1Concurrency and SynchronizationMCQ2 marks−2/3 if wrong
A multithreaded program PP executes with xx number of threads and uses yy number of locks for ensuring mutual exclusion while operating on shared memory locations. All locks in the program are non-reentrant, i.e., if a thread holds a lock ll, then it cannot re-acquire lock ll without releasing it. If a thread is unable to acquire a lock, it blocks until the lock becomes available. The minimum value of xx and the minimum value of yy together for which execution of PP can result in a deadlock are:
Show answer without attempting

Answer: D

Q40

GATE CS 2017 CS-1Memory ManagementMCQ2 marks−2/3 if wrong
Recall that Belady's anomaly is that the page-fault rate may increase as the number of allocated frames increases. Now, consider the following statements:

S1: Random page replacement algorithm (where a page chosen at random is replaced) suffers from Belady's anomaly
S2: LRU page replacement algorithm suffers from Belady's anomaly

Which of the following is CORRECT?
Show answer without attempting

Answer: B

Q7

GATE CS 2017 CS-2Processes and ThreadsMCQ1 mark−1/3 if wrong
Which of the following is/are shared by all the threads in a process?

I. Program counter
II. Stack
III. Address space
IV. Registers
Show answer without attempting

Answer: B

Q8

GATE CS 2017 CS-2File SystemsMCQ1 mark−1/3 if wrong
In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed?

I. Contiguous
II. Linked
III. Indexed
Show answer without attempting

Answer: D

Q33

GATE CS 2017 CS-2DeadlocksMCQ2 marks−2/3 if wrong
A system shares 9 tape drives. The current allocation and maximum requirement of tape drives for three processes are shown below:
ProcessCurrent AllocationMaximum Requirement
P137
P216
P335
Which of the following best describes current state of the system?
Show answer without attempting

Answer: B

Q51

GATE CS 2017 CS-2SchedulingNAT2 marks
Consider the set of processes with arrival time (in milliseconds), CPU burst time (in milliseconds), and priority (0 is the highest priority) shown below. None of the processes have I/O burst time.
ProcessArrival TimeBurst TimePriority
P1P_10112
P2P_25280
P3P_31223
P4P_42101
P5P_59164
The average waiting time (in milliseconds) of all the processes using preemptive priority scheduling algorithm is ____________.
Show answer without attempting

Answer: 29.0

0/80 correct0 marks

Related topics in GATE CS