OPERATING SYSTEM MCQ SET 1

os Mcq

os Mcq

In this “Operating System MCQ Set 1” covers mainly Monitors, File, Performance, Scheduling, Deadlock, RAG, DOS, UNIX, Process, PCB, Paging related MCQs and Random Operating System MCQs.

Questions with answers are given. Try to understand all. take some time. it’s easy.

OPERATING SYSTEM MCQ over MONITORS

  1. A monitor is a type of __
    a) semaphore
    b) low level synchronization construct
    c) high level synchronization construct
    d) none of the mentioned
  1. A monitor is characterized by __
    a) a set of programmer defined operators
    b) an identifier
    c) the number of variables in it
    d) all of the mentioned
  1. A procedure defined within a _ can access only those variables declared locally within the and its formal parameters.
    a) process, semaphore
    b) process, monitor
    c) semaphore, semaphore
    d) monitor, monitor
  1. The monitor construct ensures that __
    a) only one process can be active at a time within the monitor
    b) n number of processes can be active at a time within the monitor (n being greater than 1
    c) the queue has only one process in it at a time
    d) all of the mentioned
  1. What are the operations that can be invoked on a condition variable?
    a) wait & signal
    b) hold & wait
    c) signal & hold
    d) continue & signal
  1. Which is the process of invoking the wait operation?
    a) suspended until another process invokes the signal operation
    b) waiting for another process to complete before it can itself call the signal operation
    c) stopped until the next process in the queue finishes execution
    d) none of the mentioned
  1. If no process is suspended, the signal operation __
    a) puts the system into a deadlock state
    b) suspends some default process execution
    c) nothing happens
    d) the output is unpredictable

OPERATING SYSTEM MCQ over FILE

File related OS MCQs are given below,

  1. The three major methods of allocating disk space that are in wide use are _
    a) contiguous
    b) linked
    c) indexed
    d) all of the mentioned
  1. In contiguous allocation ___
    a) each file must occupy a set of contiguous blocks on the disk
    b) each file is a linked list of disk blocks
    c) all the pointers to scattered blocks are placed together in one location
    d) none of the mentioned
  1. In linked allocation ___
    a) each file must occupy a set of contiguous blocks on the disk
    b) each file is a linked list of disk blocks
    c) all the pointers to scattered blocks are placed together in one location
    d) none of the mentioned
  1. In indexed allocation _
    a) each file must occupy a set of contiguous blocks on the disk
    b) each file is a linked list of disk blocks
    c) all the pointers to scattered blocks are placed together in one location
    d) none of the mentioned
  1. On systems where there are multiple operating system, the decision to load a particular one is done by _
    a) boot loader
    b) bootstrap
    c) process control block
    d) file control block
  1. The VFS (virtual file system) activates file system specific operations to handle local requests according to their _
    a) size
    b) commands
    c) timings
    d) file system types
  1. What is the real disadvantage of a linear list of directory entries?
    a) size of the linear list in memory
    b) linear search to find a file
    c) it is not reliable
    d) all of the mentioned
  1. Contiguous allocation of a file is defined by _
    a) disk address of the first block & length
    b) length & size of the block
    c) size of the block
    d) total size of the file
  1. One difficulty of contiguous allocation is _
    a) finding space for a new file
    b) inefficient
    c) costly
    d) time taking
  1. ___and ___ are the most common strategies used to select a free hole from the set of available holes.
    a) First fit, Best fit
    b) Worst fit, First fit
    c) Best fit, Worst fit
    d) None of the mentioned

The First fit, Best fit, Compaction and Fragmentation concepts are described in https://www.shoutcoders.com/memory-management-note/

  1. The first fit and best fit algorithms suffer from ___
    a) internal fragmentation
    b) external fragmentation
    c) starvation
    d) all of the mentioned
  1. To solve the problem of external fragmentation __ needs to be done periodically.
    a) compaction
    b) check
    c) formatting
    d) replacing memory
  1. If too little space is allocated to a file _
    a) the file will not work
    b) there will not be any space for the data, as the FCB takes it all
    c) the file cannot be extended
    d) the file cannot be opened

14. A device driver can be thought of like a translator. Its input consists of ___ commands and output consists of ___ instructions.
a) high level, low level
b) low level, high level
c) complex, simple
d) low level, complex

15. The file organization module knows about _
a) files
b) logical blocks of files
c) physical blocks of files
d) all of the mentioned

16. Metadata includes _____________
a) all of the file system structure
b) contents of files
c) both file system structure and contents of files
d) none of the mentioned

17. For each file there exists a ___ that contains information about the file, including ownership, permissions and location of the file contents.
a) metadata
b) file control block(FCB)
c) process control block(PCB)
d) all of the mentioned

