100% found this document useful (1 vote)
627 views

Topic Wise MCQ of Operating Systems

The document contains questions and answers about operating system concepts including processes, threads, CPU scheduling, and the basics of operating systems. It provides multiple choice questions about topics such as what an operating system is, how processes are created and terminated, process states, thread synchronization, scheduling algorithms like first-come first-served and priority scheduling, and more. The questions are followed by short explanations for the answers.

Uploaded by

Ruba Niazi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
627 views

Topic Wise MCQ of Operating Systems

The document contains questions and answers about operating system concepts including processes, threads, CPU scheduling, and the basics of operating systems. It provides multiple choice questions about topics such as what an operating system is, how processes are created and terminated, process states, thread synchronization, scheduling algorithms like first-come first-served and priority scheduling, and more. The questions are followed by short explanations for the answers.

Uploaded by

Ruba Niazi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Operating System Questions & Answers – Basics

1.What is an operating system?


a) collection of programs that manages hardware resources
b) system service provider to the application programs
c) link to interface the hardware and application programs
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
2. To access the services of operating system, the interface is provided by the
a) system calls
b) API
c) library
d) assembly instructions
Check the answer in next line:
Answer = a
Explanation: None.
3. Which one of the following is not true?
a) kernel is the program that constitutes the central core of the operating system
b) kernel is the first part of operating system to load into memory during booting
c) kernel is made of various modules which cannot be loaded in running operating
system
d) kernel remains in the memory during the entire computer session
Check the answer in next line:
Answer = c
Explanation: None.
4. Which one of the following error will be handle by the operating system?
a) power failure
b) lack of paper in printer
c) connection failure in the network
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
5. The main function of the command interpreter is
a) to get and execute the next user-specified command
b) to provide the interface between the API and application program
c) to handle the files in operating system
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
6. By operating system, the resource management can be done via
a) time division multiplexing
b) space division multiplexing
c) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation: None.
7. If a process fails, most operating system write the error information to a
a) log file
b) another running process
c) new file
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
8. Which facility dynamically adds probes to a running system, both in user processes
and in the kernel?
a) DTrace
b) DLocate
c) DMap
d) DAdd
Check the answer in next line:
Answer = a
Explanation: None.
9. Which one of the following is not a real time operating system?
a) VxWorks
b) Windows CE
c) RTLinux
d) Palm OS
Check the answer in next line:
Answer = d
Explanation: None.
10. The OS X has
a) monolithic kernel
b) hybrid kernel
c) microkernel
d) monolithic kernel with modules
Check the answer in next line:
Answer = b
Explanation: None.

Operating System Questions & Answers – Processes


1. The systems which allows only one process execution at a time, are called
a) uniprogramming systems
b) uniprocessing systems
c) unitasking systems
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation:Those systems which allows more than one process execution at a time,
are called multiprogramming systems. Uniprocessing means only one processor.
2. 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
Check the answer in next line:
Answer = d
Explanation: None.
3. In Unix, Which system call creates the new process?
a) fork
b) create
c) new
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
4. A process can be terminated due to
a) normal exit
b) fatal error
c) killed by another process
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
5. 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
Check the answer in next line:
Answer = a
Explanation:When process is unable to run until some task has been completed, the
process is in blocked state and if process is using the CPU, it is in running state.
6. What is interprocess communication?
a) communication within the process
b) communication between two process
c) communication between two threads of same process
d) none of the mentioned
Check the answer in next line:
Answer = b
Explanation: None.
7. 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
Check the answer in next line:
Answer = a
Explanation: None.
8. A process stack does not contain
a) function parameters
b) local variables
c) return addresses
d) PID of child process
Check the answer in next line:
Answer = d
Explanation: None.
9. Which system call returns the process identifier of a terminated child?
a) wait
b) exit
c) fork
d) get
Check the answer in next line:
Answer = a
Explanation: None.
10. The address of the next instruction to be executed by the current process is
provided by the
a) CPU registers
b) program counter
c) process stack
d) pipe
Check the answer in next line:
Answer = b
Explanation: None.

Operating System Questions & Answers – Threads


