1. |
A file system with 300 GByte disk uses a file descriptor with 8 direct block addresses, 1 indirect block address and 1 doubly indirect block address. The size of each disk block is 128 Bytes and the size of each disk block address is 8 Bytes. The maximum possible file size in this file system is
A.
3 Kbytes ![]()
B.
35 Kbytes ![]()
C.
280 Kbytes ![]()
D.
dependent on the size of the disk ![]() Answer: B Explanation:
Each block size = 128 Bytes |
2. |
Fetch_And_Add(X,i) is an atomic Read-Modify-Write instruction that reads the value of memory location X, increments it by the value i, and returns the old value of X. It is used in the pseudocode shown below to implement a busy-wait lock. L is an unsigned integer shared variable initialized to 0. The value of 0 corresponds to lock being available, while any non-zero value corresponds to the lock being not available.
A.
fails as L can overflow ![]()
B.
fails as L can take on a non-zero value when the lock is actually available ![]()
C.
works correctly but may starve some processes ![]()
D.
works correctly without starvation ![]() Answer: B Explanation:
1. AcquireLock(L){ |
3. |
Consider the 3 processes, P1, P2 and P3 shown in the table.
The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
A.
FCFS: P1, P2, P3 RR2: P1, P2, P3 ![]()
B.
FCFS: P1, P3, P2 RR2: P1, P3, P2 ![]()
C.
FCFS: P1, P2, P3 RR2: P1, P3, P2 ![]()
D.
FCFS: P1, P3, P2 RR2: P1, P2, P3 ![]() Answer: C Explanation:
The completion order for round robin is given below
↑ front
At time t = 3
↑ front
At time t = 4
↑ front So using round robin scheduling, the completion order is P1,P3,P2 |
4. |
A thread is usually defined as a "light weight process" because an operating system (OS) maintains smaller data structures for a thread than for a process. In relation to this, which of the following is TRUE?
A.
On per-thread basis, the OS maintains only CPU register state ![]()
B.
The OS does not maintain a separate stack for each thread ![]()
C.
On per-thread basis, the OS does maintain virtual memory state ![]()
D.
On per-thread basis, the OS maintains only scheduling and accounting information ![]() Answer: A Explanation: |
5. |
A company needs to develop digital signal processing software for one of its newest inventions. The software is expected to have 40000 lines of code. The company needs to determine the effort in person-months needed to develop this software using the basic COCOMO model. The multiplicative factor for this model is given as 2.8 for the software development on embedded systems, while the exponentiation factor is given as 1.20. What is the estimated effort in person-months?
A.
234.25 ![]()
B.
932.50 ![]()
C.
287.80 ![]()
D.
122.40 ![]() Answer: A Explanation:
Effort person per month= a.(KDSI)B |
6. |
Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned.
While one of the following statements describes properties achieved ?
A.
Mutual exclusion nut nor progress ![]()
B.
Progress but not mutual exclusion ![]()
C.
Neither mutual exclusion nor progress ![]()
D.
Both mutual exclusion and progress ![]() Answer: A Explanation: Method used by P1 & P2 enters into critical section when S1 = S2 & S1! = S2 respectively, since both are opposite conditions so mutual exclusion is there, but if P1's while loop true then it will always be true & in P2 if while loop true it would run infinitely so no. progress. Hence (A) is correct option. |
7. |
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 ?
A.
196 ![]()
B.
192 ![]()
C.
197 ![]()
D.
195 ![]() Answer: A Explanation: In FIFO page replacement policy, the pages which entered first are replaced first so for first 100 accesses, 100 page faults will occur. Now in memory there are last 4 pages 97, 98, 99 & 100th page. So during reverse access there 4 pages would not create any page fault & other 97 page faults. So total 100 + 96 = 196 page faults. Hence (A) is correct option. |
8. |
Which of the following statements are true ?
A.
I only ![]()
B.
I and III only ![]()
C.
II and III only ![]()
D.
I, II and III ![]() Answer: D Explanation:
I. SRIF scheduling may cause starvation since the processes which require large CPU burst periods would have to wait. |
9. |
The following program consists of 3 concurrent precesses and 3 binary semaphores. The semaphores are initialized as S0 = 1,S1 = 0,S2 = 0
How many times will precess P0 print ‘0’ ?
A.
At least twice ![]()
B.
Exactly twice ![]()
C.
Exactly thrice ![]()
D.
Exactly once ![]() Answer: A Explanation: Let us see what will happen initially S0 = 1, S1 = 0 S2 = 0 so P1 & P2 will wait & P0 runs & make S0 = 0 wait decrements semaphore by 1 & release increments if by 1. So after P0 's 1st run S1 = 1 & S2 = 1 ‘0’ is printed Now P1 & P2 can run & make S1 = 0, S2 = 0 but both increments S0 = 1 again. So P0 again starts and print '0' so this would continue again & again. So '0' will be printed at least twice. Hence (A) is correct option. |
10. |
A system has n resources R0 ... Rn_1, and k processes P0 .. Pk_1. The implementation of the resource request logic of each process Pi, is as follows:
A.
n = 40, k = 26 ![]()
B.
n = 21, k =12 ![]()
C.
n = 20, k = 10 ![]()
D.
n = 41, k = 19 ![]() Answer: B Explanation: Allotment of resources would be successful to all cases but in option (B) where n = 21 & k = 12. Let use take i = 10 So for P10 only R10 can be allotted whereas for P11 odd case (else). R21−11 i.e R10 can only be allotted. This is an conflict. Hence (B) is correct option. |
11. |
Consider a system with 4 type of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (4units). A non-preemptive resource allocation policy is used. At any give instance, a request is not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the resources as follows if executed independently.
Which one of the following statements is TRUE if all three processes run concurrently starting at time t = 0 ?
A.
All processes will finish without any deadlock ![]()
B.
Only P1 and P2 will be in deadlock ![]()
C.
Only P1 and P3 will be in deadlock ![]()
D.
All three processes will be in deadlock ![]() Answer: A Explanation: Total resources = 3 2 3 2
All process computed without deadlock Hence (A) is correct option.
|
12. |
In which of the following page replacement policies, Belady’s anomaly may occur ?
A.
FIFO ![]()
B.
Optimal ![]()
C.
LRU ![]()
D.
MRU ![]() Answer: A Explanation: Belady’s anomaly is a properly of FIFO page replacement policy in which the no. of page faults increases even if the no. of page frames are increased in some cases. Hence (A) is correct option. |
13. |
The essential content(S) in each entry of a page table is/are
A.
virtual page number ![]()
B.
page frame number ![]()
C.
Both virtual page number and page frame number ![]()
D.
access right information ![]() Answer: B Explanation: A page table is in main memory which mop a page frame to a virtual memory page. So essential content is page frame number Hence (B) is correct option. |
14. |
Consider a disk system with 100 cylinders. The requests to access the cylinders occur in following sequence :
A.
95 ms ![]()
B.
119 ms ![]()
C.
233 ms ![]()
D.
276 ms ![]() Answer: B Explanation:
Arranging in order.
Total = 16 + 14 + 1 + 4 + 5 + 3 + 1 + 2 + 2 + 71 |
15. |
A multilevel page table is preferred in comparison to a single level
page table for translating virtual address to physical address because
A.
It reduces the memory access time to read or write and memory location ![]()
B.
It helps to reduce the size of page table needed to implement the virtual address space of a process ![]()
C.
If is required by the translation lookaside buffer ![]()
D.
If helps to reduce the number of page faults in page replacement algorithms. ![]() Answer: B Explanation: Single level page table is not preferred since it requires the no. of page table enteries equal to the no. of virtual memory addresses, but a multilevel page table has smaller no. of enteries so reduce the size of page table needed. Hence (B) is correct option. |
Total questions |
||
Score : [XX/XX] | ||
Total questions | : | [TQ] |
Total answered questions | : | [AQ] |
Total unanswered questions | : | [UQ] |