WorksheetsOS-PLACEMENTS
Total questions: 25
Worksheet time: 21mins
Which of the following is NOT a valid deadlock prevention scheme? ( asked by Amazon )
Release all resources before requesting a new resource
Number the resources uniquely and never request a lower numbered resource than the last one requested.
Never request a resource after releasing any resource
Request and all required resources be allocated before execution.
Consider a virtual memory system with FIFO page replacement policy. For an arbitrary page access pattern, increasing the number of page frames in main memory will
Always decrease the number of page faults
Some times increase the number of page faults
Always increase the number of page faults
Never affect the number of page faults
Which of the following scheduling algorithms is non-preemptive?
Round Robin
Shortest Job First
SRTF
Multilevel Queue Scheduling
In which one of the following page replacement policies, Belady’s anomaly may occur?
FIFO
Optimal
LRU
MRU
The essential content(s) in each entry of a page table is / are ( asked by Google )
Virtual page number
Page frame number
Both virtual page number and page frame number
Access right information
A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 100 distinct pages in some order and then accesses the same 100 pages but now in the reverse order. How many page faults will occur?
196
192
197
195
Which of the following statements are true?
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
I only
I and III only
I and II only
I , II and III
I. If a process makes a transition D, it would result in another process making transition A immediately.
II. A process P2 in blocked state can make transition E while another process P1 is in running state.
III. The OS uses preemptive scheduling.
IV. The OS uses non-preemptive scheduling.
Which of the above statements are TRUE?
I and II
I and III
II and III
II and IV
A process executes the following code:-
for(i=0;i<n;i++) {
fork();
}
The total number of child processes created is:-
n
2^n
2^n-1
2^(n+1)-1
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes? ( coceptual question )
In deadlock avoidance, the request for resources is always granted if the result state is safe
In deadlock prevention, the request for resources is always granted if the resulting state is safe
Deadlock avoidance requires knowledge of resource requirements a priority
Deadlock avoidance is less restrictive than deadlock prevention
Increasing the RAM of a computer typically improves performance because:
Virtual memory increases
Larger RAMs are faster
Fewer page faults occur
Fewer segmentation faults occur
Which of the following approach is used in Time shairing system ?
Multi-programming
Multi-tasking
Multi-processing
Spooling
Ostrich algorithm is used for :-
Deadlock avoidance
Deadlock ignorance
Deadlock prevention
Deadlock detection
Which of the following is responsible for bringing a process from waiting state or blocked state to ready state ?
Long term scheduler
Short term scheduler
Medium term scheduler
Despatcher
Which of the following statements are true ?
I.) variable size partitioning suffers from both internal and external fragmentation
II.) there is no internal fragmentation in paging
III.) fixed size partitioning suffers from both internal and external fragmentation
III
I, II and III
II and III
I and II
According to best fit partitioning scheme what will be the correct allocation of above fixed size memory snippet :-
None of the above
Number of enteries in a page table is equal to :-
Number of process in M.M
Number of pages of a process
Number of pages in SM
Number of pages of a process used by CPU
Which of the following are true regarding TLB ?
I.) TLB is not a Data structure
II.) After every new process comes, old TLB is cleared
III.) Every process has its separate TLB
I, II, III
II, III
I and III
I , II
Which of the following are true ?
I.) Paging could result in internal fragmentation
II.) Segmentation could result in external fragmentation
III.) Page size is determined by H/W while segment size is given by user
I , II, III
I and II
II and III
I and III
Which of the following is true ?
I.) There is no context switching in threads
II.) Threads share memory
III.) Thread is also called light weight process
I, II, III
II , III
I , III
I, II
Which of the following can be done to reduce thrashing ?
Increasing size of MM
Controlling short term scheduler
increasing size of SM
increasing degree of multiprogramming
Runtime mapping between logical address and virtual address is done by
(a)
Summation of waiting time and burst time is known as
(a)
Which among the following holds the base address of a process in MM ?
Relocation resistor
Limit registor
Page table base resistor
PCB
Logical address is generated by:-
MMU
Relocation registor
CPU
Page Table
