Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
44 views19 pages

Operating System-Question Bank

The document is a question bank for an Operating Systems course, covering various topics such as system structure, process management, process scheduling, and synchronization. It includes multiple-choice questions, short answer questions, and problem-solving tasks related to key concepts in operating systems. The questions assess understanding of critical concepts like multi-user systems, process states, scheduling algorithms, and synchronization mechanisms.

Uploaded by

sayakjana001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views19 pages

Operating System-Question Bank

The document is a question bank for an Operating Systems course, covering various topics such as system structure, process management, process scheduling, and synchronization. It includes multiple-choice questions, short answer questions, and problem-solving tasks related to key concepts in operating systems. The questions assess understanding of critical concepts like multi-user systems, process states, scheduling algorithms, and synchronization mechanisms.

Uploaded by

sayakjana001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Question Bank

Operating System

Module 1: Introduction & System Structure


1. A multi-user, multiprocessing operating system cannot be implemented on hardware that does
not support
a) address translation
b) DMA for disk transfer
c) at least two modes of CPU execution ( privileged and non-privileged )
d) demand paging.

2. A benefit of the microkernel organization is


a) extensibility b) portability
c) flexibility d) all of these.

3. The shell is
a) a hardware component b) a command interpreter
c) a part of compiler d) a tool in CPU Scheduling

4. ……………….provides an interface to the operating system to the user


a) Kernel b) Micro-kernel
c) Shell d) None of these

3. Mention one essential characteristic each of time sharing system, batch processing system and
distributed system, real time system, network system.

4. Differentiate between multiprogramming and multitasking OS.

5. What is bootstrapping?

6. What are the differences between a trap and an interrupt? What is the use of each function?

7. What is the purpose of the command interpreter? Why is it usually separate from the kernel?

Module 2: Process Management


Processes
1. Concurrent processes
a) overlap in space b) do not overlap in time
c) overlap in time d) both (a) and (c).

2. What are the contents of process control Block (PCB)?

3. Under what conditions the following state transition occurs with respect to a process?
i) Run to Ready, ii) Blocked (or wait) to Ready
4. What is context switching? Why is context switching considered to be time consuming?

5. What are co-operating processes? Discuss the advantages of co-operating process.

6. With the help of state transition diagram, explain various states of a process.

7. Write short notes on orphan and zombie process.

Threads
1. Thread is referred to as
a) lightweight process b) process
c) program d) set of processes.

2. What are the relative advantages and disadvantages of user level thread and kernel level
thread?

3. What are the differences between process and thread?

4. What resources are used when a thread is created? How they differ when a process is created?

Process Scheduling
1. The technique of gradually increasing the priority of a process that wait in a system for a long
time is known as
a) blocking b) ageing
c) starvation d) convoy effect.

2. Which of the following reduces degree of multiprogramming?


a) Long-term scheduler b) Mid-term scheduler
c) Short-term scheduler d) All of these.

3. The short term scheduler is responsible for:


a) Selecting the shortest jobs to enter the system
b) Discarding job groups that should be removed from the system
c) Selecting which process should be allocated to the CPU next
d) Swapping jobs out of memory
e) None of the above

4. The average wait time for five processes P1-P5 with burst of 5, 19,2,16 and 7 milliseconds
respectively, using SJF is:
a) 5 milliseconds b) 10.6 milliseconds
c) 28.25 milliseconds d) 9.8 milliseconds
e) None of the above

5. Suppose that the operating system is running a non-preemptive scheduler and that process p is
currently running. A context switch can occur:
a) When p terminates or block b) When another process unblocks
c) When another process enters d) When the time quantum is exhausted
e) When the priority of some other process exceeds the priority of p.

6. The time spent by a process in ready queue is called


a) waiting time b) turnaround time
c) response time d) none of these

7. Scheduling a process from ready queue to CPU is done by


a) Short term scheduler b) Middle term scheduler
c) Long term scheduler d) Dispatcher

8. Which scheduling policy is most suitable for a time-sharing system


a) Shortest Job First b) Round Robin
c) First come first serve d) Priority

9. Consider a set of n tasks with known runtimes r1, r2, … rn to be run on a uni-processor
machine. Which of the following processor scheduling algorithms will result in the maximum
throughput?
(a) Round-Robin (b) Shortest-Job-First
(c) Highest-Response-Ratio-Next (d) First-Come-First-Served

10. Consider three CPU-intensive processes, which require 10, 20 and 30 time units and arrive at
times 0, 2 and 6, respectively. How many context switches are needed if the operating system
implements a shortest remaining time first scheduling algorithm? Do not count the context
switches at time zero and at the end.
(a) 1 (b) 2 (c) 3 (d) 4

11. Assume that the following jobs are to be executed on a single processor system
-----------------------
Job-Id CPU-BurstTime
-----------------------
p 4
q 1
r 8
s 1
t 2
-----------------------
The jobs are assumed to have arrived at time 0 and in the order p, q, r, s, t. Calculate the
departure time (completion time) for job p if scheduling is round robin with time slice 1.
(a) 4 (b) 10 (c) 11 (d) 12

12. The sequence …………… is an optimal non-preemptive scheduling sequence for the
following jobs which leaves the CPU idle for ………………… unit(s) of time.
----------------------------
Job Arrival_Time Burst_Time
----------------------------
1 0.0 9
2 0.6 5
3 1.0 1
----------------------------
(a) {3,2,1),1 (b) (2,1,3},0
(c) {3,2,1),0 (d) {1,2,3},5

13. A uni-processor computer system only has two processes, both of which alternate 10 ms
CPU bursts with 90 ms I/O bursts. Both the processes were created at nearly the same time. The
I/O of both processes can proceed in parallel. Which of the following scheduling strategies will
result in the least CPU utilization (over a long period of time) for this system?
(a) First come first served scheduling
(b) Shortest remaining time first scheduling
(c) Static priority scheduling with different priorities for the two processes
(d) Round robin scheduling with a time quantum of 5 ms

14. Consider the following set of processes, with the arrival times and the CPU burst times given
in milliseconds.
-------------------------------------
Process Arrival-Time Burst-Time
-------------------------------------
P1 0 5
P2 1 3
P3 2 3
P4 4 1
-------------------------------------
What is the average turnaround time for these processes with the preemptive shortest remaining
processing time first (SROT) algorithm?
(a) 5.50 (b) 5.75 (c) 6.00 (d) 6.25

15. Consider three processes (process id 0, 1, 2 respectively) with compute time bursts 2, 4 and
8 time units. All processes arrive at time zero. Consider the longest remaining time first (LRTF)
scheduling algorithm. In LRTF ties are broken by giving priority to the process with the lowest
process id. The average turnaround time is:
(a) 13 units (b) 14 units (c) 15 units (d) 16 units

16. Consider three processes, all arriving at time zero, with total execution time of 10, 20 and 30
units, respectively. Each process spends the first 20% of execution time doing I/O, the next 70%
of time doing computation, and the last 10% of time doing I/O again. The operating system uses
a shortest remaining compute time first scheduling algorithm and schedules a new process either
when the running process gets blocked on I/O or when the running process finishes its compute
burst. Assume that all I/O operations can be overlapped as much as possible. For what
percentage of time does the CPU remain idle?
(a) 0% (b) 10.6% (c) 30.0% (d) 89.4%

17. Consider the 3 processes, P1, P2 and P3 shown in the table


----------------------------------------------
Process Arrival time Time unit required
----------------------------------------------
P1 0 5
P2 1 7
P3 3 4
----------------------------------------------
The completion order of the 3 processes under the policies FCFS and RRS (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

18. Consider the following set of processes with corresponding arrival times and burst times:
Process Arrival Time (units) CPU Burst Time (Units)
P1 0 6
P2 3 10
P3 5 8
P4 7 5
P5 10 6
Draw the Gantt chart considering Round Robin scheduling policy with time quantum = 4 units.
Calculate individual turnaround time and average waiting time.

19. What is priority scheduling? Can SJF scheduling be considered as priority scheduling?
Justify.

20. Consider the following set of processes, with the length of the CPU-burst time given in
millisecond:
Process Burst Time Arrival Time Priority
P1 10 0 3
P2 1 1 1
P3 2 2 3
P4 1 2 4
P5 5 3 2
i) Draw 2 Gantt charts Illustrate the execution of these processes a non-pre-emptive priority (a
smaller priority number implies a higher priority) and a RR (quantum = 1) scheduling.
ii) What is turnaround time of each process for each of the scheduling algorithms? Also find the
average turnaround time of the system?
iii) What are the average waiting time for 2 algorithms?

21. Write short notes on RR scheduling

22. Write short notes on Middle term scheduler

23. What is Turn Around Time?


24. If time quantum is very less for Round Robin Algorithm, then what will be the problems?

25. Consider the following set of process. CPU burst times of them are given in milliseconds.
Process CPU Burst Time (Units)
P1 15
P2 5
P3 7
P4 10
Draw the Gantt chart considering Round Robin scheduling policy with time quantum = 4 units.
Calculate average turnaround time and average waiting time.

26. Write short notes on Shortest Remaining Time First CPU Scheduling.

27. Given n processes to be scheduled on one processor; how many possible different schedulers
are there? Give a formula of n.

28. What do you mean by scheduler? Explain different types of scheduler.

29. Explain CPU Scheduling criteria.

30. For the process listed in the table, draw a chart illustrating their execution using FCFS, SJF,
SRTF(SRJF), Round Robin (quantum =2) and calculate average turn-around time and average
waiting time.
Process Arrival Time Processing Time
A 0 8
B 1 4
C 2 9
D 3 5

Process Synchronization
1. A critical section is a program segment
a) Which avoids deadlock
b) Which should run in a certain specified amount of time
c) Which shared resources that are accessed
d) Which must be enclosed by a pair of semaphores operation, p and v.

2. A situation where several processes access and manipulate the same data concurrently and the
outcome of the execution depends on the particular order in which access takes place is called:
a) data consistency b) race condition
c) aging d) starvation

3. The segment of code in which the process may change common variables, update tables, write
into files in known as:
a) Program b) Critical section
c) Non-critical section d) Synchronization
4. The default remedy of starvation is
a) Ageing b) critical section
c) Mutual exclusion d) all of these

5. Part of the program where the shared memory accessed and which should be executed
indivisibly
a) Semaphores b) directory
c) Critical section d) mutual exclusion

6. A critical section is a program segment


(a) which should run in a certain specified amount of time
(b) which avoids deadlocks
(c) where shared resources are accessed
(d) which must be enclosed by a pair of semaphore operations, P and V

7. A solution to the Dining Philosophers Problem which avoids deadlock is


(a) ensure that all philosophers pick up the left fork before the right fork
(b) ensure that all philosophers pick up the right fork before the left fork
(c) ensure that one particular philosopher picks up the left fork before the right fork, and that all
other philosophers pick up the right fork before the left fork
(d) None of the above

8. 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 Method Used by P2
while (S1 == S2) ; while (S1 != S2) ;
Critica1 Section Critica1 Section
S1 = S2; S2 = not (S1);

Which one of the following statements describes the properties achieved?


(a) Mutual exclusion but not progress
(b) Progress but not mutual exclusion
(c) Neither mutual exclusion nor progress
(d) Both mutual exclusion and progress

9. A counting semaphore was initialized to 10. Then 6 P (wait) operations and 4V (signal)
operations were completed on this semaphore. The resulting value of the semaphore is
(a) 0 (b) 8 (c) 10 (d) 12

10. Let m[0]…m[4] be mutexes (binary semaphores) and P[0] …. P[4] be processes.
Suppose each process P[i] executes the following:
wait (m[i]);wait (m[(i+1) mode 4]);
.........
release (m[i]); release (m[(i+1)mod 4]);
This could cause
(a) Thrashing (b) Deadlock
(c) Starvation, but not deadlock (d) None of the above

11. The enter_CS() and leave_CS() functions to implement critical section of a process are
realized using test-and-set instruction as follows:
void enter_CS(X)
{
while test-and-set(X) ;
}
void leave_CS(X)
{
X = 0;
}
In the above solution, X is a memory location associated with the CS and is initialized to 0. Now
consider the following statements:
I. The above solution to CS problem is deadlock-free
II. The solution is starvation free.
III. The processes enter CS in FIFO order.
IV More than one process can enter CS at the same time.
Which of the above statements is TRUE?
(a) I only
(b) I and II
(c) II and III
(d) IV only

12. The following program consists of 3 concurrent processes and 3 binary semaphores. The
semaphores are initialized as S0=1, S1=0, S2=0.
Process P0 Process P1 Process P2
while (true) { wait (S1); wait (S2);
wait (S0); Release (S0); release (S0);
print (0);
release (S1);
release (S2);
}

How many times will process P0 print '0'?


(a) At least twice (b) Exactly twice
(c) Exactly thrice (d) Exactly once

13. 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.
AcquireLock(L){
while (Fetch_And_Add(L,1))
L = 1;
}
ReleaseLock(L){
L = 0;
}
This implementation
(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

14. Two processes, P1 and P2, need to access a critical section of code. Consider the following
synchronization construct used by the processes:
/* P1 */ /* P2 */
while (true) { while (true) {
wants1 = true; wants2 = true;
while (wants2 == true); while (wants1==true);
/* Critical /* Critical
Section */ Section */
wants1=false; wants2 = false;
} }
/* Remainder section */ /* Remainder section */
Here, wants1 and wants2 are shared variables, which are initialized to false. Which one of the
following statements is TRUE about the above construct?
(a) It does not ensure mutual exclusion.
(b) It does not ensure bounded waiting.
(c) It requires that processes enter the critical section in strict alternation.
(d) It does not prevent deadlocks, but ensures mutual exclusion.

15. The atomic fetch-and-set x, y instruction unconditionally sets the memory location x to 1 and
fetches the old value of x in y without allowing any intervening access to the memory location x.
consider the following implementation of P and V functions on a binary semaphore .
void P (binary_semaphore *s) {
unsigned y;
unsigned *x = &(s->value);
do {
fetch-and-set x, y;
} while (y);
}
void V (binary_semaphore *s) {
S->value = 0;
}
Which one of the following is true?
(a) The implementation may not work if context switching is disabled in P.
(b) Instead of using fetch-and-set, a pair of normal load/store can be used
(c) The implementation of V is wrong
(d) The code does not implement a binary semaphore

16. Barrier is a synchronization construct where a set of processes synchronizes globally i.e. each
process in the set arrives at the barrier and waits for all others to arrive and then all processes
leave the barrier. Let the number of processes in the set be three and S be a binary semaphore
with the usual P and V functions. Consider the following C implementation of a barrier with line
numbers shown on left.

void barrier (void) {


1: P(S);
2: process_arrived++;
3: V(S);
4: while (process_arrived !=3);
5: P(S);
6: process_left++;
7: if (process_left==3) {
8: process_arrived = 0;
9: process_left = 0;
10: }
11: V(S);
}

The variables process_arrived and process_left are shared among all processes and are initialized
to zero. In a concurrent program all the three processes call the barrier function when they need
to synchronize globally.

The above implementation of barrier is incorrect. Which one of the following is true?
(a) The barrier implementation is wrong due to the use of binary semaphore S
(b) The barrier implementation may lead to a deadlock if two barrier in invocations are used in
immediate succession.
(c) Lines 6 to 10 need not be inside a critical section
(d) The barrier implementation is correct if there are only two processes instead of three. Ans:
option (b)

Which one of the following rectifies the problem in the implementation?


(a) Lines 6 to 10 are simply replaced by process_arrived--
(b) At the beginning of the barrier the first process to enter the barrier waits until process_arrived
becomes zero before proceeding to execute P(S).
(c) Context switch is disabled at the beginning of the barrier and re-enabled at the end.
(d) The variable process_left is made private instead of shared.

17. What are the operations on a semaphore? What are the problems with these operations if these
follow the classical definition? What is the possible remedy to the above problem?

18. What is race condition?


19. Explain Peterson solution for avoiding race condition.

20. What is semaphore? What are the different types of semaphore? How is it used to overcome
critical section problem?

21. Define critical section and identify the requirements to be satisfied to solve the critical
section problem.

22. What is the Dining philosopher problem? Device an algorithm to solve the problem using
semaphore.

23. How mutual exclusion, hold & wait and circular wait are different from each other? Explain
with an example.

24. How does the monitor give the solution for synchronization problem?

25. Explain whether any integer variable with the similar operation can act as semaphore or not.

26. What are the problems of busy wait implementation of semaphore? Explain how it is solved.

27. State producer-consumer problem. Give a solution to the producer-consumer problem using
semaphore. Justify your solution guarantees Mutual Exclusion.

Deadlock
1. Computer system has 6 tape drives, with n processes competing for them. Each process may
need 2 tape drives. The maximum value of n for which the system is guaranteed to be deadlock
free is
a) 6 b) 5
c) 4 d) 3.

2. Banker's algorithm solves the problem of


a) deadlock avoidance b) context switching
c) deadlock recovery d) mutual exclusive.

3. Consider the following snapshot of a system:


Process Allocation Max Available
A BC D A BC D A BC D
P0 0012 0012 1520
P1 1000 1750
P2 1354 2356
P3 0632 0652
P4 0014 0656
Answer the following questions using banker’s algorithm
i) What is the content of need Matrix?
ii) Is the system in safe state?
iii) If the request for P1 arrives for (0, 4, 2, 0) can the request be granted immediately?
4. An operating system uses the Banker’s algorithm for deadlock avoidance when managing the
allocation of three resource types X, Y, and Z to three processes P0, P1, and P2. The table given
below presents the current system state. Here, the Allocation matrix shows the current number of
resources of each type allocated to each process and the Max matrix shows the maximum
number of resources of each type required by each process during its execution.

There are 3 units of type X, 2 units of type Y and 2 units of type Z still available. The system is
currently in a safe state. Consider the following independent requests for additional resources in
the current state:
REQ1: P0 requests 0 units of X,
0 units of Y and 2 units of Z
REQ2: P1 requests 2 units of X,
0 units of Y and 0 units of Z
Which one of the following is TRUE?
(A) Only REQ1 can be permitted.
(B) Only REQ2 can be permitted.
(C) Both REQ1 and REQ2 can be permitted.
(D) Neither REQ1 nor REQ2 can be permitted

5.A system shares 9 tape drives. The current allocation and maximum requirment of tape drives
for three processes are shown below:
Process Current Allocation Maximum Requirment
P1 3 7
P2 1 6
P3 3 5
Which of the following best describes current state of the system?
(A) Safe, Deadlocked (B) Safe, Not Deadlocked
(C) Not Safe, Deadlocked (D) Not safe, Not Deadlocked

6.A system has 6 identical resources and N processes competing for them. Each process can
request at most 2 resources. Which one of the following values of N could lead to a deadlock?
(A) 1 (B) 2
(C) 3 (D) 4

7.Consider the following policies for preventing deadlock in a system with mutually exclusive
resources.
I. Processes should acquire all their resources at the beginning of execution. If any resource is
not available, all resources acquired so far are released.
II. The resources are numbered uniquely, and processes are allowed to request for resources only
in increasing resource numbers
III. The resources are numbered uniquely, and processes are allowed to request for resources
only in decreasing resource numbers
IV. The resources are numbered uniquely. A process is allowed to request only for a resource
with resource number larger than its currently held resources
Which of the above policies can be used for preventing deadlock?
(A) Any one of I and III but not II or IV
(B) Any one of I, III, and IV but not II
(C) Any one of II, and III but not I or IV
(D) Any one of I, II, III, and IV

8.A system has n resources R0…Rn-1, and k processes P0…Pk-1. The implementation of the
resourcerequest 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 a deadlock possible?
(A) n = 40,k = 26 (B) n = 21,k = 12
(C) n = 20,k = 10 (D) n = 41,k = 19

9.Consider a system with 4 types of resources R1 (3 units), R2 (2 units), R3 (3 units), R4 (2


units). A non-preemptive resource allocation policy is used. At any given instance, a request is
not entertained if it cannot be completely satisfied. Three processes P1, P2, P3 request the
sources as follows if executed independently.
Process P1:
t=0: requests 2 units of R2
t=1: requests 1 unit of R3
t=3: requests 2 units of R1
t=5: releases 1 unit of R2 and 1 unit of R1.
t=7: releases 1 unit of R3
t=8: requests 2 units of R4
t=10: Finishes
Process P2:
t=0: requests 2 units of R3
t=2: requests 1 unit of R4
t=4: requests 1 unit of R1
t=6: releases 1 unit of R3
t=8: Finishes
Process P3:
t=0: requests 1 unit of R4
t=2: requests 2 units of R1
t=5: releases 2 units of R1
t=7: requests 1 unit of R2
t=8: requests 1 unit of R3
t=9: Finishes
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 a deadlock.
(D) All three processes will be in deadlock.

10.A single processor system has three resource types X, Y and Z, which are shared by three
processes. There are 5 units of each resource type. Consider the following scenario, where the
column alloc denotes the number of units of each resource type allocated to each process, and the
column request denotes the number of units of each resource type requested by a process in order
to complete execution. Which of these processes will finish LAST?
alloc request
X YZ X YZ
P0 121 103
P1 201 012
P2 221 120
(A) P0
(B) P1
(C) P2
(D) None of the above, since the system is in a deadlock.

11. What are the four necessary conditions for deadlock to occur in a system? Explain.

12. What is the difference between starvation and deadlock?

13. All unsafe states may not lead to deadlock. “Why or why not”?

14. What is banker’s safety algorithm?

15. Consider the following snapshot of a system:


Process Allocation Max Available
A BC D A BC D A BC D
P1 0012 0012 2100
P2 2000 2750
P3 2354 4356
P4 0332 0652
ii) Is the system currently in a safe state? Justify your answer.
iii) If the request for P3 arrives for (0, 1, 0, 0) can the request be granted immediately?
16. Consider a system consisting of four resources of the same type that are shared by three
processes, each of which needs at most two resources. Show that the system is deadlock free.

17. Consider a system with five processes P 0 through P 4 and have three resource types A, B, C.
Find out the number of instances of each resource type and retrieve the safe sequence.
MAX NEED AVAILABLE
A B C A B C A B C
P0 7 5 3 7 4 3 2 3 0
P1 3 2 2 0 2 0
P2 9 0 2 6 0 0
P3 2 2 2 0 1 1
P4 4 3 3 4 3 1

Module 3: Storage Management


Memory Management
1. Translation look aside Buffer is a kind of
a) interrupt b) cache
c) virtual memory d) i/o device.

2. Address generated by CPU is generally referred to as


a) Logical b) Relational
c) Virtual d) Physical.

3. Paging suffers from


a) Internal fragmentation b) External fragmentation
c) both (a) & (b) d) none of these.

4. Swap space generally resides on


` a) main memory b) files
c) program d) disk.

5. Variable partition memory allocation can lead to


a) external fragmentation b) internal fragmentation
c) both (a) and (b) d) none of these

6. Page fault occurs when


a) the page is corrupted by application software
b) the page is not in main memory
c) the page is in main memory
d) one tries to divide a number by 0

7. Compaction is used to solve the problem of


a) external fragmentation b) internal fragmentation
c) both (a) and (b) d) none of these
8. What are the disadvantages of segmentation memory management technique? How can these
disadvantages be avoided if segmentation with paging is used?

9.Why is page sizes always powers of 2?

10. A system has 8 physical frames. There are 7 processes in the system of which 4 processes
have 2 pages each and 3 processes have 1 page each. The system uses inverted page table. Find
the total number of page table entries in the system. Justify your answer.

11. What is compaction? What are its overheads?

12. Consider a logical address space of eight pages of 1024 words each, mapped onto a physical
memory of 32 frames.
i) How many bits are there in the logical address?
ii) How many bits are there in the physical address?

13. What is TLB? Draw the diagram of paging hardware with TLB.

14. Given memory partitions of 100 kb, 500 kb, 200 kb and 600 kb ( in order ), how would each
of the first fit, best-fit and worst-fit algorithms place process of 212 kb, 417 kb, 112 kb and 426
kb ( in order) ? Which algorithm makes the most efficient use of memory?

15. Give details of how paging is implemented in hardware.

16. What is fragmentation? Explain different types of fragmentation and their differences. Which
one may occur in paging system?

17. What is swapping? What is its purpose?

18. Consider a system with a 32-bit logical address space, a two-level paging scheme, 4 byte
page table entries, 1 KB pages and a 4 entry TLB. The page-table base register access time is 0
ns, TLB access time is 10 ns and memory access time is 100 ns.
a) How many address bits are needed for the page offset?
b) How much memory in bytes is required to store the outer page table entry in main
memory?

19. What are the two major differences between paging and segmentation?

Virtual Memory
1. Which of the following algorithm generally suffers from Belady’s anomaly
a) Optimal b) FIFO
c) LRU d) all of these.

2. Which of the following is false?


a) Segmentation suffers from external fragmentation
b) Paging suffers from internal fragmentation
c) virtual memory is used only in multiuser system
d) segmented memory can be paged

3. Thrashing
a) Reduces page I/O b) Decreases the degree of multiprogramming
c) Implies excessive I/O d) Improves the system performance

4. Virtual memory concept is supported by


a) Demand Paging b) Simple Segmentation
c) Any dynamic memory allocation d) Paged segmentation

5. What is thrashing? How can one detect the trashing?

6. Consider the following page reference string and a memory consisting of 4 frames:
1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6
Find the number of page faults considering
i) FIFO page replacement strategy
ii) LRU page replacement strategy.
Comment on the results obtained.

7. What is dynamic loading? What is dynamic linking?

8. Consider the following sequence of memory references generated by a single process in a pure
paging system: 10 11 104 170 173 309 245 246 247 258 264. Determine the number of page
faults for each of the following page replacement algorithms assuming three (3) page frames are
available and all are initially empty. The size of a page is 100 words:
a) LRU b) FIFO c) Optimal page replacement

9. Given references to the following pages by a program.


0, 9, 0, 1, 8, 1, 8, 7, 8, 7, 1, 2, 8, 2, 7
How many page faults will occur if the program has three(3) page frames available to it and uses
both FIFO and LRU replacement strategy. Which replacement strategy performs better and why?

10. Write short notes on Belady’s anomaly.

10. Having 3 physical memory frames show the behavior of LRU, FIFO and Optimal page
replacement algorithm for the page address string like 2, 3, 2, 1, 5, 2, 4, 5, 3, 2, 5, 2.

File Systems
1. What are the advantages and disadvantages of linked file Allocation Technique?

2. How does Indexed file Allocation Technique overcome the above disadvantages?

3. Write short notes on Linked file allocation technique

4. Explain with diagram different file allocation methods.


5. What is a record in a file? For a file having multiple records what are the different indexing
strategies there? Explain each strategy very briefly with relative advantages and disadvantages.

6. Write short notes on i-node

I/O Management

1. Differentiate between blocking vs Non-Blocking input-output.

2. What is Direct Memory Access? How is it performed? What are its benefits?

3. Describe different types of DMA controllers.

Disk Management
1. Disk I/O is generally done in terms of
a) Sectors b) Bytes
c) Blocks d) Bits.

2. The first block of a file system is


a) Superblock b) Inode blocks
c) Data block d) Boot block.

3. Which of the following RAID levels implements some form of parity calculations to introduce
redundancy?
a) RAID Level 2 b) RAID Level 4
c) RAID Level 6 d) All of these.

4. The time to move the disk arm to the desired cylinder in a hard disk is known as
a) Rotational latency b) Positioning time
c) Indexed d) Hashed.

5. RAID configuration disks are used to provide


a) Fault tolerance b) Nearest Cylinder next
c) High data intensity d) Low data intensity

6. SPOOLING stands for


a) Spontaneous Peripheral Operation Online b) Small Peripheral Operation Online
c) Simultaneous Peripheral Operation Online d) None of these

6. What is seek time? What is rotational latency?

7. What are the advantage of SCAN disk scheduling technique over circular SCAN disk
scheduling technique?

8. Explain the working of Shortest Seek Time First (SSTF) disk scheduling policy. What are its
advantages and disadvantages?
9. Suppose a disk drive has 300 cylinders, numbered 0 to 299. The current position of the desk
arm is 90. The queue of pending requests, in FIFO order is 36, 79, 15, 120, 199, 270, 89, 170.
Calculate the average movements for the following algorithms:
i) FCFS
ii) SSTF.

10. Explain the worst fit algorithm for memory management. What are its benefits?

11. Write short notes RAID

12. Write short notes on Boot block and bad block.

13. Suppose a disk has size 128 GB, and blocks are of size 64 KB. If all block numbers are
sorted as 4-byte integers, how large must a main memory file-allocation table(FAT) be?

14. Write short notes on Spooling.

15. Draw the disk read/write head movement diagram for SSTF, SCAN, C-SCAN and FIFO, for
the track requests as 25, 75, 35, 100, 95, 175, 78, 125, 90, 35.

Module 4: Protection and Security


1. Encryption is the process of
a) hiding information b) authenticating information
c) both (a) & (b) d) none of these.

2. Explain any one technique adopted by operating systems for protection of objects in the
system.

You might also like