(A) increases
(B) decreases
(C) remains constant
(D) varies irregularly
Ans:-D
Explanation:-
There are few criterias used for measuring the performance of a particular scheduling algorithm.
The turn around time is the interval of time between the submission of a process and its completion.
The wait time is the amount of time a process has been waiting in the ready queue.
The response time is the time taken between the process submission and the first response produced.
In RR algorithm, the value of time quantum or the time slice, plays a crucial role in deciding how effective the algorithm is. If the time quantum is too small, there could be lot of context switching happening which could slow down the performance. If the time quantum is too high, then RR behaves like FCFS. If the time quantum is increased, the average response time varies irregularly. If you take any comprehensive material on operating system, you will come across a graph which depicts this behavior. So the answer is option D.
31. Resources are allocated to the process on non-sharable basis is
(A) mutual exclusion
(B) hold and wait
(C) no pre-emption
(D) circular wait
Ans:-A
Explanation:- There are four necessary and sufficient conditions for a deadlock. One of them is Mutual Exclusion which means that the resources involved are non-sharable. So the answer is option A.
32. Cached and interleaved memories are ways of speeding up memory access between CPU’s and slower RAM. Which memory models are best suited (i.e. improves the performance most) for which programs ?
(i) Cached memory is best suited for small loops.
(ii) Interleaved memory is best suited for small loops
(iii) Interleaved memory is best suited for large sequential code.
(iv) Cached memory is best suited for large sequential code.
(A) (i) and (ii) are true.
(B) (i) and (iii) are true.
(C) (iv) and (ii) are true.
(D) (iv) and (iii) are true.
Ans:-B
Explanation:-
Compared to the processor speed, the speed of the primary memory is slow. Cache memory is a small memory which sits in between the processor and primary memory and fetches information to the processor at a much higher speed or it makes it appear so. Caching can be effective based on a property of computer programs called locality of reference. Analysis of program show that the majority of the execution time is spent around a small part of the program may be a simple loop,nested loop or a few functions. The rest of the program is accessed infrequently. There is something called temporal locality and spatial locality also which we need to know when we talk about cache. But cache memory is ideally suited for small loops.
Interleaved memory is a technique for increasing the speed of RAM. Here multiple memory chips are grouped together to form what are known as banks.Each of them take turns for supplying data. An interleaved memory with "n" banks is said to be n-way interleaved. Macintosh systems are considered to be one using memory interleaving.
So the answer for this question is option B.
33. Consider the following page trace : 4,3, 2, 1, 4, 3, 5, 4, 3, 2, 1, 5 Percentage of page fault that would occur if FIFO page replacement algorithm is used with number of frames for the JOB m = 4 will be
(A) 8
(B) 9
(C) 10
(D) 12
Ans:-C
Explanation:-
The reference string is 4,3,2,1,4,3,5,4,3,2,1,5
The number of frames m = 4
The first 4 references(4,3,2,1) cause page faults and brought into the empty frames.
The next reference (4) is already available and so there is no page fault.
The next reference (3) is also already available and so there is no page fault.
The next reference (5) replaces page 4 which was brought in first.No of page faults=5.
Next reference (4) replaces page 3 which is the next to come in.No of page faults=6.
Next reference (3) replaces 2.No of page faults till now=7.
Next reference (2) replaces 1 which was the last of the pages to come in. No of page faults till now=8.
Next reference (1) replaces 5 which was the first to come in in the second cycle. No of page faults till now=9.
The last reference in the reference string is 5 which will replace 4. No of page faults till now=10
So the answer is option C which is 10.
Question no 33. "Percentage of page fault "
ReplyDeleteHe has asked the percentage of page fault that is 10/12 %,i was confused there is no option related to percentage,What is the meaning of that percentage in that qeustion?
Please explain me..
I considered the percentage of page fault as the number of page fault. As you have mentioned, since there is no option related to the percentage i took the number of page faults only.
ReplyDeleteIt Should be 12 because they have suggested Percentage in question so option is D 12 is the correct answer
ReplyDelete