18. For processes to request access to file contents, they need ___
a) to run a separate program
b) special interrupts
c) to implement the open and close system calls
d) none of the mentioned

19. During compaction time, other normal system operations ___ be permitted.
a) can
b) cannot
c) is
d) none of the mentioned

20. When in contiguous allocation the space cannot be extended easily?
a) the contents of the file have to be copied to a new space, a larger hole
b) the file gets destroyed
c) the file will get formatted and lost all its data
d) none of the mentioned

21. In the linked allocation, the directory contains a pointer to which block?
I. first block
II. last block
a) I only
b) II only
c) Both I and II
d) Neither I nor II

22. There is no ____ with linked allocation.
a) internal fragmentation
b) external fragmentation
c) starvation
d) all of the mentioned

23. What is the major disadvantage with a linked allocation?
a) internal fragmentation
b) external fragmentation
c) there is no sequential access
d) there is only sequential access

24. What if a pointer is lost or damaged in a linked allocation?
a) the entire file could get damaged
b) only a part of the file would be affected
c) there would not be any problems
d) none of the mentioned

25. FAT stands for _
a) File Attribute Transport
b) File Allocation Table
c) Fork At Time
d) None of the mentioned

26. By using FAT, random access time is __
a) the same
b) increased
c) decreased
d) not affected

27. A better way of contiguous allocation to extend the file size is _
a) adding an extent (another chunk of contiguous space)
b) adding an index table to the first contiguous block
c) adding pointers into the first contiguous block
d) none of the mentioned

28. If the extents are too large, then what is the problem that comes in?
a) internal fragmentation
b) external fragmentation
c) starvation
d) all of th mentioned

29. The FAT is used much as a _
a) stack
b) linked list
c) data
d) pointer

30. A section of disk at the beginning of each partition is set aside to contain the table in _
a) fat
b) linked allocation
c) hashed allocation
d) indexed allocation

31. Contiguous allocation has two problems ___ and ___ that linked allocation solves.
a) external – fragmentation & size – declaration
b) internal – fragmentation & external – fragmentation
c) size – declaration & internal – fragmentation
d) memory – allocation & size – declaration

32. Each ___ has its own index block.
a) partition
b) address
c) file
d) all of the mentioned

33. Indexed allocation __ direct access.
a) supports
b) does not support
c) is not related to
d) none of the mentioned

34. The pointer overhead of indexed allocation is generally __ the pointer overhead of linked allocation.
a) less than
b) equal to
c) greater than
d) keeps varying with

35. For any type of access, contiguous allocation requires __ access to get a disk block.
a) only one
b) at least two
c) exactly two
d) none of the mentioned

We can easily keep the initial address of the file in memory and calculate immediately the disk address of the ith block and read it directly.

OPERATING SYSTEM MCQ over FILE SYSTEM PERFORMANCE

  1. ___ tend to represent a major bottleneck in system performance.
    a) CPUs
    b) Disks
    c) Programs
    d) I/O
  1. In UNIX, even an ’empty’ disk has a percentage of its space lost to __
    a) programs
    b) inodes
    c) virtual memory
    d) stacks
  1. By preallocating the inodes and spreading them across the volume, then _ the system performance.
    a) improve
    b) decrease
    c) maintain
    d) do not affect
  1. __ writes occur in the order in which the disk subsystem receives them, and the writes are not buffered.
    a) Asynchronous
    b) Regular
    c) Synchronous
    d) Irregular
  1. In _ writes, the data is stored in the cache.
    a) Asynchronous
    b) Regular
    c) Synchronous
    d) Irregular
  1. A file being read or written sequentially should not have its pages replaced in LRU order, because _
    a) it is very costly
    b) the most recently used page will be used last
    c) it is not efficient
    d) all of the mentioned

RANDOM OPERATING SYSTEM MCQs

  1. Program is a ___ Entity while process is ____.
    a. Passive, active
    b. Active, passive
    c. Both a and b
    d. None of these
  1. FCFS is __ Scheduling algorithm.
    a. Preemptive
    b. Non-preemptive
    c. Both
    d. None
  1. _____ is a scheduler is invoked when there is need to perform job scheduling
    a. Long-term
    b. Medium-term
    c. Short-term
    d. None of these
  1. Which one of the following is not a process communication
    a. Message passing
    b. Shared memory
    c. Signal
    d. None of these
  1. Deadlock prevention is _ possible
    a. Always
    b. Not always/never
    c. Sometimes
    d. None of these
  1. To detect deadlock in a single instance of resource types, which graph is used?
    a. RAG
    b. WAIT-FOR-GRAPH
    c. Directed graph
    d. None of these
  1. Example of mutually exclusive resource is
    a. RAM
    b. Printer
    c. Both I) and II)
    d. None of these
  1. 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
  1. In priority scheduling algorithm
    a. CPU is allocated to the process with highest priority
    b. CPU is allocated to the process with lowest priority
    c. Equal priority processes can not be scheduled
    d. None of the mentioned
