0% found this document useful (0 votes)
331 views46 pages

Operating System Questions and Answerss

This document contains a series of multiple choice questions about operating system memory management concepts like swapping processes, paging, and memory allocation. Specifically, it focuses on address binding, dynamic loading, overlays, priority swapping, and the roles of the memory manager, backing store, and ready queue in swapping processes between memory and secondary storage. It also covers topics like logical vs physical addresses, the memory management unit, and contiguous vs non-contiguous memory allocation techniques.

Uploaded by

Michael Peter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
331 views46 pages

Operating System Questions and Answerss

This document contains a series of multiple choice questions about operating system memory management concepts like swapping processes, paging, and memory allocation. Specifically, it focuses on address binding, dynamic loading, overlays, priority swapping, and the roles of the memory manager, backing store, and ready queue in swapping processes between memory and secondary storage. It also covers topics like logical vs physical addresses, the memory management unit, and contiguous vs non-contiguous memory allocation techniques.

Uploaded by

Michael Peter
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 46

Operating System Questions and Answers –

Memory Management – Swapping Processes


–1
This set of 1000+ Operating System MCQs focuses on “Memory Management – Swapping
processes”

1) Address Binding is :
a) going to an address in memory
b) locating an address with the help of another address
c) binding two addresses together to form a new address in a different memory space
d) a mapping from one address space to another
View Answer

Answer: d
Explanation: None.

2) Binding of instructions and data to memory addresses can be done at :


a) Compile time
b) Load time
c) Execution time
d) All of these
View Answer

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 these
View Answer

Answer: a
Explanation: None.

4) Dynamic loading is :
a) loading multiple routines dynamically
b) loading a routine only when it is called
c) loading multiple routines randomly
d) None of these
View Answer

Answer: b
Explanation: None.

5) The advantage of dynamic loading is that :


a) a used routine is used multiple times
b) an unused routine is never loaded
c) CPU utilization increases
d) All of these
View Answer

Answer: b
Explanation: None.

6) The idea of overlays is to : (choose all that apply)


a) enable multiple processes execute at once
b) enable a process to be larger than the amount of memory allocated to it
c) keep in memory only those instructions and data that are needed at any given time
d) All of these
View Answer

Answer: b and c
Explanation: None.

7) The ___________ must design and program the overlay structure.


a) programmer
b) system architect
c) system designer
d) None of these
View Answer

Answer: a
Explanation: None.

8) The ___________ swaps processes in and out of the memory.


a) memory manager
b) CPU
c) CPU manager
d) user
View Answer

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 these
View Answer

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
View Answer

Answer: c
Explanation: None.

11) In a system that does not support swapping,


a) the compiler normally binds symbolic addresses (variables) to relocatable addresses
b) the compiler normally binds symbolic addresses to physical addresses
c) the loader binds relocatable addresses to physical addresses
d) binding of symbolic addresses to physical addresses normally takes place during execution
View Answer

Answer: a, c
Explanation: None.

12) Which of the following is TRUE ?


a) Overlays are used to increase the size of physical memory
b) Overlays are used to increase the logical address space
c) When overlays are used, the size of a process is not limited to the size of the physical memory
d) Overlays are used whenever the physical address space is smaller than the logical address
space
View Answer

Answer: c
Explanation: None.
Operating System Questions and Answers –
Memory Management – Swapping Processes
–2
This set of 1000+ Operating System MCQs focuses on “Memory Management – Swapping
processes” and will also be useful for interview preparations for experienced people.

1) The address generated by the CPU is referred to as :


a) physical address
b) logical address
c) Neither a nor b
View Answer

Answer: b
Explanation: None.

2) The address loaded into the memory address register of the memory is referred to as :
a) physical address
b) logical address
c) Neither a nor b
View Answer

Answer: a
Explanation: None.

3) The run time mapping from virtual to physical addresses is done by a hardware device called
the :
a) Virtual to physical mapper
b) memory management unit
c) memory mapping unit
d) None of these
View Answer

Answer: b
Explanation: None.

4) The base register is also known as the :


a) basic register
b) regular register
c) relocation register
d) delocation register
View Answer
Answer: c
Explanation: None.

5) The size of a process is limited to the size of :


a) physical memory
b) external storage
c) secondary storage
d) None of these
View Answer

Answer: a
Explanation: None.

6) If execution time binding is being used, then a process ______ be swapped to a different
memory space.
a) has to be
b) can never
c) must
d) may
View Answer

Answer: d
Explanation: None.

7) Swapping requires a __________.


a) motherboard
b) keyboard
c) monitor
d) backing store
View Answer

Answer: d
Explanation: None.