1. Which one of the following is not shared by threads?
a) program counter
b) stack
c) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation: None.
2. A process can be
a) single threaded
b) multithreaded
c) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation: None.
3. If one thread opens a file with read privileges then
a) other threads in the another process can also read from that file
b) other threads in the same process can also read from that file
c) any other thread can not read from that file
d) all of the mentioned
Check the answer in next line:
Answer = b
Explanation: None.
4. The time required to create a new thread in an existing process is
a) greater than the time required to create a new process
c) less than the time required to create a new process
c) equal to the time required to create a new process
d) none of the mentioned
Check the answer in next line:
Answer = b
Explanation: None.
5. When the event for which a thread is blocked occurs,
a) thread moves to the ready queue
b) thread remains blocked
c) thread completes
d) a new thread is provided
Check the answer in next line:
Answer = a
Explanation: None.
6. The jacketing technique is used to
a) convert a blocking system call into nonblocking system call
b) create a new thread
c) communicate between threads
d) terminate a thread
Check the answer in next line:
Answer = a
Explanation: None.
7. Termination of the process terminates
a) first thread of the process
b) first two threads of the process
c) all threads within the process
d) no thread within the process
Check the answer in next line:
Answer = c
Explanation: None.
8. Which one of the following is not a valid state of a thread?
a) running
b) parsing
c) ready
d) blocked
Check the answer in next line:
Answer = b
Explanation: None.
9. The register context and stacks of a thread are deallocated when the thread
a) terminates
b) blocks
c) unblocks
d) spawns
Check the answer in next line:
Answer = a
Explanation: None.
10. Thread synchronization is required because
a) all threads of a process share the same address space
b) all threads of a process share the same global variables
c) all threads of a process can share the same files
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.

Operating System Questions & Answers – CPU


Scheduling
1. 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
Check the answer in next line:
Answer = a
Explanation: None.
2. The processes that are residing in main memory and are ready and waiting to
execute are kept on a list called
a) job queue
b) ready queue
c) execution queue
d) process queue
Check the answer in next line:
Answer = b
Explanation: None.
3. The interval from the time of submission of a process to the time of completion is
termed as
a) waiting time
b) turnaround time
c) response time
d) throughput
Check the answer in next line:
Answer = b
Explanation: None.
4. Which scheduling algorithm allocates the CPU first to the process that requests the
CPU first?
a) first-come, first-served scheduling
b) shortest job scheduling
c) priority scheduling
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
5. 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
Check the answer in next line:
Answer = a
Explanation: None.
6. In priority scheduling algorithm, when a process arrives at the ready queue, its priority
is compared with the priority of
a) all process
b) currently running process
c) parent process
d) init process
Check the answer in next line:
Answer = b
Explanation: None.
7. Time quantum is defined in
a) shortest job scheduling algorithm
b) round robin scheduling algorithm
c) priority scheduling algorithm
d) multilevel queue scheduling algorithm
Check the answer in next line:
Answer = b
Explanation: None.
8. Process are classified into different groups in
a) shortest job scheduling algorithm
b) round robin scheduling algorithm
c) priority scheduling algorithm
d) multilevel queue scheduling algorithm
Check the answer in next line:
Answer = d
Explanation: None.
9. In multilevel feedback scheduling algorithm
a) a process can move to a different classified ready queue
b) classification of ready queue is permanent
c) processes are not classified into groups
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
10. Which one of the following can not be scheduled by the kernel?
a) kernel level thread
b) user level thread
c) process
d) none of the mentioned
Check the answer in next line:
Answer = b
Explanation:User level threads are managed by thread library and the kernel in unaware
of them.

Operating System Questions & Answers – Process


Synchronization
1. Which process can be affected by other processes executing in the system?
a) cooperating process
b) child process
c) parent process
d) init process
Check the answer in next line:
Answer = a
Explanation: None.
2. When several processes access the same data concurrently and the outcome of the
execution depends on the particular order in which the access takes place, is called
a) dynamic condition
b) race condition
c) essential condition
d) critical condition
Check the answer in next line:
Answer = b
Explanation: None.
3. If a process is executing in its critical section, then no other processes can be
executing in their critical section. This condition is called
a) mutual exclusion
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion
Check the answer in next line:
Answer = a
Explanation: None.
4. Which one of the following is a synchronization tool?
a) thread
b) pipe
c) semaphore
d) socket
Check the answer in next line:
Answer = c
Explanation: None.
5. A semaphore is a shared integer variable
a) that can not drop below zero
b) that can not be more than zero
c) that can not drop below one
d) that can not be more than one
Check the answer in next line:
Answer = a
Explanation: None.
6. Mutual exclusion can be provided by the
a) mutex locks
b) binary semaphores
c) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation:Binary Semaphores are known as mutex locks.
7. When high priority task is indirectly preempted by medium priority task effectively
inverting the relative priority of the two tasks, the scenario is called
a) priority inversion
b) priority removal
c) priority exchange
d) priority modification
Check the answer in next line:
Answer = a
Explanation: None.
8. Process synchronization can be done on
a) hardware level
b) software level
c) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation: None.
9. A monitor is a module that encapsulates
a) shared data structures
b) procedures that operate on shared data structure
c) synchronization between concurrent procedure invocation
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
10. To enable a process to wait within the monitor,
a) a condition variable must be declared as condition
b) condition variables must be used as boolean objects
c) semaphore must be used
d) all of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.

Operating System Questions & Answers – Deadlock


1. What is the 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
Check the answer in next line:
Answer = a
Explanation: None.
2. Which of the following condition is required for 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
Check the answer in next line:
Answer = d
Explanation: None.
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) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation: None.
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
Check the answer in next line:
Answer = a
Explanation: None.
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
Check the answer in next line:
Answer = a
Explanation: None.
6. What is the drawback of banker’s algorithm?
a) in advance processes rarely know that 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
Check the answer in next line:
Answer = d
Explanation: None.
7. For effective operating system, when to check for deadlock?
a) every time a resource request is made
b) at fixed time intervals
c) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation: None.
8. A problem encountered in multitasking when a process is perpetually denied
necessary resources is called
a) deadlock
b) starvation
c) inversion
d) aging
Check the answer in next line:
Answer = b
Explanation: None.
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
Check the answer in next line:
Answer = a
Explanation: None.
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
Check the answer in next line:
Answer = a
Explanation: None.

Operating System Questions & Answers – Memory


Management
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
Check the answer in next line:
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
Check the answer in next line:
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
Check the answer in next line:
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
Check the answer in next line:
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
Check the answer in next line:
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
Check the answer in next line:
Answer = b
Explanation: None.
7. Program always deals with
a) logical address
b) absolute address
c) physical address
d) relative address
Check the answer in next line:
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
Check the answer in next line:
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
Check the answer in next line:
Answer = c
Explanation: None.
10. Operating System maintains the page table for
a) each process
b) each thread
c) each instruction
d) each address
Check the answer in next line:
Answer = a
Explanation: None.

Operating System Questions & Answers – Virtual


Memory
1. Because of virtual memory, the memory can be shared among
a) processes
b) threads
c) instructions
d) none of the mentioned
Check the answer in next line:
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
Check the answer in next line:
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
Check the answer in next line:
Answer = a
Explanation: None.
4. Swap space exists in
a) primary memory
b) secondary memory
c) CPU
d) none of the mentioned
Check the answer in next line:
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
Check the answer in next line:
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 of the mentioned
Check the answer in next line:
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
Check the answer in next line:
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
Check the answer in next line:
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 can not take place
Check the answer in next line:
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
Check the answer in next line:
Answer = b
Explanation: None.

Operating System Questions & Answers – File System


Concepts
1. ______ is a unique tag, usually a number, identifies the file within the file system.
a) File identifier
b) File name
c) File type
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
2. To create a file
a) allocate the space in file system
b) make an entry for new file in directory
c) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation: None.
3. By using the specific system call, we can
a) open the file
b) read the file
c) write into the file
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
4. File type can be represented by
a) file name
b) file extension
c) file identifier
d) none of the mentioned
Check the answer in next line:
Answer = b
Explanation: None.
5. Which file is a sequence of bytes organized into blocks understandable by the
system’s linker?
a) object file
b) source file
c) executable file
d) text file
Check the answer in next line:
Answer = a
Explanation: None.
6. What is the mounting of file system?
a) crating of a filesystem
b) deleting a filesystem
c) attaching portion of the file system into a directory structure
d) removing portion of the file system into a directory structure
Check the answer in next line:
Answer = c
Explanation: None.
7. Mapping of file is managed by
a) file metadata
b) page table
c) virtual memory
d) file system
Check the answer in next line:
Answer = a
Explanation: None.
8. Mapping of network file system protocol to local file system is done by
a) network file system
b) local file system
c) volume manager
d) remote mirror
Check the answer in next line:
Answer = a
Explanation: None.
9. Which one of the following explains the sequential file access method?
a) random access according to the given byte number
b) read bytes one at a time, in order
c) read/write sequentially by record
d) read/write randomly by record
Check the answer in next line:
Answer = b
Explanation: None.
10. file system fragmentation occurs when
a) unused space or single file are not contiguous
b) used space is not contiguous
c) unused space is non-contiguous
d) multiple files are non-contiguous
Check the answer in next line:
Answer = a
Explanation: None.

Operating System Questions & Answers – File System


Implementation
1. Management of metadata information is done by
a) file-organisation module
b) logical file system
c) basic file system
d) application programs
Check the answer in next line:
Answer = b
Explanation: None.
2. A file control block contains the information about
a) file ownership
b) file permissions
c) location of file contents
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
3. Which table contains the information about each mounted volume?
a) mount table
b) system-wide open-file table
c) per-process open-file table
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
4. To create a new file application program calls
a) basic file system
b) logical file system
c) file-organisation module
d) none of the mentioned
Check the answer in next line:
Answer = b
Explanation: None.
5. When a process closes the file
a) per-process table entry is removed
b) system wide entry’s open count is decremented
c) both (a) and (b)
d) none of the mentioned
Check the answer in next line:
Answer = c
Explanation: None.
6. What is raw disk?
a) disk without file system
b) empty disk
c) disk lacking logical file system
d) disk having file system
Check the answer in next line:
Answer = a
Explanation: None.
7. The data structure used for file directory is called
a) mount table
b) hash table
c) file table
d) process table
Check the answer in next line:
Answer = b
Explanation: None.
8. In which type of allocation method each file occupy a set of contiguous block on the
disk?
a) contiguous allocation
b) dynamic-storage allocation
c) linked allocation
d) indexed allocation
Check the answer in next line:
Answer = a
Explanation: None.
9. If the block of free-space list is free then bit will
a) 1
b) 0
c) Any of 0 or 1
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
10. Which protocol establishes the initial logical connection between a server and a
client?
a) transmission control protocol
b) user datagram protocol
c) mount protocol
d) datagram congestion control protocol
Check the answer in next line:
Answer = c
Explanation: None.

Operating System Questions & Answers – I/O Subsystem


1. I/O hardware contains
a) bus
b) controller
c) I/O port and its registers
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
2. The data-in register of I/O port is
a) read by host to get input
b) read by controller to get input
c) written by host to send output
d) written by host to start a command
Check the answer in next line:
Answer = a
Explanation: None.
3. The host sets _____ bit when a command is available for the controller to execute.
a) write
b) status
c) command-ready
d) control
Check the answer in next line:
Answer = c
Explanation: None.
4. When hardware is accessed by reading and writing to the specific memory locations,
then it is called
a) port-mapped I/O
b) controller-mapped I/O
c) bus-mapped I/O
d) none of the mentioned
Check the answer in next line:
Answer = d
Explanation:It is called memory-mapped I/O.
5. Device drivers are implemented to interface
a) character devices
b) block devices
c) network devices
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
6. Which hardware triggers some operation after certain programmed count?
a) programmable interval timer
b) interrupt timer
c) programmable timer
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
7. The device-status table contains
a) each I/O device type
b) each I/O device address
c) each I/O device state
d) all of the mentioned
Check the answer in next line:
Answer = d
Explanation: None.
8. Which buffer holds the output for a device?
a) spool
b) output
c) status
d) magic
Check the answer in next line:
Answer = a
Explanation: None.
9. Which one of the following connects high-speed high-bandwidth device to memory
subsystem and CPU.
a) expansion bus
b) PCI bus
c) SCSI bus
d) none of the mentioned
Check the answer in next line:
Answer = a
Explanation: None.
10. A process is moved to wait queue when I/O request is made with
a) non-blocking I/O
b) blocking I/O
c) asynchronous I/O
d) synchronous I/O
Check the answer in next line:
Answer = b
Explanation: None.

You might also like