OPERATING SYSTEM 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
- A monitor is a type of __
a) semaphore
b) low level synchronization construct
c) high level synchronization construct
d) none of the mentioned
- 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
- 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
- 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
- What are the operations that can be invoked on a condition variable?
a) wait & signal
b) hold & wait
c) signal & hold
d) continue & signal
- 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
- 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,
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- One difficulty of contiguous allocation is _
a) finding space for a new file
b) inefficient
c) costly
d) time taking
- ___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 and best fit algorithms suffer from ___
a) internal fragmentation
b) external fragmentation
c) starvation
d) all of the mentioned
- To solve the problem of external fragmentation __ needs to be done periodically.
a) compaction
b) check
c) formatting
d) replacing memory
- 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
- ___ tend to represent a major bottleneck in system performance.
a) CPUs
b) Disks
c) Programs
d) I/O
- In UNIX, even an ’empty’ disk has a percentage of its space lost to __
a) programs
b) inodes
c) virtual memory
d) stacks
- By preallocating the inodes and spreading them across the volume, then _ the system performance.
a) improve
b) decrease
c) maintain
d) do not affect
- __ 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
- In _ writes, the data is stored in the cache.
a) Asynchronous
b) Regular
c) Synchronous
d) Irregular
- 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
- Program is a ___ Entity while process is ____.
a. Passive, active
b. Active, passive
c. Both a and b
d. None of these
- FCFS is __ Scheduling algorithm.
a. Preemptive
b. Non-preemptive
c. Both
d. None
- _____ 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
- Which one of the following is not a process communication
a. Message passing
b. Shared memory
c. Signal
d. None of these
- Deadlock prevention is _ possible
a. Always
b. Not always/never
c. Sometimes
d. None of these
- 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
- Example of mutually exclusive resource is
a. RAM
b. Printer
c. Both I) and II)
d. None of these
- 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
- 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
- Time quantum is defined in
a. shortest job scheduling algorithm
b. round robin scheduling algorithm
c. priority scheduling algorithm
d. multilevel queue scheduling algorithm
- In _ information is recorded magnetically on platters.
a. magnetic disks
b. electrical disks
c. assemblies
d. cylinders - OS provides platform to run
a. system software
b. application software
c. Both a and b
d. None - DOS is a _
a. frame bit
b. page number
c. system software
d. None - The _ is an application software
a. OS
b. MS WORD
c. DOS
d. None - In Unix, Which system call creates the new process?
a. fork
b. create
c. new
d. none of the mentioned - 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 - 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 - To access the services of operating system, the interface is provided by the
a. System calls
b. API
c. Library
d. Assembly instructions - Example of single user single tasking os is
a. LINUX
b. WINDOWS
c. DOS
d. None of these - Which language uses synchronization methods for synchronization
a. C
b. C++
c. Ada
d. JAVA - Shell is the exclusive feature of
a. UNIX
b. System software
c. DOS
d. Application Software - 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 - The variable in any shell script begins with a _
a. #
b. $
c. =
d. ( - Which command is used for making the scripts interactive?
a. Ip
b. Input
c. Read
d. Write - A program in execution is called
a. Process
b. Instruction
c. Procedure
d. Function - Interval between the time of submission and completion of the job is Called
a. Waiting time
b. Turnaround time
c. Throughput
d. Response time - Which of the following is not a fundamental process state
a. Ready
b. Terminated
c. Waiting
d. Blocked - Which of the following approaches do not require knowledge of the system state?
a. Deadlock detection.
b. Deadlock prevention.
c. Deadlock avoidance.
d. None - 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. - Which of the following are language processors?
a. Assembler
b. Compiler
c. Interpreter
d. All of these - RAG is a useful tool to represent a _. In a system
a. Deadlock
b. Resource allocation
c. Race condition
d. None - 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 - 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 - 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) - 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 - 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 - 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 - 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 - 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 - The request and release of resources are _
a. command line statements
b. interrupts
c. system calls
d. special programs - 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 - 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 - 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. - 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 - 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 - 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 - All unsafe states are :
a. deadlocks
b. not deadlocks
c. fatal
d. none of the mentioned - 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 - The Banker’s algorithm is _ than the resource allocation graph algorithm.
a. less efficient
b. more efficient
c. equal
d. none of the mentioned - The data structures available in the Banker’s algorithm are :
a. Available
b. Need
c. Allocation
d. All of the mentioned - The content of the matrix Need is :
a. Allocation – Available
b. Max – Available
c. Max – Allocation
d. Allocation – Max - A process can be terminated due to
a. normal exit
b. fatal error
c. killed by another process
d. all of the mentioned - 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 - 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 - 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 - 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 - The number of processes completed per unit time is known as __
a. Output
b. Throughput
c. Efficiency
d. Capacity - Which of the following is not the state of a process?
a. New
b. Old
c. Waiting
d. Running - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - A process can be
a. single threaded
b. none of the mentioned
c. Multithreaded
d. both single threaded and multithreaded - Which one of the following is a synchronization tool?
a. thread
b. pipe
c. semaphore
d. socket - 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 - 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 - Swapping requires a _
a. motherboard
b. keyboard
c. monitor
d. backing store - Paging increases the __ time.
a. waiting
b. execution
c. context – switch
d. all of the mentioned - 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
- 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 - The size of a page is typically :
a. page number
b. process
c. frame offset
d. None - 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 - Logical memory is broken into blocks of the same size called _
a. frames
b. pages
c. backing store
d. none of the mentioned - Physical memory is broken into fixed-sized blocks called __
a. frames
b. pages
c. backing store
d. none of the mentioned - 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
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 can achieve some MCQs in this article, In Set II, More interesting points should be covered.
Comments
Post a Comment