OS MCQ-Part-1
OS MCQ-Part-1
Answer: d
2. To access the services of operating system, the interface is provided by the ___________
a) System calls b) API c) Library d) Assembly instructions
Answer: a
Explanation: To access services of the Operating System an interface is provided by the System Calls.
Generally, these are functions written in C and C++. Open, Close, Read, Write are some of most
prominently used system calls.
Answer: c
Explanation: Kernel is the first program which is loaded in memory when OS is loading as well as it remains
in memory till OS is running. Kernel is the core part of the OS which is responsible for managing resources,
allowing multiple processes to use the resources and provide services to various processes. Kernel
modules can be loaded and unloaded in run-time i.e. in running OS.
4. Which one of the following error will be handle by the operating system?
a) power failure
b) lack of paper in printer
c) connection failure in the network
d) all of the mentioned
Answer: d
Explanation: All the mentioned errors are handled by OS. The OS is continuously monitoring all of its
resources. Also, the OS is constantly detecting and correcting errors.
Answer: a
Explanation: The main function of command interpreter is to get and execute the next user-specified
command. Command Interpreter checks for valid command and then runs that command else it will throw
an error.
Answer: d
7. If a process fails, most operating system write the error information to a ______
a) log file
b) another running process
c) new file
d) none of the mentioned
Answer: a
Explanation: If a process fails, most operating systems write the error information to a log file. Log file is
examined by the debugger, to find out what is the actual cause of that particular problem. Log file is useful
for system programmers for correcting errors.
8. Which facility dynamically adds probes to a running system, both in user processes and in the kernel?
a) DTrace
b) DLocate
c) DMap
d) DAdd
Answer: a
Explanation: A facility that dynamically adds probes to a running system, both in user process and in the
kernel is called DTrace. This is very much useful in troubleshooting kernels in real-time.
Answer: d
Explanation: VxWorks, QNX & RTLinux are real-time operating systems. Palm OS is a mobile operating
system. Palm OS is developed for Personal Digital Assistants (PDAs).
10. The OS X has ____________
a) monolithic kernel
b) hybrid kernel
c) microkernel
d) monolithic kernel with modules
Answer: b
Explanation: OS X has a hybrid kernel. Hybrid kernel is a combination of two different kernels. OS X is
developed by Apple and originally it is known as Mac OS X.
1. The systems which allow only one process execution at a time, are called __________
a) uniprogramming systems
b) uniprocessing systems
c) unitasking systems
d) none of the mentioned
Answer: b
Explanation: Those systems which allow more than one process execution at a time, are called
multiprocessing systems. Uniprocessing means only one processor.
Answer: d
Explanation: In Operating Systems, each process has its own address space which contains code, data,
stack and heap segments or sections. Each process also has a list of files which is opened by the process
as well as all pending alarms, signals and various signal handlers.
Answer: a
Explanation: In UNIX, a new process is created by fork() system call. fork() system call returns a process ID
which is generally the process id of the child process created.
Answer: d
Explanation: A process can be terminated normally by completing its task or because of fatal error or killed
by another process or forcefully killed by a user. When the process completes its task without any error
then it exits normally. The process may exit abnormally because of the occurrence of fatal error while it is
running. The process can be killed or terminated forcefully by another process.
Answer: a
Explanation: Ready state of the process means process has all necessary resources which are required for
execution of that process when CPU is allocated. Process is ready for execution but waiting for the CPU to
be allocated.
Answer: b
Answer: a
Explanation: Deadlock is a situation which occurs because process A is waiting for one resource and holds
another resource (blocking resource). At the same time another process B demands blocking a resource as
it is already held by a process A, process B is waiting state unless and until process A releases occupied
resource.
Answer: d
Explanation: Process stack contains Function parameters, Local variables and Return address. It does not
contain the PID of child process.
9. Which system call can be used by a parent process to determine the termination of child process?
a) wait b) exit c) fork d) get
Answer: a
Explanation: wait() system call is used by the parent process to determine termination of child process. The
parent process uses wait() system call and gets the exit status of the child process as well as the pid of the
child process which is terminated.
10. The address of the next instruction to be executed by the current process is provided by the
__________
a) CPU registers
b) Program counter
c) Process stack
d) Pipe
Answer: b
Explanation: The address of the next instruction to be executed by the current process is provided by the
Program Counter. After every instruction is executed, the Program Counter is incremented by 1 i.e. address
of the next instruction to be executed. CPU fetches instruction from the address denoted by Program
Counter and execute it.
Answer: c
Explanation: Process Control Block (PCB) contains information related to a process such as Process State,
Program Counter, CPU Register, etc. Process Control Block is also known as Task Control Block.
Bootstrap program is a program which runs initially when the system or computer is booted or rebooted.
Answer: b
Explanation: The number of processes completed per unit time is known as Throughput. Suppose there are
4 processes A, B, C & D they are taking 1, 3, 4 & 7 units of time respectively for their executions. For 10
units of time, throughput is high if process A, B & C are running first as 3 processes can execute. If process
C runs first then throughput is low as maximum only 2 processes can execute. Throughput is low for
processes which take a long time for execution. Throughput is high for processes which take a short time
for execution.
Answer: d
Explanation: The state of a process is defined by the current activity of the process. A process state
changes when the process executes. The process states are as New, Ready, Running, Wait, Terminated.
Explanation: There is no process state such as old. When a process is created then the process is in New
state. When the process gets the CPU for its execution then the process is in Running state. When the
process is waiting for an external event then the process is in a Waiting state.
Answer: b
Explanation: A Process Control Block (PCB) is a data structure. It contains information related to a process
such as Process State, Program Counter, CPU Register, etc. Process Control Block is also known as Task
Control Block.
Answer: c
Explanation: The entry of all the PCBs of the current processes is in Process Table. The Process Table has
the status of each and every process that is created in OS along with their PIDs.
Answer: d
Explanation: Multiprogramming means the number of processes are in the ready states. To increase
utilization of CPU, Multiprogramming is one of the most important abilities of OS. Generally, a single
process cannot use CPU or I/O at all time, whenever CPU or I/O is available another process can use it. By
doing this CPU utilization is increased.
Answer: a
Explanation: A single thread of control allows the process to perform only one task at a time. In the case of
multi-core, multiple threads can be run simultaneously and can perform multiple tasks at a time.
Answer: c
Explanation: The objective of multiprogramming is to increase CPU utilization. Generally, a single process
cannot use CPU or I/O at all time, whenever CPU or I/O is available another process can use it.
Multiprogramming offers this ability to OS by keeping multiple programs in a ready queue.
Operating System Questions and Answers – Process Scheduling Queues
Answer: b
Explanation: PCB queue does not belong to queues for processes. PCB is a process control block which
contains information related to process. Each process is represented by PCB.
Answer: a
Explanation: When the process issues an I/O request it is placed in an I/O queue. I/O is a resource and it
should be used effectively and every process should get access to it. There might be multiple processes
which requested for I/O. Depending on scheduling algorithm I/O is allocated to any particular process and
after completing I/O operation, I/O access is returned to the OS.
Answer: a
Explanation: When a process terminates, it removes from all queues. All allocated resources to that
particular process are deallocated and all those resources are returned back to OS.
Answer: a
Explanation: A long-term scheduler selects processes which have to be brought into the ready queue.
When processes enter the system, they are put in the job queue. Long-term scheduler selects processes
from the job queue and puts them in the ready queue. It is also known as Job Scheduler.
5. If all processes I/O bound, the ready queue will almost always be ______ and the Short term Scheduler
will have a ______ to do.
a) full, little
b) full, lot
c) empty, little
d) empty, lot
Answer: c
Explanation: If all processes are I/O bound, the ready queue will almost empty and the short-term
scheduler will have a little to do. I/O bound processes spend more time doing I/O than computation.
6. What is a medium-term scheduler?
a) It selects which process has to be brought into the ready queue
b) It selects which process has to be executed next and allocates CPU
c) It selects which process to remove from memory by swapping
d) None of the mentioned
Answer: c
Explanation: A medium-term scheduler selects which process to remove from memory by swapping. The
medium-term scheduler swapped out the process and later swapped in. Swapping helps to free up
memory.
Answer: b
Explanation: A short-term scheduler selects a process which has to be executed next and allocates CPU.
Short-term scheduler selects a process from the ready queue. It selects processes frequently.
8. The primary distinction between the short term scheduler and the long term scheduler is __________
a) The length of their queues
b) The type of processes they schedule
c) The frequency of their execution
d) None of the mentioned
Answer: c
Explanation: The primary distinction between the short-term scheduler and the long-term scheduler is the
frequency of their execution. The short-term scheduler executes frequently while the long-term scheduler
executes much less frequently.
9. The only state transition that is initiated by the user process itself is __________
a) block
b) wakeup
c) dispatch
d) none of the mentioned
Answer: a
Explanation: The only state transition that is initiated by the user process itself is block. Whenever a user
process initiates an I/O request it goes into block state unless and until the I/O request is not completed.
10. In a time-sharing operating system, when the time slot given to a process is completed, the process
goes from the running state to the __________
a) Blocked state
b) Ready state
c) Suspended state
d) Terminated state
Answer: b
Explanation: In a time-sharing operating system, when the time slot given to a process is completed, the
process goes from the running state to the Ready State. In a time-sharing operating system unit time is
defined for sharing CPU, it is called a time quantum or time slice. If a process takes less than 1 time
quantum, then the process itself releases the CPU.
11. In a multiprogramming environment __________
a) the processor executes more than one process at a time
b) the programs are developed by more than one person
c) more than one process resides in the memory
d) a single user can execute many programs at the same time
Answer: c
Explanation: In a multiprogramming environment more than one process resides in the memory. Whenever
a CPU is available, one process amongst all present in memory gets the CPU for execution.
Multiprogramming increases CPU utilization.
12. Suppose that a process is in “Blocked” state waiting for some I/O service. When the service is
completed, it goes to the __________
a) Running state
b) Ready state
c) Suspended state
d) Terminated state
Answer: b
Explanation: Suppose that a process is in “Blocked” state waiting for some I/O service. When the service is
completed, it goes to the ready state. Process never goes directly to the running state from the waiting
state. Only processes which are in ready state go to the running state whenever CPU allocated by
operating system.
13. The context of a process in the PCB of a process does not contain __________
a) the value of the CPU registers
b) the process state
c) memory-management information
d) context switch time
Answer: d
Explanation: The context of a process in the PCB of a process does not contain context switch time. When
switching CPU from one process to another, the current context of the process needs to be saved. It
includes values of the CPU registers, process states, memory-management information.
14. Which of the following need not necessarily be saved on a context switch between processes?
a) General purpose registers
b) Translation lookaside buffer
c) Program counter
d) All of the mentioned
Answer: b
Explanation: Translation Look-aside Buffer (TLB) need not necessarily be saved on a context switch
between processes. A special, small, fast-lookup hardware cache is called Translation Look-aside Buffer.
TLB used to reduce memory access time.
Answer: c
Explanation: Scheduler process does not interrupt a running process. Scheduler process selects an
available process from a pool of available processes and allocates CPU to it.
Answer: a
Explanation: None.
2. The processes that are residing in main memory and are ready and waiting to execute are kept on a list
called _____________
a) job queue
b) ready queue
c) execution queue
d) process queue
Answer: b
Explanation: None.
3. The interval from the time of submission of a process to the time of completion is termed as
____________
a) waiting time
b) turnaround time
c) response time
d) throughput
Answer: b
Explanation: None.
4. Which scheduling algorithm allocates the CPU first to the process that requests the CPU first?
a) first-come, first-served scheduling
b) shortest job scheduling
c) priority scheduling
d) none of the mentioned
Answer: a
Explanation: None.
Answer: a
Explanation: None.
6. In priority scheduling algorithm, when a process arrives at the ready queue, its priority is compared with
the priority of ____________
a) all process
b) currently running process
c) parent process
d) init process
Answer: b
Explanation: None.
7. Which algorithm is defined in Time quantum?
a) shortest job scheduling algorithm
b) round robin scheduling algorithm
c) priority scheduling algorithm
d) multilevel queue scheduling algorithm
Answer: b
Explanation: None.
Answer: d
Explanation: None.
Answer: a
Explanation: None.
10. Which one of the following can not be scheduled by the kernel?
a) kernel level thread
b) user level thread
c) process
d) none of the mentioned
Answer: b
Explanation: User level threads are managed by thread library and the kernel is unaware of them.
Answer: b
Explanation: None.
Answer: a
Explanation: None.
Answer: b
Explanation: None.
Answer: c
Explanation: None.
5. A process is selected from the ______ queue by the ________ scheduler, to be executed.
a) blocked, short term
b) wait, long term
c) ready, short term
d) ready, long term
Answer: c
Explanation: None.
Answer: b
Explanation: There is no other choice.
7. The switching of the CPU from one process or thread to another is called ____________
a) process switch
b) task switch
c) context switch
d) all of the mentioned
Answer: d
Explanation: None.
Answer: c
Explanation: None.
Answer: a
Explanation: None.
Answer: d
Explanation: None.
Answer: b
Explanation: None.
Answer: b
Explanation: None.
Answer: c
Explanation: None.
Answer: b
Explanation: None.
Answer: b
Explanation: None.
Answer: a
Explanation: All the processes will be able to get completed.
3. The portion of the process scheduler in an operating system that dispatches processes is concerned with
____________
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
c) assigning running processes to blocked queue
d) all of the mentioned
Answer: a
Explanation: None.
Answer: a
Explanation: Large computers are overloaded with a greater number of processes.
Answer: b
Explanation: None.
6. The strategy of making processes that are logically runnable to be temporarily suspended is called
____________
a) Non preemptive scheduling
b) Preemptive scheduling
c) Shortest job first
d) First come First served
Answer: b
Explanation: None.
7. What is Scheduling?
a) allowing a job to use the processor
b) making proper use of processor
c) all of the mentioned
d) none of the mentioned
Answer: a
Explanation: None.
8. There are 10 different processes running on a workstation. Idle processes are waiting for an input event
in the input queue. Busy processes are scheduled with the Round-Robin time sharing method. Which out of
the following quantum times is the best value for small response times, if the processes have a short
runtime, e.g. less than 10ms?
a) tQ = 15ms
b) tQ = 40ms
c) tQ = 45ms
d) tQ = 50ms
Answer: a
Explanation: None.
9. Orders are processed in the sequence they arrive if _______ rule sequences the jobs.
a) earliest due date
b) slack time remaining
c) first come, first served
d) critical ratio
Answer: c
Explanation: None.
10. Which of the following algorithms tends to minimize the process flow time?
a) First come First served
b) Shortest Job First
c) Earliest Deadline First
d) Longest Job First
Answer: b
Explanation: None.
11. Under multiprogramming, turnaround time for short jobs is usually ________ and that for long jobs is
slightly ___________
a) Lengthened; Shortened
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged
Answer: b
Explanation: None.
a) I only
b) I and III only
c) II and III only
d) I, II and III
Answer: d
Explanation: I) Shortest remaining time first scheduling is a preemptive version of shortest job scheduling. It
may cause starvation as shorter processes may keep coming and a long CPU burst process never gets
CPU.
II) Preemption may cause starvation. If priority based scheduling with preemption is used, then a low
priority process may never get CPU.
III) Round Robin Scheduling improves response time as all processes get CPU after a specified time.
Operating System Questions and Answers – The Critical Section (CS) Problem and Solutions
Answer: c
Explanation: None.
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
Answer: b
Explanation: None.
3. The segment of code in which the process may change common variables, update tables, write into files
is known as ____________
a) program
b) critical section
c) non – critical section
d) synchronizing
Answer: b
Explanation: None.
4. Which of the following conditions must be satisfied to solve the critical section problem?
a) Mutual Exclusion
b) Progress
c) Bounded Waiting
d) All of the mentioned
Answer: d
Explanation: None.
6. Bounded waiting implies that there exists a bound on the number of times a process is allowed to enter
its critical section ____________
a) after a process has made a request to enter its critical section and before the request is granted
b) when another process is in its critical section
c) before a process has made a request to enter its critical section
d) none of the mentioned
Answer: a
Explanation: None.
7. A minimum of _____ variable(s) is/are required to be shared between processes to solve the critical
section problem.
a) one
b) two
c) three
d) four
Answer: b
Explanation: None.
Answer: b
Explanation: None.
Answer: b
Explanation: None.
Answer: c
Explanation: None.
Answer: c
Explanation: None.
4. What are the two atomic operations permissible on semaphores?
a) wait
b) stop
c) hold
d) none of the mentioned
Answer: a
Explanation: None.
Answer: d
Explanation: None.
Answer: b
Explanation: None.
7. The wait operation of the semaphore basically works on the basic _______ system call.
a) stop()
b) block()
c) hold()
d) wait()
Answer: b
Explanation: None.
8. The signal operation of the semaphore basically works on the basic _______ system call.
a) continue()
b) wakeup()
c) getup()
d) start()
Answer: b
Explanation: None.
Answer: a
Explanation: None.
10. The code that changes the value of the semaphore is ____________
a) remainder section code
b) non – critical section code
c) critical section code
d) none of the mentioned
Answer: c
Explanation: None.
11. 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
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 P0 print ‘0’?
a) At least twice
b) Exactly twice
c) Exactly thrice
d) Exactly once
Answer: a
Explanation: None.
repeat
P(mutex)
{Critical Section}
V(mutex)
forever
The code for P10 is identical except that it uses V(mutex) instead of P(mutex). What is the largest number
of processes that can be inside the critical section at any moment (the mutex being initialized to 1)?
a) 1
b) 2
c) 3
d) None of the mentioned
Answer: c
Explanation: Any one of the 9 processes can get into critical section after executing P(mutex) which
decrements the mutex value to 0. At this time P10 can enter critical section by incrementing the value to 1.
Now any of the 9 processes can enter the critical section by again decrementing the mutex value to 0.
None of the remaining processes can get into their critical sections.
13. Two processes, P1 and P2, need to access a critical section of code. Consider the following
synchronization construct used by the processes.
Process P1 :
while(true)
{
w1 = true;
while(w2 == true);
Critical section
w1 = false;
}
Remainder Section
Process P2 :
while(true)
{
w2 = true;
while(w1 == true);
Critical section
w2 = false;
}
Remainder Section
Here, w1 and w2 have 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
Answer: d
Explanation: None.
Answer: d
Explanation: None.
Answer: d
Explanation: None.
3. If the process can be moved during its execution from one memory segment to another, then binding
must be ____________
a) delayed until run time
b) preponed to compile time
c) preponed to load time
d) none of the mentioned
Answer: a
Explanation: None.
Answer: b
Explanation: None.
5. What is the advantage of dynamic loading?
a) A used routine is used multiple times
b) An unused routine is never loaded
c) CPU utilization increases
d) All of the mentioned
Answer: b
Explanation: None.
Answer: d
Explanation: None.
Answer: a
Explanation: None.
Answer: a
Explanation: None.
9. If a higher priority process arrives and wants service, the memory manager can swap out the lower
priority process to execute the higher priority process. When the higher priority process finishes, the lower
priority process is swapped back in and continues execution. This variant of swapping is sometimes called?
a) priority swapping
b) pull out, push in
c) roll out, roll in
d) none of the mentioned
Answer: c
Explanation: None.
10. If binding is done at assembly or load time, then the process _____ be moved to different locations after
being swapped out and in again.
a) can
b) must
c) can never
d) may
Answer: c
Explanation: None.
Answer: a
Explanation: None.
Answer: c
Explanation: None.
1. CPU fetches the instruction from memory according to the value of ____________
a) program counter
b) status register
c) instruction register
d) program status word
Answer: a
Explanation: None.
Answer: b
Explanation: None.
Answer: c
Explanation: None.
Answer: a
Explanation: None.
5. Memory management technique in which system stores and retrieves data from secondary storage for
use in main memory is called?
a) fragmentation
b) paging
c) mapping
d) none of the mentioned
Answer: b
Explanation: None.
Answer: b
Explanation: None.
Answer: a
Explanation: None.
Answer: a
Explanation: None.
9. What is compaction?
a) a technique for overcoming internal fragmentation
b) a paging technique
c) a technique for overcoming external fragmentation
d) a technique for overcoming fatal error
Answer: c
Explanation: None.
Answer: a
Explanation: None.
Answer: a
Explanation: None.
2. Logical memory is broken into blocks of the same size called _________
a) frames
b) pages
c) backing store
d) none of the mentioned
Answer: b
Explanation: None.
3. Every address generated by the CPU is divided into two parts. They are ____________
a) frame bit & page number
b) page number & page offset
c) page offset & frame bit
d) frame offset & page offset
Answer: b
Explanation: None.
Answer: b
Explanation: None.
5. The _____ table contains the base address of each page in physical memory.
a) process
b) memory
c) page
d) frame
Answer: c
Explanation: None.
Answer: b
Explanation: None.
7. If the size of logical address space is 2 to the power of m, and a page size is 2 to the power of n
addressing units, then the high order _____ bits of a logical address designate the page number, and the
____ low order bits designate the page offset.
a) m, n
b) n, m
c) m – n, m
d) m – n, n
Answer: d
Explanation: None.
8. With paging there is no ________ fragmentation.
a) internal
b) external
c) either type of
d) none of the mentioned
Answer: b
Explanation: None.
9. The operating system maintains a ______ table that keeps track of how many frames have been
allocated, how many are there, and how many are available.
a) page
b) mapping
c) frame
d) memory
Answer: c
Explanation: None.
Answer: c
Explanation: None.
Answer: d
Explanation: None.
Answer: b
Explanation: None.
13. For larger page tables, they are kept in main memory and a __________ points to the page table.
a) page table base register
b) page table base pointer
c) page table register pointer
d) page table base
Answer: a
Explanation: None.
Answer: a
Explanation: None.
15. Time taken in memory access through PTBR is ____________
a) extended by a factor of 3
b) extended by a factor of 2
c) slowed by a factor of 3
d) slowed by a factor of 2
Answer: d
Explanation: None.
Answer: a
Explanation: None.
Answer: a
Explanation: None.
Answer: a
Explanation: None.
4. The ability to execute a program that is only partially in memory has benefits like ____________
a) The amount of physical memory cannot put a constraint on the program
b) Programs for an extremely large virtual space can be created
c) Throughput increases
d) All of the mentioned
Answer: d
Explanation: None.
Answer: b
Explanation: None.
Answer: a
Explanation: None.
7. Segment replacement algorithms are more complex than page replacement algorithms because
____________
a) Segments are better than pages
b) Pages are better than segments
c) Segments have variable sizes
d) Segments have fixed sizes
Answer: c
Explanation: None.
8. A swapper manipulates ___________ whereas the pager is concerned with individual _______ of a
process.
a) the entire process, parts
b) all the pages of a process, segments
c) the entire process, pages
d) none of the mentioned
Answer: c
Explanation: None.
Answer: c
Explanation: None.
10. The valid – invalid bit, in this case, when valid indicates?
a) the page is not legal
b) the page is illegal
c) the page is in memory
d) the page is not in memory
Answer: c
Explanation: None.
Answer: b
Explanation: None.
12. When a page fault occurs, the state of the interrupted process is ____________
a) disrupted
b) invalid
c) saved
d) none of the mentioned
Answer: c
Explanation: None.
13. When a process begins execution with no pages in memory?
a) process execution becomes impossible
b) a page fault occurs for every page brought into memory
c) process causes system crash
d) none of the mentioned
Answer: b
Explanation: None.
14. If the memory access time is denoted by ‘ma’ and ‘p’ is the probability of a page fault (0 <= p <= 1).
Then the effective access time for a demand paged memory is ____________
a) p x ma + (1-p) x page fault time
b) ma + page fault time
c) (1-p) x ma + p x page fault time
d) none of the mentioned
Answer: c
Explanation: None.
Answer: c
Explanation: None.
16. Locality of reference implies that the page reference being made by a process ____________
a) will always be to the page used in the previous page reference
b) is likely to be one of the pages used in the last few page references
c) will always be one of the pages existing in memory
d) will always lead to page faults
Answer: b
Explanation: None.
Operating System Questions & Answers – Virtual Memory – Page Replacement Algorithms – 2
1. When using counters to implement LRU, we replace the page with the ____________
a) smallest time value
b) largest time value
c) greatest size
d) none of the mentioned
Answer: a
Explanation: Whenever a reference to a page is made, the contents of the clock register are copied into the
time-of-use field in the page-table entry for that page. In this way, we always have the time of the last
reference to each page.
2. In the stack implementation of the LRU algorithm, a stack can be maintained in a manner ____________
a) whenever a page is used, it is removed from the stack and put on bottom
b) the bottom of the stack is the LRU page
c) the top of the stack contains the LRU page and all new pages are added to the top
d) none of the mentioned
Answer: b
Explanation: None.
3. There is a set of page replacement algorithms that can never exhibit Belady’s Anomaly, called
____________
a) queue algorithms
b) stack algorithms
c) string algorithms
d) none of the mentioned
Answer: b
Explanation: None.
Answer: c
Explanation: None.
Answer: b
Explanation: None.
7. The minimum number of page frames that must be allocated to a running process in a virtual memory
environment is determined by ____________
a) the instruction set architecture
b) page size
c) physical memory size
d) number of processes in memory
Answer: a
Explanation: None.
8. What is the reason for using the LFU page replacement algorithm?
a) an actively used page should have a large reference count
b) a less used page has more chances to be used again
c) it is extremely efficient and optimal
d) all of the mentioned
Answer: a
Explanation: None.
9. What is the reason for using the MFU page replacement algorithm?
a) an actively used page should have a large reference count
b) a less used page has more chances to be used again
c) it is extremely efficient and optimal
d) all of the mentioned
Answer: b
Explanation: None.
10. The implementation of the LFU and the MFU algorithm is very uncommon because ____________
a) they are too complicated
b) they are optimal
c) they are expensive
d) all of the mentioned
Answer: c
Explanation: None.