Paging
Paging
  1. Time quantum is defined in
    a. shortest job scheduling algorithm
    b. round robin scheduling algorithm
    c. priority scheduling algorithm
    d. multilevel queue scheduling algorithm
  1. In _ information is recorded magnetically on platters.
    a. magnetic disks
    b. electrical disks
    c. assemblies
    d. cylinders
  2. OS provides platform to run
    a. system software
    b. application software
    c. Both a and b
    d. None
  3. DOS is a _
    a. frame bit
    b. page number
    c. system software
    d. None
  4. The _ is an application software
    a. OS
    b. MS WORD
    c. DOS
    d. None
  5. In Unix, Which system call creates the new process?
    a. fork
    b. create
    c. new
    d. none of the mentioned
  6. In operating system, each process has its own
    a. address space and global variables
    b. open files
    c. pending alarms, signals and signal handlers
    d. all of the mentioned
  7. 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
  8. To access the services of operating system, the interface is provided by the
    a. System calls
    b. API
    c. Library
    d. Assembly instructions
  9. Example of single user single tasking os is
    a. LINUX
    b. WINDOWS
    c. DOS
    d. None of these
  10. Which language uses synchronization methods for synchronization
    a. C
    b. C++
    c. Ada
    d. JAVA
  11. Shell is the exclusive feature of
    a. UNIX
    b. System software
    c. DOS
    d. Application Software
  12. What is a shell script?
    a. group of commands
    b. a file containing special symbols
    c. a file containing a series of commands
    d. group of functions
  13. The variable in any shell script begins with a _
    a. #
    b. $
    c. =
    d. (
  14. Which command is used for making the scripts interactive?
    a. Ip
    b. Input
    c. Read
    d. Write
  15. A program in execution is called
    a. Process
    b. Instruction
    c. Procedure
    d. Function
  16. Interval between the time of submission and completion of the job is Called
    a. Waiting time
    b. Turnaround time
    c. Throughput
    d. Response time
  17. Which of the following is not a fundamental process state
    a. Ready
    b. Terminated
    c. Waiting
    d. Blocked
  18. Which of the following approaches do not require knowledge of the system state?
    a. Deadlock detection.
    b. Deadlock prevention.
    c. Deadlock avoidance.
    d. None
  19. Which scheduling policy is most suitable for a time-shared operating system
    a. Shortest-job First.
    b. Elevator.
    c. Round-Robin.
    d. First-Come-First-Serve.
  20. Which of the following are language processors?
    a. Assembler
    b. Compiler
    c. Interpreter
    d. All of these
  21. RAG is a useful tool to represent a _. In a system
    a. Deadlock
    b. Resource allocation
    c. Race condition
    d. None
  22. An edge from a resource instance to a process in RAG is known as
    a. Assignment edge
    b. Claim edge
    c. Request edge
    d. None
  23. 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
  24. 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

    PIPE: A pipe is a connection between two processes, such that the standard output from one process becomes the standard input of the other process. In UNIX Operating System, Pipes are useful for communication between related processes(inter-process communication)
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. The request and release of resources are _
    a. command line statements
    b. interrupts
    c. system calls
    d. special programs
  31. For a deadlock to arise, which of the following conditions must hold simultaneously?
    a. Mutual exclusion
    b. No preemption
    c. Hold and wait
    d. All of the mentioned
  32. For Mutual exclusion to prevail in the system :
    a. at least one resource must be held in a non-sharable mode
    b. the processor must be a uniprocessor rather than a multiprocessor
    c. there must be at least one resource in a sharable mode
    d. all of the mentioned
  33. For sharable resources, mutual exclusion :
    a. is required
    b. is not required
    c. maybe or may not be required
    d. none of the mentioned
    There are no relation between sharable resource and mutual exclusion.
  34. A deadlock avoidance algorithm dynamically examines the __ to ensure that a circular wait condition can never exist.
    a. resource allocation state
    b. system storage state
    c. operating system
    d. resources
  35. A state is safe, if :
    a. the system does not crash due to deadlock occurrence
    b. the system can allocate resources to each process in some order and still avoid a deadlock
    c. the state keeps the system protected and safe
    d. all of the mentioned
  36. A system is in a safe state only if there exists a :
    a. safe allocation
    b. safe resource
    c. safe sequence
    d. all of the mentioned
  37. All unsafe states are :
    a. deadlocks
    b. not deadlocks
    c. fatal
    d. none of the mentioned
  38. If no cycle exists in the resource allocation graph :
    a. then the system will not be in a safe state
    b. then the system will be in a safe state
    c. all of the mentioned
    d. none of the mentioned
  39. The Banker’s algorithm is _ than the resource allocation graph algorithm.
    a. less efficient
    b. more efficient
    c. equal
    d. none of the mentioned
  40. The data structures available in the Banker’s algorithm are :
    a. Available
    b. Need
    c. Allocation
    d. All of the mentioned
  41. The content of the matrix Need is :
    a. Allocation – Available
    b. Max – Available
    c. Max – Allocation
    d. Allocation – Max
  42. A process can be terminated due to
    a. normal exit
    b. fatal error
    c. killed by another process
    d. all of the mentioned
  43. What is the ready state of a process?
    a. when process is scheduled to run after some execution
    b. when process is unable to run until some task has been completed
    c. when process is using the CPU
    d. none of the mentioned
  44. What is inter process communication?
    a. communication within the process
    b. communication between two process
    c. communication between two threads of same process
    d. none of the mentioned
  45. A set of processes is deadlock if
    a. each process is blocked and will remain so forever
    b. each process is terminated
    c. all processes are trying to kill each other
    d. none of the mentioned
  46. 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
  47. The number of processes completed per unit time is known as __
    a. Output
    b. Throughput
    c. Efficiency
    d. Capacity
  48. Which of the following is not the state of a process?
    a. New
    b. Old
    c. Waiting
    d. Running
  49. The degree of multiprogramming is:
    a. the number of processes executed per unit time
    b. the number of processes in the ready queue
    c. the number of processes in the I/O queue
    d. the number of processes in memory
  50. When a process terminates :
    a. It is removed from all queues
    b. It is removed from all, but the job queue
    c. Its process control block is de-allocated
    d. Its process control block is never de-allocated
  51. What is a short-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
  52. 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
  53. 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
  54. Which module gives control of the CPU to the process selected by the short-term scheduler?
    a. dispatcher
    b. interrupt
    c. scheduler
    d. none of the mentioned
  55. 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
  56. 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
  57. The process to be aborted is chosen on the basis of the following factors :
    a. priority of the process
    b. process is interactive or batch
    c. how long the process has computed
    d. all of the mentioned
  58. If we preempt a resource from a process, the process cannot continue with its normal execution and it must be :
    a. aborted
    b. rolled back
    c. terminated
    d. queued
  59. A process can be
    a. single threaded
    b. none of the mentioned
    c. Multithreaded
    d. both single threaded and multithreaded
  60. Which one of the following is a synchronization tool?
    a. thread
    b. pipe
    c. semaphore
    d. socket
  61. 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 the mentioned
  62. The backing store is generally a :
    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 the mentioned
  63. Swapping requires a _
    a. motherboard
    b. keyboard
    c. monitor
    d. backing store
  64. Paging increases the __ time.
    a. waiting
    b. execution
    c. context – switch
    d. all of the mentioned
  65. With paging there is no __ fragmentation.
    a. internal
    b. external
    c. either type of
    d. none of the mentioned

76.The size of a page is typically :
a. varied
b. power of 2
c. power of 4
d. none of the mentioned

  1. The _ in page table contains the base address of each page in physical memory.
    a. process
    b. page number
    c. page offset
    d. frame offset
  2. The size of a page is typically :
    a. page number
    b. process
    c. frame offset
    d. None
  3. Every address generated by the CPU is divided into two parts :
    a. frame bit & page number
    b. page number & page offset
    c. page offset & frame bit
    d. frame offset & page offset
  4. Logical memory is broken into blocks of the same size called _
    a. frames
    b. pages
    c. backing store
    d. none of the mentioned
  5. Physical memory is broken into fixed-sized blocks called __
    a. frames
    b. pages
    c. backing store
    d. none of the mentioned
  6. 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
Os Process
Os Process

In this “Operating System MCQ” covers mainly Monitors, File, Performance, Scheduling, Deadlock, RAG, DOS, UNIX, Process, PCB, Paging related MCQs.

If you have good knowledge in OS, then you can easily answer them. If you are not familiar with OS, the Question with Answers are given.

You might like: https://www.shoutcoders.com/shell-scripting-example-set-1/ , https://www.shoutcoders.com/C-Programming-NOTE-1.

You can achieve some MCQs in this article, In Set II, More interesting points should be covered.

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami