Question1
Let the page fault service time is 10 ms in a computer with average memory access time being 20 ns. If one page fault is generated for every 10,00,000 memory accesses, what is the effective access time for the memory?
A) 21 ns
B) 30 ns
C) 23 ns
D) 35 ns
Question2
Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is true?
A) t1>t2
B) t1=t2
C) t1<t2
D) nothing can be said about the relation between t1 and t2
Question3
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 not maintain virtual memory state
D) On per-thread basis, the OS maintains only scheduling and accounting information
Question4
Consider the following table of arrival time and burst time for three processes P0, P1 and P2.
process id, Arrival time, Burst time
P0, 0 ms, 9 ms
P1, 1 ms, 4 ms
P2, 2 ms, 9 ms
The preemptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?
A) 5.0 ms
B) 4.33 ms
C) 6.33 ms
D) 7.33 ms
Question5
An 8KB direct-mapped write-back cache is organized as multiple blocks, each of size 32-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of the following.
1 valid bit
1 modified bit
As many bit as the minimum needed to identify the memory block mapped in the cache.
What is the total size of memory needed at the cache controller to store meta-data (tag) for the cache?
A) 4864 bits
B) 6144 bits
C) 6656 bits
D) 5376 bits
Question6
Which on of the concurrency control protocols ensure both conflict serializability and freedom from deadlock?
B) 2 only
C) Both 1 and 2
D) Neither 1 nor 2
Question7
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.
Method used by P1:
while (S1==S2)
Critical Section
S1=S2;
Method used by P2:
while(S1!=S2)
Critical Section
S2=(not)S1;
A) Mutual exclusion but no progress
B) Progress but no mutual exclusion
C) Neither mutual exclusion nor progress
D) Both Mutual exclusion and progress
Question8
A system uses FIFO policy for page replacement. It has 4 page frames with no page 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
Question9
Which of the following statements are true?
B) 1 and 3 only
C) 2 and 3 only
D) 1, 2 and 3
Question10
The following program is consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0=1, S1=0, S2=0.
Process P0
while(true){
wait(S0);
print '0';
release(S1);
release(S2);
}
Process P1
wait(S1);
release(S0);
Process P2
wait(S2);
release(S0);
How many times will process P0 print '0'?
A) At least twice
B) Exactly twice
C) Exactly thrice
D) Exactly once
Question11
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:
if(i%2==0) {
if(i<n) Request Ri;
if(i+2 < n) Request Ri+2;
}
else {
if(i<n) Request Rn-i;
if(i+2 <n) Request Rn-i-2;
}
In which one of the following situations is deadlock possible?
A) n=40, k=26
B) n=21, k=12
C) n=20, k=10
D) n=41, k=19
Let the page fault service time is 10 ms in a computer with average memory access time being 20 ns. If one page fault is generated for every 10,00,000 memory accesses, what is the effective access time for the memory?
A) 21 ns
B) 30 ns
C) 23 ns
D) 35 ns
Question2
Let the time taken to switch between user and kernel modes of execution be t1 while the time taken to switch between two processes be t2. Which of the following is true?
A) t1>t2
B) t1=t2
C) t1<t2
D) nothing can be said about the relation between t1 and t2
Question3
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 not maintain virtual memory state
D) On per-thread basis, the OS maintains only scheduling and accounting information
Question4
Consider the following table of arrival time and burst time for three processes P0, P1 and P2.
process id, Arrival time, Burst time
P0, 0 ms, 9 ms
P1, 1 ms, 4 ms
P2, 2 ms, 9 ms
The preemptive shortest job first scheduling algorithm is used. Scheduling is carried out only at arrival or completion of processes. What is the average waiting time for the three processes?
A) 5.0 ms
B) 4.33 ms
C) 6.33 ms
D) 7.33 ms
Question5
An 8KB direct-mapped write-back cache is organized as multiple blocks, each of size 32-bytes. The processor generates 32-bit addresses. The cache controller maintains the tag information for each cache block comprising of the following.
1 valid bit
1 modified bit
As many bit as the minimum needed to identify the memory block mapped in the cache.
What is the total size of memory needed at the cache controller to store meta-data (tag) for the cache?
A) 4864 bits
B) 6144 bits
C) 6656 bits
D) 5376 bits
Question6
Which on of the concurrency control protocols ensure both conflict serializability and freedom from deadlock?
- 2-phase locking
- Time-stamp ordering
B) 2 only
C) Both 1 and 2
D) Neither 1 nor 2
Question7
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.
Method used by P1:
while (S1==S2)
Critical Section
S1=S2;
Method used by P2:
while(S1!=S2)
Critical Section
S2=(not)S1;
A) Mutual exclusion but no progress
B) Progress but no mutual exclusion
C) Neither mutual exclusion nor progress
D) Both Mutual exclusion and progress
Question8
A system uses FIFO policy for page replacement. It has 4 page frames with no page 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
Question9
Which of the following statements are true?
- Shortest remaining time first scheduling may cause starvation
- Preemptive scheduling may cause starvation
- Round Robin is better than FCFS in terms of response time
B) 1 and 3 only
C) 2 and 3 only
D) 1, 2 and 3
Question10
The following program is consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0=1, S1=0, S2=0.
Process P0
while(true){
wait(S0);
print '0';
release(S1);
release(S2);
}
Process P1
wait(S1);
release(S0);
Process P2
wait(S2);
release(S0);
How many times will process P0 print '0'?
A) At least twice
B) Exactly twice
C) Exactly thrice
D) Exactly once
Question11
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:
if(i%2==0) {
if(i<n) Request Ri;
if(i+2 < n) Request Ri+2;
}
else {
if(i<n) Request Rn-i;
if(i+2 <n) Request Rn-i-2;
}
In which one of the following situations is deadlock possible?
A) n=40, k=26
B) n=21, k=12
C) n=20, k=10
D) n=41, k=19
Answers:
ReplyDelete1) B
2) C
3) A
4) A
5) --
Answer
ReplyDelete7) A
Thank you sir for creating this blog.Its really helpfull and easy for study while at work...Thanks Again
ReplyDeletesir m unable to fhelp meind the material over hardware compiler so plz how i can or frm were we get dis plzzzzzzz
ReplyDelete