Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
210 views

MCQ On Operating System-All Unit

The document contains 15 multiple choice questions about operating system concepts like paging, segmentation, virtual memory and deadlocks. The questions cover topics such as page tables, frame tables, page replacement algorithms, demand paging and conditions required for deadlock.

Uploaded by

prashant kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
210 views

MCQ On Operating System-All Unit

The document contains 15 multiple choice questions about operating system concepts like paging, segmentation, virtual memory and deadlocks. The questions cover topics such as page tables, frame tables, page replacement algorithms, demand paging and conditions required for deadlock.

Uploaded by

prashant kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

MCQ ON OPERATING SYSTEM Kamlesh Mani Tripathi

CsTutorialpoint.com
HOD(IT),
Govt Polytechnic Aurai,Bhadohi

1. What is a reusable resource?


a) that can be used by one process at a time and is not depleted by that use
b) that can be used by more than one process at a time
c) that can be shared between various threads
d) none of the mentioned
Answer: a

2. Which of the following condition is required for a deadlock to be possible?


a) mutual exclusion
b) a process may hold allocated resources while awaiting assignment of other resources
c) no resource can be forcibly removed from a process holding it
d) all of the mentioned

Answer: d

3. A system is in the safe state if ____________


a) the system can allocate resources to each process in some order and still avoid a deadlock
b) there exist a safe sequence
c) all of the mentioned
d) none of the mentioned
Answer: a

4. The circular wait condition can be prevented by ____________


a) defining a linear ordering of resource types
b) using thread
c) using pipes
d) all of the mentioned
Answer: a

5. Which one of the following is the deadlock avoidance algorithm?


a) banker’s algorithm
b) round-robin algorithm
c) elevator algorithm
d) karn’s algorithm
Answer: a

6. What is the drawback of banker’s algorithm?


a) in advance processes rarely know how much resource they will need
b) the number of processes changes as time progresses
c) resource once available can disappear
d) all of the mentioned
Answer: d

7. For an effective operating system, when to check for deadlock?


a) every time a resource request is made
b) at fixed time intervals
CsTutorialpoint.com

c) every time a resource request is made at fixed time intervals


d) none of the mentioned
Answer: c
8. A problem encountered in multitasking when a process is perpetually denied necessary resources
is called ____________
a) deadlock
b) starvation
c) inversion
d) aging
Answer: b

9. Which one of the following is a visual ( mathematical ) way to determine the deadlock
occurrence?
a) resource allocation graph
b) starvation graph
c) inversion graph
d) none of the mentioned
Answer: a

10. To avoid deadlock ____________


a) there must be a fixed number of resources to allocate
b) resource allocation must be done only once
c) all deadlocked processes must be aborted
d) inversion technique can be used
Answer: a

11 With dead lock detection requested resources granted to


(a)resources
(b)programs
©processes
(d) users
12 A direct method of deadlock prevention is to prevent the occurrence of a
(a) Mutual exclusion
(b) Hold and wait
(c) Pre-emption
(d) Circular wait
13 a problem encountered in multitasking when a process is perpetually denied necessary
resources is called
(a) Deadlock
(b) Starvation
(c) Inversion
(d) Aging
1. Physical memory is broken into fixed-sized blocks called ________
a) frames
b) pages
c) backing store
d) none of the mentioned
Answer: a

2. Logical memory is broken into blocks of the same size called _________
a) frames
CsTutorialpoint.com

b) pages
c) backing store
d) none of the mentioned
Answer: b
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

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


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

5. The _____ table contains the base address of each page in physical memory.
a) process
b) memory
c) page
d) frame
Answer: c

6. The size of a page is typically ____________


a) varied
b) power of 2
c) power of 4
d) none of the mentioned
Answer: b

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

8. With paging there is no ________ fragmentation.


a) internal
b) external
c) either type of
d) none of the mentioned

Answer: b
CsTutorialpoint.com

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

10. Paging increases the ______ time.


a) waiting
b) execution
c) context – switch
d) all of the mentioned
Answer: c

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


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

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 the mentioned
Answer: b

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

14. For every process there is a __________


a) page table
b) copy of page table
c) pointer to page table
d) all of the mentioned
Answer: a

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
CsTutorialpoint.com

1. In segmentation, each address is specified by ____________


a) a segment number & offset
b) an offset & value
c) a value & segment number
d) a key & value
View Answer

Answer: a

(2)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 the mentioned

Answer: a
1. Paging is implemented in
A. Operating System
B. Hardware
C. Software
D. All of them
ans-b

2. Page-Table length register (PTLR) indicates size of


A. Page Table
B. Paging File
C. Main Memory
D. Virtual Memory
ans-a

3. Bring a page into memory only when it is needed is called


A. Demand Memory
B. Demand Paging
C. Page Fault
D. Page Segmentation
ans-b