8) The backing store is generally a : (choose all that apply)


a) fast disk
b) disk large enough to accommodate copies of all memory images for all users
c) disk to provide direct access to the memory images
d) All of these
View Answer

Answer: d
Explanation: None.

9) The ________ consists of all processes whose memory images are in the backing store or in
memory and are ready to run.
a) wait queue
b) ready queue
c) CPU
d) secondary storage
View Answer

Answer: b
Explanation: None.

10) The _________ time in a swap out of a running process and swap in of a new process into
the memory is very high.
a) context – switch
b) waiting
c) execution
d) All of these
View Answer

Answer: a
Explanation: None.

11) The major part of swap time is _______ time.


a) waiting
b) transfer
c) execution
d) None of these
View Answer

Answer: b
Explanation: None.

12) Swapping _______ be done when a process has pending I/O, or has to execute I/O operations
only into operating system buffers.
a) must
b) can
c) must never
d) maybe
View Answer

Answer: c
Explanation: None.

13) Swap space is allocated :


a) as a chunk of disk
b) separate from a file system
c) into a file system
d) All of these
View Answer

Answer: a and b
Explanation: None.

Operating System Questions & Answers –


Memory Management
This section of our 1000+ Operating System MCQs focuses on memory management of
Operating System.

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
View Answer

Answer:a
Explanation:None.

2.A memory buffer used to accommodate a speed differential is called


a)stack-pointer
b)cache
c)accumulator
d)disk-buffer
View Answer

Answer:b
Explanation:None.

3.Which one of the following is the address generated by CPU?


a)physical-address
b)-absolute-address
c)logical-address
d)none-of-the-mentioned
View Answer

Answer:c
Explanation:None.
4.Run time mapping from virtual to physical address is done by
a)memory-management-unit
b)CPU
c)PCI
d)none-of-the-mentioned
View Answer

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
View Answer

Answer:b
Explanation:None.

6.The-address-of-a-page-table-in-memory-is-pointed-by
a)stack-pointer
b)page-table-base-register
c)page-register
d)program-counter
View Answer

Answer:b
Explanation:None.

7.Program-always-deals-with
a)logical-address
b)absolute-address
c)physical-address
d)relative-address
View Answer

Answer:a
Explanation:None.

8.The-page-table-contains
a)base-address-of-each-page-in-physical-memory
b)page-offset
c)page-size
d)none-of-the-mentioned
View Answer

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
View Answer

Answer:c
Explanation:None.

10.Operating-System-maintains-the-page-table-for
a)each-process
b)each-thread
c)each-instruction
d)each-address
View Answer

Answer:a
Explanation:None.

Operating System Questions and Answers –


Memory Management – Memory Allocation
–1
This set of 1000+ Operating System MCQs focuses on “Memory Management – Memory
Allocation”

1) The main memory accommodates :


a) operating system
b) CPU
c) user processes
d) All of these
View Answer

Answer: a and c
Explanation: None.
2) The operating system is :
a) in the low memory
b) in the high memory
c) either a or b (depending on the location of interrupt vector)
d) None of these
View Answer

Answer: c
Explanation: None.

3) In contiguous memory allocation :


a) each process is contained in a single contiguous section of memory
b) all processes are contained in a single contiguous section of memory
c) the memory space is contiguous
d) None of these
View Answer

Answer: a
Explanation: None.

4) The relocation register helps in :


a) providing more address space to processes
b) a different address space to processes
c) to protect the address spaces of processes
d) None of these
View Answer

Answer: c
Explanation: None.

5) With relocation and limit registers, each logical address must be _______ the limit register.
a) less than
b) equal to
c) greater than
d) None of these
View Answer

Answer: a
Explanation: None.

6) The operating system and the other processes are protected from being modified by an already
running process because :
a) they are in different memory spaces
b) they are in different logical addresses
c) they have a protection algorithm
d) every address generated by the CPU is being checked against the relocation and limit registers
View Answer

Answer: d
Explanation: None.

7) Transient operating system code is code that :


a) is not easily accessible
b) comes and goes as needed
c) stays in the memory always
d) never enters the memory space
View Answer

Answer: b
Explanation: None.

8) Using transient code, _______ the size of the operating system during program execution.
a) increases
b) decreases
c) changes
d) maintains
View Answer

Answer: c
Explanation: None.

9) When memory is divided into several fixed sized partitions, each partition may contain
________.
a) exactly one process
b) atleast one process
c) multiple processes at once
d) None of these
View Answer

Answer: a
Explanation: None.

10) In fixed sized partition, the degree of multiprogramming is bounded by ___________.


a) the number of partitions
b) the CPU utilization
c) the memory size
d) All of these
View Answer

Answer: a
Explanation: None
11) The first fit, best fit and worst fit are strategies to select a ______.
a) process from a queue to put in memory
b) processor to run the next process
c) free hole from a set of available holes
d) All of these
View Answer

Answer: c
Explanation: None.

Operating System Questions and Answers –


Memory Management – Memory Allocation
–2
This set of 1000+ Operating System Test focuses on “Memory Management – Memory
Allocation”

1) In internal fragmentation, memory is internal to a partition and :


a) is being used
b) is not being used
c) is always used
d) None of these
View Answer

Answer: b
Explanation: None.

2) A solution to the problem of external fragmentation is :


a) compaction
b) larger memory space
c) smaller memory space
d) None of these
View Answer

Answer: a
Explanation: None.

3) Another solution to the problem of external fragmentation problem is to :


a) permit the logical address space of a process to be noncontiguous
b) permit smaller processes to be allocated memory at last
c) permit larger processes to be allocated memory at last
d) All of these
View Answer

Answer: a
Explanation: None.

4) If relocation is static and is done at assembly or load time, compaction _________.


a) cannot be done
b) must be done
c) must not be done
d) can be done
View Answer

Answer: a
Explanation: None.

5) The disadvantage of moving all process to one end of memory and all holes to the other
direction, producing one large hole of available memory is :
a) the cost incurred
b) the memory used
c) the CPU used
d) All of these
View Answer

Answer: a
Explanation: None.

6) __________ is generally faster than _________ and _________.


a) first fit, best fit, worst fit
b) best fit, first fit, worst fit
c) worst fit, best fit, first fit
d) None of these
View Answer

Answer: a
Explanation: None.

7) External fragmentation exists when :


a) enough total memory exists to satisfy a request but it is not contiguous
b) the total memory is insufficient to satisfy a request
c) a request cannot be satisfied even when the total memory is free
d) None of these
View Answer

Answer: a
Explanation: None.
8) External fragmentation will not occur when :
a) first fit is used
b) best fit is used
c) worst fit is used
d) no matter which algorithm is used, it will always occur
View Answer

Answer: d
Explanation: None.

9) Sometimes the overhead of keeping track of a hole might be :


a) larger than the memory
b) larger than the hole itself
c) very small
d) All of these
View Answer

Answer: b
Explanation: None.

10) When the memory allocated to a process is slightly larger than the process, then :
a) internal fragmentation occurs
b) external fragmentation occurs
c) both a and b
d) neither a nor b
View Answer

Answer: a
Explanation: None

Operating System Questions and Answers –


Memory Management – Paging – 1
This set of 1000+ Operating System MCQs focuses on “Memory Management – Paging”

1) Physical memory is broken into fixed-sized blocks called ________.


a) frames
b) pages
c) backing store
d) None of these
View Answer
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 these
View Answer

Answer: b
Explanation: None.

3) Every address generated by the CPU is divided into two parts : (choose two)
a) frame bit
b) page number
c) page offset
d) frame offset
View Answer

Answer: b and c
Explanation: None.

4) The __________ is used as an index into the page table.


a) frame bit
b) page number
c) page offset
d) frame offset
View Answer

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
View Answer

Answer: c
Explanation: None.

6) The size of a page is typically :


a) varied
b) power of 2
c) power of 4
d) None of these
View Answer

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
View Answer

Answer: d
Explanation: None.

8) With paging there is no ________ fragmentation.


a) internal
b) external
c) either type of
d) None of these
View Answer

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
View Answer

Answer: c
Explanation: None.

10) Paging increases the ______ time.


a) waiting
b) execution
c) context – switch
d) All of these
View Answer
Answer: c
Explanation: None.

11) Smaller page tables are implemented as a set of _______.


a) queues
b) stacks
c) counters
d) registers
View Answer

Answer: d
Explanation: None.

12) The page table registers should be built with _______.


a) very low speed logic
b) very high speed logic
c) a large memory space
d) None of these
View Answer

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
View Answer

Answer: a
Explanation: None.

14) For every process there is a __________.


a) page table
b) copy of page table
c) pointer to page table
d) All of these
View Answer

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
View Answer

Answer: d
Explanation: None.

Operating System Questions and Answers –


Memory Management – Paging – 2
This set of 1000+ Operating System Quiz focuses on “Memory Management – Paging”

1) Each entry in a Translation look-aside buffer (TLB) consists of :


a) key
b) value
c) bit value
d) constant
View Answer

Answer: a and b
Explanation: None.

2) If a page number is not found in the TLB, then it is known as a :


a) TLB miss
b) buffer miss
c) TLB hit
d) TLB hit
View Answer

Answer: a
Explanation: None.

3) An ______ uniquely identifies processes and is used to provide address space protection for
that process.
a) address space locator
b) address space identifier
c) address process identifier
d) None of these
View Answer

Answer: b
Explanation: None.
4) The percentage of times a page number is found in the TLB is known as :
a) miss ratio
b) hit ratio
c) miss percent
d) None of these
View Answer

Answer: b
Explanation: None.

5) Memory protection in a paged environment is accomplished by :


a) protection algorithm with each page
b) restricted access rights to users
c) restriction on page visibility
d) protection bit with each page
View Answer

Answer: d
Explanation: None.

6) When the valid – invalid bit is set to valid, it means that the associated page :
a) is in the TLB
b) has data in it
c) is in the process‟s logical address space
d) is the system‟s physical address space
View Answer

Answer: c
Explanation: None.

7) Illegal addresses are trapped using the _____ bit.


a) error
b) protection
c) valid – invalid
d) access
View Answer

Answer: c
Explanation: None.

8) When there is a large logical address space, the best way of paging would be :
a) not to page
b) a two level paging algorithm
c) to page the page table itself
d) All of these
View Answer
Answer: b and c
Explanation: None.

9) In a paged memory, the page hit ratio is 0.35. The required to access a page in secondary
memory is equal to 100 ns. The time required to access a page in primary memory is 10 ns. The
average time required to access a page is :
a) 3.0 ns
b) 68.0 ns
c) 68.5 ns
d) 78.5 ns
View Answer

Answer: c
Explanation: None.

10) To obtain better memory utilization, dynamic loading is used. With dynamic loading, a
routine is not loaded until it is called. For implementing dynamic loading,
a) special support from hardware is required
b) special support from operating system is essential
c) special support from both hardware and operating system is essential
d) user programs can implement dynamic loading without any special support from hardware or
operating system
View Answer

Answer: d
Explanation: None.

11) In paged memory systems, if the page size is increased, then the internal fragmentation
generally :
a) becomes less
b) becomes more
c) remains constant
d) None of these
View Answer

Answer: b
Explanation: None.

Operating System Questions and Answers –


Memory Management – Segmentation
This set of 1000+ Operating System MCQs focuses on “Memory Management – Segmentation”
1) In segmentation, each address is specified by :
a) a segment number
b) an offset
c) a value
d) a key
View Answer

Answer: a and b
Explanation: None.

2) In paging the user provides only ________, which is partitioned by the hardware into
________ and ______.
a) one address, page number, offset
b) one offset, page number, address
c) page number, offset, address
d) None of these
View Answer

Answer: a
Explanation: None.

3) Each entry in a segment table has a :


a) segment base
b) segment peak
c) segment limit
d) segment value
View Answer

Answer: a and c
Explanation: None.

4) The segment base contains the :


a) starting logical address of the process
b) starting physical address of the segment in memory
c) segment length
d) None of these
View Answer

Answer: b
Explanation: None.

5) The segment limit contains the :


a) starting logical address of the process
b) starting physical address of the segment in memory
c) segment length
d) None of these
View Answer

Answer: c
Explanation: None.

6) The offset „d‟ of the logical address must be :


a) greater than segment limit
b) between 0 and segment limit
c) between 0 and the segment number
d) greater than the segment number
View Answer

Answer: b
Explanation: None.

7) If the offset is legal :


a) it is used as a physical memory address itself
b) it is subtracted from the segment base to produce the physical memory address
c) it is added to the segment base to produce the physical memory address
d) None of these
View Answer

Answer: a
Explanation: None.

8) When the entries in the segment tables of two different processes point to the same physical
location :
a) the segments are invalid
b) the processes get blocked
c) segments are shared
d) All of these
View Answer

Answer: c
Explanation: None.

9) The protection bit is 0/1 based on : (choose all that apply)


a) write only
b) read only
c) read – write
d) None of these
View Answer

Answer: b and c
Explanation: None.
10) If there are 32 segments, each of size 1Kb, then the logical address should have :
a) 13 bits
b) 14 bits
c) 15 bits
d) 16 bits
View Answer

Answer: a
Explanation: To specify a particular segment, 5 bits are required. To select a particular byte after
selecting a page, 10 more bits are required. Hence 15 bits are required.

11) Consider a computer with 8 Mbytes of main memory and a 128 K cache. The cache block
size is 4 K. It uses a direct mapping scheme for cache management. How many different main
memory blocks can map onto a given physical cache block ?
a) 2048
b) 256
c) 64
d) 8
View Answer

Answer: c
Explanation: None.

12) 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 a memory location
b) it helps to reduce the size of page table needed to implement the virtual address space of a
process
c) it is required by the translation look aside buffer
d) it helps to reduce the number of page faults in page replacement algorithms
View Answer

Answer: b
Explanation: None.

Operating System Questions & Answers –


Virtual Memory
This section of our 1000+ Operating System MCQs focuses on virtual memory concept of
Operating System.

1. Because of virtual memory, the memory can be shared among


a)processes
b)threads
c)instructions
d)none-of-the-mentioned
View Answer

Answer:a
Explanation:None.

2. _____ is the concept in which a process is copied into main memory from the secondary
memory according to the requirement.
a)Paging
b)Demand-paging
c)Segmentation
d)Swapping
View Answer

Answer:b
Explanation:None.

3.The-pager-concerns-with-the
a)individual-page-of-a-process
b)entire-process
c)entire-thread
d)first-page-of-a-process
View Answer

Answer:a
Explanation:None.

4.Swap-space-exists-in
a)primary-memory
b)secondary-memory
c)CPU
d)none
View Answer

Answer:b
Explanation:None.

5. When a program tries to access a page that is mapped in address space but not loaded in
physical-memory,then
a)segmentation-fault-occurs
b)fatal-error-occurs
c)page-fault-occurs
d)no-error-occurs
View Answer
Answer:c
Explanation:None.

6.Effective-access-time-is-directly-proportional-to
a)page-fault-rate
b)hit-ratio
c)memory-access-time
d)none
View Answer

Answer:a
Explanation:None.

7. In FIFO page replacement algorithm, when a page must be replaced


a)oldest–page-is-chosen
b)newest-page-is-chosen
c)random-page-is-chosen
d)none-of-the-mentioned
View Answer

Answer:a
Explanation:None.

8. Which algorithm chooses the page that has not been used for the longest period of time
whenever-the-page-required-to-be-replaced?
a)first-in-first-out-algorithm
b)additional-reference-bit-algorithm
c)least-recently-used-algorithm
d)counting-based-page-replacement-algorithm
View Answer

Answer:c
Explanation:None.

9.A-process-is-thrashing-if
a)it-is-spending-more-time-paging-than-executing
b)it-is-spending-less-time-paging-than-executing
c)page-fault-occurs
d)swapping-cannot-take-place
View Answer

Answer:a
Explanation:None.

10. Working set model for page replacement is based on the assumption of
a)modularity
b)locality
c)globalization
d)random-access
View Answer

Answer:b
Explanation:None.

Operating System Questions & Answers –


Virtual Memory – Demand Paging
This set of 1000+ Operating System MCQs focuses on “Memory Management – Demand
Paging”

1) Virtual memory allows :


a) execution of a process that may not be completely in memory
b) a program to be larger than the physical memory
c) a program to be larger than the secondary storage
d) execution of a process without being in physical memory
View Answer

Answer: a and b
Explanation: None.

2) The instruction being executed, must be in :


a) physical memory
b) logical memory
c) None of these
View Answer

Answer: a
Explanation: None.

3) Error handler codes, to handle unusual errors are :


a) almost never executed
b) executed very often
c) executed periodically
d) None of these
View Answer

Answer: a
Explanation: None.
4) The ability to execute a program that is only partially in memory has benefits like : (choose all
that apply)
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) CPU utilization decreases
d) Throughput increases
e) response time is not affected
f) turnaround time increases
g) less I/O will be needed to load or swap each user program in memory
h) All of these
View Answer

Answer: a, b, d, e, g
Explanation: None.

5) In virtual memory. the programmer __________ of overlays.


a) has to take care
b) does not have to take care
c) None of these
View Answer

Answer: b
Explanation: None.

6) Virtual memory is normally implemented by ________.


a) demand paging
b) buses
c) virtualization
d) All of these
View Answer

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
View Answer

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 these
View Answer

Answer: c
Explanation: None.

9) Using a pager :
a) increases the swap time
b) decreases the swap time
c) decreases the amount of physical memory needed
d) increases the amount of physical memory needed
View Answer

Answer: b and c
Explanation: None.

10) The valid – invalid bit, in this case, when valid indicates :
a) the page is legal
b) the page is illegal
c) the page is in memory
d) the page is not in memory
View Answer

Answer: a and c
Explanation: None.

11) A page fault occurs when :


a) a page gives inconsistent data
b) a page cannot be accesses due to its absence from memory
c) a page is invisible
d) All of these
View Answer

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 these
View Answer

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 these
View Answer

Answer: b
Explanation: None.

Operating System Questions & Answers –


Virtual Memory – Page Replacement
Algorithms – 1
This set of 1000+ Operating System MCQs focuses on “Memory Management – Page
Replacement Algorithms”

1) Which of the following page replacement algorithms suffers from Belady‟s Anomaly ?
a) Optimal replacement
b) LRU
c) FIFO
d) Both optimal replacement and FIFO
View Answer

Answer: c
Explanation: None.

2) A process refers to 5 pages, A, B, C, D, E in the order : A, B, C, D, A, B, E, A, B, C, D, E. If


the page replacement algorithm is FIFO, the number of page transfers with an empty internal
store of 3 frames is :
a) 8
b) 10
c) 9
d) 7
View Answer
Answer: c
Explanation: None.

3) In question 2, if the number of page frames is increased to 4, then the number of page
transfers :
a) decreases
b) increases
c) remains the same
d) None of these
View Answer

Answer: b
Explanation: None.

4) A memory page containing a heavily used variable that was initialized very early and is in
constant use is removed, then the page replacement algorithm used is :
a) LRU
b) LFU
c) FIFO
d) None of these
View Answer

Answer: c
Explanation: None.

5) A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates
a fixed number of frames to a process. Consider the following statements :
P : Increasing the number of page frames allocated to a process sometimes increases the page
fault rate
Q : Some programs do not exhibit locality of reference
Which of the following is TRUE?
a) Both P and Q are true, and Q is the reason for P
b) Both P and Q are true, but Q is not the reason for P
c) P is false but Q is true
d) Both P and Q are false
View Answer

Answer: c
Explanation: None.

6) Users _______ that their processes are running on a paged system.


a) are aware
b) are unaware
c) None of these
View Answer
Answer: b
Explanation: None.

7) If no frames are free, _____ page transfer(s) is/are required.


a) one
b) two
c) three
d) four
View Answer

Answer: b
Explanation: None.

8) When a page is selected for replacement, and its modify bit is set :
a) the page is clean
b) the page has been modified since it was read in from the disk
c) the page is dirty
d) a and b
View Answer

Answer: b and c
Explanation: None.

9) The aim of creating page replacement algorithms is to :


a) replace pages faster
b) increase the page fault rate
c) decrease the page fault rate
d) to allocate multiple pages to processes
View Answer

Answer: c
Explanation: None.

10) A FIFO replacement algorithm associates with each page the _______
a) time it was brought into memory
b) size of the page in memory
c) page after and before it
d) All of these
View Answer

Answer: a
Explanation: None.

11) Optimal page – replacement algorithm is :


a) Replace the page that has not been used for a long time
b) Replace the page that has been used for a long time
c) Replace the page that will not be used for a long time
d) None of these
View Answer

Answer: c
Explanation: None.

12) Optimal page – replacement algorithm is difficult to implement, because :


a) it requires a lot of information
b) it requires future knowledge of the reference string
c) it is too complex
d) it is extremely expensive
View Answer

Answer: b
Explanation: None.

13) LRU page – replacement algorithm associates with each page the ______
a) time it was brought into memory
b) the time of that page‟s last use
c) page after and before it
d) All of these
View Answer

Answer: b
Explanation: None.

14) For 3 page frames, the following is the reference string :


70120304230321201701
i) How many page faults does the LRU page replacement algorithm produce ?
a) 10
b) 15
c) 11
d) 12
View Answer

Answer: d
Explanation: None.

ii) How many page faults does the FIFO page replacement algorithm produce ?
a) 10
b) 15
c) 11
d) 12
View Answer
Answer: b
Explanation: None.

15) The two methods how LRU page replacement policy can be implemented in hardware are :
(choose two)
a) Counters
b) RAM
c) Stack
d) Registers
View Answer

Answer: a and c
Explanation: None.

Operating System Questions & Answers –


Virtual Memory – Page Replacement
Algorithms – 2
This set of 1000+ Operating System MCQs focuses on “Memory Management – Page
Replacement Algorithms”

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
View Answer

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 top
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
View Answer

Answer: a and 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
View Answer

Answer: b
Explanation: None.

4) Applying the LRU page replacement to the following reference string :


12452124
The main memory can accommodate 3 pages and it already has pages 1 and 2. Page 1 came in
before page 2.
How many page faults will occur ?
a) 2
b) 3
c) 4
d) 5
View Answer

Answer: c
Explanation: None.

5) Increasing the RAM of a computer typically improves performance because:


a) Virtual memory increases
b) Larger RAMs are faster
c) Fewer page faults occur
d) None of the mentioned
View Answer

Answer: c
Explanation: None.

6) 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
View Answer

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
View Answer

Answer: a
Explanation: None.

8) The reason for using the LFU page replacement algorithm is :


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
View Answer

Answer: a
Explanation: None.

9) The reason for using the MFU page replacement algorithm is :


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
View Answer

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
View Answer

Answer: c
Explanation: None.

Operating System Questions & Answers –


Disk Scheduling – 1
This set of 1000+ Operating System MCQs focuses on “Disk Scheduling”

1) In _______, information is recorded magnetically on platters.


a) magnetic disks
b) electrical disks
c) assemblies
d) cylinders
View Answer

Answer : a
Explanation: None.

2) The heads of the magnetic disk are attached to a _____ that moves all the heads as a unit.
a) spindle
b) disk arm
c) track
d) None of these
View Answer

Answer : b
Explanation: None.

3) The set of tracks that are at one arm position make up a ___________.
a) magnetic disks
b) electrical disks
c) assemblies
d) cylinders
View Answer

Answer : d
Explanation: None.

4) The time taken to move the disk arm to the desired cylinder is called the :
a) positioning time
b) random access time
c) seek time
d) rotational latency
View Answer

Answer : c
Explanation: None.

5) The time taken for the desired sector to rotate to the disk head is called :
a) positioning time
b) random access time
c) seek time
d) rotational latency
View Answer

Answer : d
Explanation: None.

6) When the head damages the magnetic surface, it is known as _________.


a) disk crash
b) head crash
c) magnetic damage
d) All of these
View Answer

Answer : b
Explanation: None.

7) A floppy disk is designed to rotate ___________ as compared to a hard disk drive.


a) faster
b) slower
c) at the same speed
d) None of these
View Answer

Answer : b
Explanation: None.

8) The host controller is :


a) controller built at the end of each disk
b) controller at the computer end of the bus
c) both a and b
d) neither a nor b
View Answer

Answer : b
Explanation: None.

9) ______ controller sends the command placed into it, via messages to the _____ controller.
a) host, host
b) disk, disk
c) host, disk
d) disk, host
View Answer

Answer : c
Explanation: None.
10) The disk bandwidth is :
a) the total number of bytes transferred
b) total time between the first request for service and the completion on the last transfer
c) the total number of bytes transferred divided by the total time between the first request for
service and the completion on the last transfer
d) None of these
View Answer

Answer : c
Explanation: None.

Operating System Questions & Answers –


Disk Scheduling – 2
This set of 1000+ Operating System Quiz Online focuses on “Disk Scheduling”

1) Whenever a process needs I/O to or from a disk it issues a ______________.


a) system call to the CPU
b) system call to the operating system
c) a special procedure
d) All of these
View Answer

Answer : b
Explanation: None.

2) If a process needs I/O to or from a disk, and if the drive or controller is busy then :
a) the request will be placed in the queue of pending requests for that drive
b) the request will not be processed and will be ignored completely
c) the request will be not be placed
d) None of these
View Answer

Answer : a
Explanation: None.

3) Consider a disk queue with requests for I/O to blocks on cylinders :


98 183 37 122 14 124 65 67

i) Considering FCFS (first cum first served) scheduling, the total number of head movements is,
if the disk head is initially at 53 :
a) 600
b) 620
c) 630
d) 640
View Answer

Answer : d
Explanation: None.

ii) Considering SSTF (shortest seek time first) scheduling, the total number of head movements
is, if the disk head is initially at 53 :
a) 224
b) 236
c) 245
d) 240
View Answer

Answer : b
Explanation: None.

4) Random access in magnetic tapes is _________, compared to magnetic disks.


a) fast
b) very fast
c) slow
d) very slow
View Answer

Answer : d
Explanation: None.

5) Magnetic tape drives can write data at a speed ________ disk drives.
a) much lesser than
b) comparable to
c) much faster than
d) None of these
View Answer

Answer : b
Explanation: None.

6) On media that use constant linear velocity (CLV), the _____________ is uniform.
a) density of bits on the disk
b) density of bits per sector
c) the density of bits per track
d) None of these
View Answer
Answer : c
Explanation: The farther a track is from the center of the disk.

7) SSTF algorithm, like SJF __________ of some requests.


a) may cause starvation
b) will cause starvation
c) does not cause starvation
d) causes aging
View Answer

Answer : a
Explanation: None.

8) In the ______ algorithm, the disk arm starts at one end of the disk and moves toward the other
end, servicing requests till the other end of the disk. At the other end, the direction is reversed
and servicing continues.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK
View Answer

Answer : b
Explanation: None.

9) In the _______ algorithm, the disk head moves from one end to the other , servicing requests
along the way. When the head reaches the other end, it immediately returns to the beginning of
the disk without servicing any requests on the return trip.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK
View Answer

Answer : c
Explanation: None.