4. Which of the following is not the approach to Handling Deadlocks


A. Deadlock Prevention
B. Deadlock Avoidance
C. Detect
D. Virtual Memory
ans-d

5. Which scheduler selects which processes should be brought into the ready queue
A. Real-term
B. Long-term
C. Mid-term
CsTutorialpoint.com

D. Short-term
ans-b

6. Dived logical memory into blocks with the same size as frames are called
A. Pages
B. Frames
C. Page Table
D. Segmentation
ans-a

7. Which memory allocation policy allocate the largest hole to the process?
A. Best-Fit
B. Worst-Fit
C. First-Fit
D. None of them
ans-b

8. When there is enough memory to fit a process in memory, but the space is not contiguous we
need
A. Internal Fragmentation
B. Virtual Fragmentation
C. External Fragmentation
D. None of them
ans-c

9. Piece of code that only one thread can execute at a time is called
A. Mutual Exclusion
B. Critical Section
C. Synchronization
D. All of them
ans-b

10. When a thread waits indefinitely for some resource, but other threads are actually using it is
called
A. Starvation
B. Demand Paging
C. Segmentation
D. None of them

ans-a

Virtual Memory MCQs


1. What a virtual-memory miss is called?

a)Hit miss
b)Page hit
c)Page miss
d)Page fault
Answer
d)Page fault
CsTutorialpoint.com

2.a process is copied into the main memory from the secondary memory
a) Swapping
b) Paging
c) Segmentation
d) Demand paging
Answer
d) demand paging

3. process is trash
a) it spends more time paging than executing
b) it spends less time paging than executing
c) page fault occurs
d)swapping can not take place
Answer
a) it spends more time paging than executing
c) individual page of a process

4. in which Swap space exists


a) cpu
b) primary memory
c) secondary memory
d) none of the mentioned
Answer
c) secondary memory

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

6. Effective access time is directly proportional to


a) memory access time
b)page-fault rate
c) hit ratio
d) none of the mentioned
Answer
b) page fault rate

7.In FIFO page replacement algorithm, when a page must be replaced what is chosen
a) oldest page is chosen
b) newest page is chosen
c) median page is chosen
d) none of the mentioned
Answer
a) oldest page is chosen
CsTutorialpoint.com

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

Virtual Memory MCQs


9. The pager concerns with the
a) entire thread
b) first page of a process
c) individual page of a process
d) entire process
AnswerA

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

11. what memory is called separation of user logical memory and physical memory
a) Memory sharing
b)Virtual memory
c)Memory management
d) Memory control
Answer
b)Virtual memory

12.Is logical Address space can be larger than physical address space?
a) True
b) False
Answer
a) True

13. Virtual Memory can be implemented via?


a) Simple division
b) Logical paging
c) Demand Paging
d) Complex division
Answer
c) Demand Paging

14. COW stands for?


a) Convert overwrite
b) Copy overwrite
CsTutorialpoint.com

c) Cut overwrite
d) Copy overwrite
View Answer
d) Copy overwrite

15. LRU stands for?


a) Less Recently used
b) Least Recurrently used
c) Least Randomly used
d)Least Recently used
Answer
b) Least Recurrently used

16. What allocation uses a proportional allocation scheme using priorities rather than size.
a) Simple allocation
b) File allocation
c) Priority allocation
d)Preference allocation
Answer
c) Priority allocation

17. Which a process selects a replacement frame from the set of all frames.
a) Global replacement
b) Local replacement
c) Module replacement
d)Block replacement
Answer
a) Global replacement

Virtual Memory MCQs


18. Any program, no matter how small, occupies an entire partition. known as
a) fragmentation
b) external fragmentation
c) internal fragmentation
d)prior fragmentation
Answer
c) internal fragmentation

19. Which process is busy swapping pages in and out.


a) Division
b)External Fragmentation
c) Thrashing
d) Compaction
Answer
c) Thrashing

20. select the most nearest answer for one or more physically contiguous pages.
a) Allocator
b) Object
c) Slab
d) Cache
CsTutorialpoint.com

Answer
c) Slab
21.technique is implemented by magnetic disk for secondary memory is called

a)Main memory
b)Cache
c)Buffer
d)Virtual memory
Answer
d)Virtual memory

22. The memory can be shared among ,because of virtual memory


a) threads
b) processes
c) instructions
d) none of the mentioned
Answer
b) processes
: Memory Management Mcqs

1. instructions fetched by CPU according to the value of —— from memory?


A. program status word
B. status register
C. program counter
D. instruction register
E. both a and b
F. None of these
Answer C

2. —– is called a memory buffer and it is used to contain a speed differential


A. cache
B. accumulator
C. disk buffer
D. stack pointer
E. both a and b
F. None of these
Answer A

3. the address generated by CPU is:


A. absolute address
B. logical address
C. physical address
D. mac address
E. both a and b
F. None of these
Answer B

4. Which of the following option is true for virtual to physical address run-time mapping?
A. CPU
B. Operating system
C. memory management unit
CsTutorialpoint.com

D. PCI
E. both a and b
F. None of these
Answer C

5. —— is used to point the address of a page table in memory.


A. page register
B. program counter
C. stack pointer
D. page table base register
E. both a and b
F. None of these
Answer C

Memory Management Mcqs


6. ——– Address is always deal with the program.
A. absolute
B. relative
C. logical
D. physical
E. both a and b
F. None of these
Answer C

7. ——- is contained by the page table.


A. page size
B. base address of every page
C. page offset
D. Page
E. both a and b
F. None of these
Answer B

8.for ——– the page table is maintained by the Operating System.


A. each instruction
B. each process
C. each thread
D. each address
E. both a and b
F. None of these
Answer B

9. The operating system is in?


A. high memory
B. System bus
C. either a or d (depending on the location of interrupt vector)
D. low memory
E. both a and b
F. None of these
CsTutorialpoint.com

Answer C

10. relocation register are used to :


A. a different address space to processes
B. providing less address space to processes
C. to protect the address spaces of processes
D. providing more address space to processes
E. both a and b
F. None of these
Answer C

Memory Management Mcqs


11. With limit registers and relocation, each logical address must be _______ the limit register.
A. Not equal to
B. equal to
C. greater than
D. less than
E. both b and c
F. None of these
Answer D

12. The code that ——- is Transient operating system code.


A. stays in the memory always B. comes and goes as needed
C. never enters the memory space
D. is not easily accessible
E. both a and b
F. None of these
Answer D

13. the size of the operating system during program execution is ——— while using transient code.
A. changed
B. increased
C. maintained
D. decreased
E. both a, b and c
F. None of these
Answer A

14. Each partition may contain ________ when memory is divided into several fixed sized partitions.
A. multiple processes at once
B. exactly one process
C. Two process
D. at least one process
E. both a and b
F. None of these
Answer B

15. the degree of multiprogramming is bounded to which extent In fixed-sized partition?


A. All of these
B. the memory size
C. the CPU utilization
CsTutorialpoint.com

D. the number of partitions


E. both a and b
F. None of these
Answer D

Memory Management Mcqs


16. The strategies like the first fit, best fit and worst fit are used to select a ______.
A. process from a queue to put in storage
B. process from a queue to put in memory
C. processor to run the next process
D. free hole from a set of available holes
E. both c and b
F. None of these
Answer D

17. The number of ——- can be granted by the Owner of address space.
A. Computers
B. Modules
C. Pages
D. Devices
E. both c and b
F. None of these
Answer C

18. To load and store the system data from memory ——- is used.
A. register
B. RAM
C. ROM
D. Buses
E. both c and b
F. None of these
Answer A

19. The stack pointer is a register that points to the:


A. Push of the stack
B. Bottom of the stack
C.Top of the stack
D. Pop of the stack
E. both a and b
F. None of these
Answer C

20. To read the———— I/O instruction transfer is used.


A. Information
B. Instructions
C. Description
D. Data
E. both c and b
F. None of these
Answer D
File system Interface MCQs
CsTutorialpoint.com

1. Reliability of files can be enhanced by :


a)by keeping duplicate copies of the file
b) making a different partition for the files
c) by keeping them in external storage
d) keeping the files safely in the memory
Answer A

2. security is only provided at the _____ level.


a) none of the mentioned
b) high
c) central
d) lower
Answer D

3. The major issue with access control lists is :


a) their maintenance
b) all of the mentioned
c) their permissions
d) their length
Answer D

4. Many systems recognize three classifications of users in connection with each file (to condense
the access control list) :
a) ) Universe
b) Group
c) owner
d) All of the mentioned
Answer D
LINUX
1.
What command is used to count the total number of lines, words, and characters contained in a file?

A.countw
B.wcount
C.wc
D.count p
E.None of the above
Answer: C

What command is used to remove files?

A.dm
B.rm
C.delete
D.erase
E.None of the above
Answer: B
CsTutorialpoint.com

What command is used to remove the directory?

A.rdir
B.remove
C.rd
D.rmdir
E.None of the above
Answer: D

4.
What command is used with vi editor to delete a single character?

A.x
B.y
C.a
D.z
E.None of the above
Answer: A

5.
What hardware architectures are not supported by Red Hat?

A.SPARC
B.IBM-compatible
C.Alpha
D.Macintosh
E.None of the above
Answer: D

What command is used to print a file?


A. lp

B. pg

C. prn

D. print

E. None of the above


Answer: A

CsTutorialpoint.com

You might also like