10) In the ______ algorithm, the disk arm goes as far as the final request in each direction, then
reverses direction immediately without going to the end of the disk.
a) LOOK
b) SCAN
c) C-SCAN
d) C-LOOK
View Answer
Answer : a
Explanation: None.

Operating System Questions & Answers –


Disk Management
This set of 1000+ Operating System MCQs focuses on “Disk Management”

1) The process of dividing a disk into sectors that the disk controller can read and write, before a
disk can store data is known as : (choose all that apply)
a) partitioning
b) swap space creation
c) low-level formatting
d) physical formatting
View Answer

Answer : c and d
Explanation: None.

2) The data structue for a sector typically contains : (choose all that apply)
a) header
b) data area
c) trailer
d) main section
View Answer

Answer : a, b and c
Explanation: None.

3) The header and trailer of a sector contain information used by the disk controller such as
_________ and _________.
a) main section
b) error correcting codes (ECC)
c) sector number
d) disk identifier
View Answer

Answer : b and c
Explanation: None.

4) The two steps the operating system takes to use a disk to hold its files are _______ and
________.
a) partitioning
b) swap space creation
c) caching
d) logical formatting
View Answer

Answer : a and d
Explanation: None.

5) The _______ program initializes all aspects of the system, from CPU registers to device
controllers and the contents of main memory, and then starts the operating system.
a) main
b) bootloader
c) bootstrap
d) ROM
View Answer

Answer : c
Explanation: None.

6) For most computers, the bootstrap is stored in ____.


a) RAM
b) ROM
c) cache
d) tertiary storage
View Answer

Answer : b
Explanation: None.

7) A disk that has a boot partition is called a _________. (choose all that apply)
a) start disk
b) system disk
c) boot disk
d) All of these
View Answer

Answer : b and c
Explanation: None.

8) Defective sectors on disks are often known as __________.


a) good blocks
b) destroyed blocks
c) bad blocks
d) None of these
View Answer
Answer : c
Explanation: None.

9) In SCSI disks used in high end PCs, the controller maintains a list of _________ on the disk.
The disk is initialized during ________ formatting which sets aside spare sectors not visible to
the operating system.
a) destroyed blocks, high level formatting
b) bad blocks, partitioning
c) bad blocks, low level formatting
d) destroyed blocks, partitioning
View Answer

Answer : c
Explanation: None.

10) The scheme used in the above question is known as _______ or ________.
a) sector sparing
b) forwarding
c) backwarding
d) sector utilization
View Answer

Answer : a and b
Explanation: None.

11) An unrecoverable error is known as _________.


a) hard error
b) tough error
c) soft error
d) None of these
View Answer

Answer : a
Explanation: None.

Operating System Questions & Answers –


Swap Space Management
This set of 1000+ Operating System MCQs focuses on “Swap Space Management”

1) Virtual memory uses disk space as an extension of _________.


a) secondary storage
b) main memory
c) tertiary storage
d) None of these
View Answer

Answer : b
Explanation: None.

2) Using swap space significantly _________ system performance.


a) increases
b) decreases
c) maintains
d) does not affect
View Answer

Answer : b
Explanation: Disk access is much slower than memory access.

3) Linux __________ the use of multiple swap spaces.


a) allows
b) does not allow
c) None of these
View Answer

Answer : a
Explanation: Putting these swap spaces on seperate disks reduces the load places on the I/O
system.

4) A single swap space ______ reside in two places.


a) can
b) cannot
c) must not
d) None of these
View Answer

Answer : a
Explanation: None.

5) If the swap space is simply a large file, within the file system, ____________ used to create it,
name it and allocate its space.
a) special routines must be
b) normal file system routines can be
c) normal file system routines cannot be
d) swap space storage manager is
View Answer
Answer : b
Explanation: None.

6) For swap space created in a seperate disk partition where no file system or directory structure
is placed, _____________ used to allocate and deallocate the blocks.
a) special routines must be
b) normal file system routines can be
c) normal file system routines cannot be
d) swap space storage manager is
View Answer

Answer : d
Explanation: None.

7) When a fixed amount of swap space is created during disk partitioning, more swap space can
be added only by :
I) repartitioning of the disk
II) adding another swap space elsewhere

a) only I
b) only II
c) both I and II
d) neither I nor II
View Answer

Answer : c
Explanation: None.

8) In UNIX, two per process ________ are used by the kernel to track swap space use.
a) process tables
b) swap maps
c) memory maps
d) partition maps
View Answer

Answer : b
Explanation: None.

9) It is __________ to reread a page from the file system than to write it to swap space and then
to reread it from there.
a) useless
b) less efficient
c) more efficient
d) None of these
View Answer
Answer : c
Explanation: None.

You might also like