SlideShare a Scribd company logo
1) Which of the following is not an operating system?
a. Windows
b. Linux
c. Oracle
d. DOS
Hide Answer Workspace
Answer: (c) Oracle
Explanation: Oracle is an RDBMS (Relational Database Management System). It is
known as Oracle Database, Oracle DB, or Oracle Only. The first database for enterprise
grid computing is the Oracle database.
2) What is the maximum length of the filename in DOS?
a. 4
b. 5
c. 8
d. 12
Hide Answer Workspace
Answer: (c) 8
Explanation: The maximum length of the filename is 8 characters in the DOS
operating system. It is commonly known as an 8.3 filename.
3) When was the first operating system developed?
a. 1948
b. 1949
c. 1950
d. 1951
Hide Answer Workspace
Answer: (c) 1950
Explanation: The first operating system was developed in the early 1950's. It was also
called a single-stream batch processing system because it presented data in groups.
4) When were MS windows operating systems proposed?
10 Sec
OOPs Concepts in Java
a. 1994
b. 1990
c. 1992
d. 1985
Hide Answer Workspace
Answer: (d) 1985
Explanation: The first MS Windows operating system was introduced in early 1985.
5) Which of the following is the extension of Notepad?
a. .txt
b. .xls
c. .ppt
d. .bmp
Hide Answer Workspace
Answer: (a) .txt
Explanation: The .txt file extension is a standard text document extension that
contains the unformatted text. It is the default file extension for the notepad.
6) What else is a command interpreter called?
a. prompt
b. kernel
c. shell
d. command
Hide Answer Workspace
Answer: (c) shell
Explanation: The command interpreter is also called the shell.
7) What is the full name of FAT?
a. File attribute table
b. File allocation table
c. Font attribute table
d. Format allocation table
Hide Answer Workspace
Answer: (b) File allocation table.
Explanation: The FAT stands for File allocation table. The FAT is a file system
architecture. It is used in computer systems and memory cards. A FAT of the contents
of a computer disk indicates which field is used for which file.
8) BIOS is used?
a. By operating system
b. By compiler
c. By interpreter
d. By application software
Hide Answer Workspace
Answer: (a) By operating system
Explanation: BIOS is used by the operating system. It is used to configure and identify
the hardware in a system such as the hard drive, floppy drive, optical drive, CPU, and
memory.
9) What is the mean of the Booting in the operating system?
a. Restarting computer
b. Install the program
c. To scan
d. To turn off
Hide Answer Workspace
Answer: (a) Restarting computer
Explanation: Booting is a process of the restart the computer. After restarting it, there
is no software in the computer's main memory.
10) When does page fault occur?
a. The page is present in memory.
b. The deadlock occurs.
c. The page does not present in memory.
d. The buffering occurs.
Hide Answer Workspace
Answer: (c) The page does not present in memory.
Explanation: Page faults occur when a process tries to access a block page of the
memory and that page is not stored in RAM (Read only memory) or memory.
11) Banker's algorithm is used?
a. To prevent deadlock
b. To deadlock recovery
c. To solve the deadlock
d. None of these
Hide Answer Workspace
Answer: (a) To prevent deadlock
Explanation: Banker's algorithm is used to prevent the deadlock condition. The
banker algorithm is sometimes called the detection algorithm. It is named the banker
algorithm because it is used to determine whether a loan can be granted in the
banking system or not.
12) When you delete a file in your computer, where does it go?
a. Recycle bin
b. Hard disk
c. Taskbar
d. None of these
Hide Answer Workspace
Answer: (a) Recycle bin
Explanation: When you delete a file on your computer device, it is transferred to your
computer system's recycle bin or trash.
13) Which is the Linux operating system?
a. Private operating system
b. Windows operating system
c. Open-source operating system
d. None of these
Hide Answer Workspace
Answer: (c) Open-source operating system
Explanation: The Linux operating system is an open-source operating system made
up of a kernel. It is a very safe operating system.
14) What is the full name of the DSM?
a. Direct system module
b. Direct system memory
c. Demoralized system memory
d. Distributed shared memory
Hide Answer Workspace
Answer: (d) Distributed shared memory
Explanation: The DSM stands for Distributed Shared Memory.
15) What is the full name of the IDL?
a. Interface definition language
b. Interface direct language
c. Interface data library
d. None of these
Hide Answer Workspace
Answer: (a) Interface definition language
Explanation: The IDL stands for Interface Definition Language. It is used to establish
communications between clients and servers in RPC (Remote Procedure Call).
16) What is bootstrapping called?
a. Cold boot
b. Cold hot boot
c. Cold hot strap
d. Hot boot
Hide Answer Workspace
Answer: (a) Cold boot
Explanation: Bootstrapping is also known as the cool boot.
17) What is the fence register used for?
a. To disk protection
b. To CPU protection
c. To memory protection
d. None of these
Hide Answer Workspace
Answer: (c) To memory protection
Explanation: The fence register is used for memory protection on the computer. It is
a way to access the memory in the computer.
18) If the page size increases, the internal fragmentation is also?..?
a. Decreases
b. Increases
c. Remains constant
d. None of these
Hide Answer Workspace
Answer: (b) Increases
Explanation: None
19) Which of the following is a single-user operating system?
a. Windows
b. MAC
c. Ms-Dos
d. None of these
Hide Answer Workspace
Answer: (c) Ms-Dos
Explanation: The single-user operating system is the operating system in which only
one user can access the computer system at a time, and Ms-DOS is the best example
of a single-user operating system.
20) The size of virtual memory is based on which of the following?
a. CPU
b. RAM
c. Address bus
d. Data bus
Hide Answer Workspace
Answer: (c) Address bus
Explanation: The size of virtual memory is based on the address bus.
21) If a page number is not found in the translation lookaside buffer, then it is known as
a?
a. Translation Lookaside Buffer miss
b. Buffer miss
c. Translation Lookaside Buffer hit
d. All of the mentioned
Hide Answer Workspace
Answer: (a) Translation Lookaside Buffer miss
Explanation: A Translation Lookaside Buffer miss arises when the page table entry
needed to translate a virtual address to a physical address is not available in the
translation lookaside buffer.
22) Which of the following is not application software?
a. Windows 7
b. WordPad
c. Photoshop
d. MS-excel
Hide Answer Workspace
Answer: (a) Windows 7
Explanation: Windows 7 is not an application software because it is a operating
system.
23) Which of the following supports Windows 64 bit?
a. Window XP
b. Window 2000
c. Window 1998
d. None of these
Hide Answer Workspace
Answer: (a) Window XP
Explanation: Windows XP supports the 64-bits. Windows XP is designed to expand
the memory address space. Its original name is Microsoft Windows XP Professional
x64 and it is based on the x86-64 architecture.
24) Which of the following windows does not have a start button?
a. Windows 7
b. Windows 8
c. Windows XP
d. None of these
Hide Answer Workspace
Answer: (b) Windows 8
Explanation: Windows8 does not have a start button because it uses the tablet mode,
but windows 8.1 has a start button.
25) Which of the following operating systems does not support more than one program
at a time?
a. Linux
b. Windows
c. MAC
d. DOS
Hide Answer Workspace
Answer: (d) DOS
Explanation: DOS stands for Disk operating system. Disk operating system is a single-
user operating system that does not support more than one program at a time.
26) Which of the following is a condition that causes deadlock?
a. Mutual exclusion
b. Hold and wait
c. Circular wait
d. No preemption
e. All of these
Hide Answer Workspace
Answer: (e) All of these
Explanation: None
27) Who provides the interface to access the services of the operating system?
a. API
b. System call
c. Library
d. Assembly instruction
Hide Answer Workspace
Answer: (b) System call
Explanation: The system call provides an interface for user programs to access the
services of the operating system through the API (Application Program Interface).
28) Where are placed the list of processes that are prepared to be executed and waiting?
a. Job queue
b. Ready queue
c. Execution queue
d. Process queue
Hide Answer Workspace
Answer: (b) Ready queue
Explanation: The ready queue is a set of all the processes that processes are ready to
execute and wait.
29) Who among the following can block the running process?
a. Fork
b. Read
c. Down
d. All of these
Hide Answer Workspace
Answer: (d) All of these
Explanation: None
30) Which of the following does not interrupt the running process?
a. Timer interrupt
b. Device
c. Power failure
d. Scheduler process
Hide Answer Workspace
Answer: (b) Scheduler process
Explanation: Scheduler process does not interrupt in any running process. Its job is to
select the processes for long-term, short-term, and short-term scheduler.
31) What is Microsoft window?
a. Operating system
b. Graphics program
c. Word Processing
d. Database program
Hide Answer Workspace
Answer: (a) Operating system
Explanation: Microsoft Windows is an operating system that was developed by
Microsoft company. The Microsoft Windows is available in 32-bits and 64-bits in the
market.
32) Which of the following is group of programs?
a. Accessories
b. Paint
c. Word
d. All of above
Hide Answer Workspace
Answer: (a) Accessories
Explanation: The windows accessories are a group of programs in the operating
system. Windows XP offers many accessories or software that you can use to help with
your work. The accessories are not full features programs, but it is useful for a specific
task in the operating systems. It provides many programs such as a painting program,
a calculator, a word processor, a notepad, and Internet software.
33) Which of the following is an example of a Real Time Operating System?
a. MAC
b. MS-DOS
c. Windows 10
d. Process Control
Hide Answer Workspace
Answer: (d) Process Control
Explanation: Process control is a best example of a Real time operating system.
34) Which of the following operating systems do you use for a client-server network?
a. MAC
b. Linux
c. Windows XP
d. Windows 2000
Hide Answer Workspace
Answer: (d) Windows 2000
Explanation: Windows 2002 operating systems were used to implement a client
Server Network. It is a server OS that was developed by Microsoft in April 24, 2002. It
includes some features of Windows XP.
35) Which windows was introduced to My Computer?
a. Windows 10
b. Windows XP
c. Windows 95
d. Windows 98
Hide Answer Workspace
Answer: (c) Windows 95
Explanation: Windows 95 was first window to introduced the My Computer.
36) What type of commands are required to perform various tasks in DOS?
a. Internal commands
b. External commands
c. Valuable commands
d. Primary commands
Hide Answer Workspace
Answer: (b) External commands
Explanation: External commands are required to perform various tasks in DOS.
37) What is the number of characters contained in the primary name of the file of MS-
DOS?
a. Up to 8 characters
b. 3 characters
c. Up to 10 characters
d. None of the above
Hide Answer Workspace
Answer: (a) Up to 8 characters
Explanation: MS-DOS operating system uses the file system that supports the 8.3
characters. The eight characters are used to the filename, and three characters are used
to the extension.
38) Which command is used to fetch a group (.doc) of files that have just been deleted?
a. Undelete
b. Undelete/all
c. Undelete *.doc
d. All of above
Hide Answer Workspace
Answer: (c) Undelete *.doc
Explanation: Undelete *.doc command is used to fetch a group (.doc) of files that have
just been deleted.
39) Which of the following is system software?
a. Operating system
b. Compiler
c. Utilities
d. All of the above
Hide Answer Workspace
Answer: (d) All of the above
Explanation: The system software is a type of computer program designed to run
hardware and software programs on a computer.
According to some definitions, system software also includes system utilities, system
restore, development tools, compilers, and debuggers.
40) Which program runs first after booting the computer and loading the GUI?
a. Desktop Manager
b. File Manager
c. Windows Explorer
d. Authentication
Hide Answer Workspace
Answer: (d) Authentication
Explanation: The authentication program is run first after booting the computer and
loading the GUI. Authentication is a process of verifying the person or device. For
example, when you log in to Facebook, you enter a username and password.
1) What is the use of directory structure in the operating system?
a. The directory structure is used to solve the problem of the network connection
in OS.
b. It is used to store folders and files hierarchically.
c. It is used to store the program in file format.
d. All of the these
Hide Answer Workspace
Answer: (b) It is used to store folders and files hierarchically.
Explanation: In the OS, a directory structure is a container that is used to store folders
and files in a hierarchical manner.
2) What type of scheduling is round-robin scheduling?
a. Linear data scheduling
b. Non-linear data scheduling
c. Preemptive scheduling
d. Non-preemptive scheduling
Hide Answer Workspace
Answer: (c) Preemptive scheduling
Explanation: Round-robin scheduling is a preemptive scheduling algorithm in which
a specific time is provided to execute each process. This specific time is called time-
slice.
3) Which conditions must be satisfied to solve a critical section problem?
a. Bounded Waiting
b. Progress
c. Mutual Exclusion
d. All of these.
Hide Answer Workspace
Answer: (d) All of the these
Explanation: A critical-section is a code segment that can be accessed by a signal
mechanism at a given point of time. The segment consists of shared data services that
are need to be used by other systems. The critical section problem must satisfy the
three conditions: Mutual Exclusion, Bounded Waiting, and Progress.
4) Which of the following options is correct about the windows operating system?
AccessingElements of Union
Keep Watching
a. Windows is a CUI operating system.
b. Windows is based on CUI.
c. Windows is a GUI operating system.
d. None of the these
Hide Answer Workspace
Answer: (c) Windows is a GUI operating system.
Explanation: Windows is a GUI operating system. Windows OS does not require a
command to run. Only one mouse is required to run the windows operating system.
5) Which of the following file systems is supported by the windows OS?
a. NTFS
b. FAT32
c. exFAT
d. All of the these
Hide Answer Workspace
Answer: (d) All of the these
Explanation: The following are the types of file systems that support the Windows
operating system, such as NTFS, FAT, exFAT, HFS Plus, and EXT.
6) Which of the following keys does the user use to switch between applications running
simultaneously in the Windows operating system?
a. FN + TAB
b. ALT + TAB
c. CTRL + TAB
d. SHIFT + TAB
Hide Answer Workspace
Answer: (b) ALT + TAB
Explanation: The user uses the Alt + Tab button to switch from one window to another
in the Windows operating system. Also, the user can use the Ctrl + Tab button to switch
from tab to tab in internet explorer.
7) Which of the following commands creates an emergency repair disk for Windows NT
4.0?
a. BAT
b. EXE
c. EXE/S
d. ADD/REMOVE program
Hide Answer Workspace
Answer: (b) RDISK.EXE
Explanation: There are the following steps to repair disk in windows NT 4.0:
Step 1: Go to the search button in windows NT 4.0, then type Command Prompt.
Step 2: Then type "RDISK.EXE" and press enter.
Step 3: Then open a pop-up window. This pop-up window will update the emergency
repair disk.
8) Which of the following scheduling algorithms is preemptive scheduling?
a. FCFS Scheduling
b. SJF Scheduling
c. Network Scheduling
d. SRTF Scheduling
Hide Answer Workspace
Answer: (d) SRTF Scheduling
Explanation: Shortest Remaining Time First (SRTF) scheduling is preemptive
scheduling. In this scheduling, the process that has the shortest processing time left is
executed first.
9) How can you get a printout of the system configuration on windows 9x OS?
a. Open the CMD window, type "MSDN", and press <printscrn>
b. From the device manager, click the print button
c. Open the CMD window, type "SYS", and press <printscrn>
d. None of the these
Hide Answer Workspace
Answer: (c) From the device manager, click the print button
Explanation: Windows9x is a generic term that refers to a series of Microsoft windows
OS from 1995 to 2000. If you want to print out in Windows 9x, go to the device
manager and click the printer option and then print the page.
10) Which of the following operating system runs on the server?
a. Batch OS
b. Distributed OS
c. Real-time OS
d. Network OS
Hide Answer Workspace
Answer: (d) Network OS
Explanation: The network operating system runs on a server. This operating system
has some functions that work to connect local area networks and computers.
11) What type of memory stores data in a swap file on a hard drive?
a. Secondary memory
b. Virtual memory
c. Low memory
d. RAM
Hide Answer Workspace
Answer: (b) Virtual memory
Explanation: A swap file is a type of file that stores the data retrieved from Read-Only-
Memory (RAM) or main memory. It is also a virtual memory because it is not stored in
physical RAM.
12) Which of the following "semaphore" can take the non-negative integer values?
a. Binary Semaphore
b. Counting Semaphore
c. Real Semaphore
d. All of the these
Hide Answer Workspace
Answer: (b) Counting Semaphore
Explanation: Counting semaphore takes only the non-negative integer value that is
used to solve the critical section problem and process synchronization.
13) In which directory the local user profile settings are stored by default in windows 2000?
a. C:  USERS
b. C:  NETLOGON
c. C:  WIN NTUSER.DAT
d. C:  Documents and settings
Hide Answer Workspace
Answer: (d) C:  Documents and settings
Explanation: When a user logs in with an account for the first time, Windows 2000
automatically creates a user's profile in the "Documents and Settings" folder.
14) Which of the following operating system does not require a command to run?
a. Kali Linux
b. Windows
c. Unix
d. All of the these
Hide Answer Workspace
Answer: (b) Windows
Explanation: Windows is a GUI operating system. This operating system does not
require a command to run. Only one mouse is required to run this operating system.
15) Which method is the best among file allocation methods?
a. Linked
b. Contiguous
c. Indexed
d. None of the these
Hide Answer Workspace
Answer: (c) Indexed
Explanation: The indexed allocation method is the best file allocation method
because it removes the problem of contiguous and linked allocation.
16) The operating system work between
a. User and Computer
b. Network and User
c. One user to another user
d. All of the these
Hide Answer Workspace
Answer: (a) User and Computer
Explanation: The OS is software that acts as an interface between a device and users
and is also known as system software.
17) What is the paging in the operating system?
a. Memory management scheme
b. Network management scheme
c. Internet management scheme
d. None of the these
Hide Answer Workspace
Answer: (a) Memory management scheme
Explanation: In the operating system, paging is a memory management scheme
(MMS) in which memory is divided into pages of fixed size.
18) Which of the following programs is loaded first when starting a computer?
a. Window desktop
b. Network connection program
c. Operating system
d. CMD
Hide Answer Workspace
Answer: (c) Operating system
Explanation: When the computer is powered on, the first operating system program
is loaded into the computer. The OS's job is to control the computer's hardware and
help other computer programs work.
19) Which of the following backup methods is quickest and requires the least amount of
backup space?
a. Complete backups
b. Incremental
c. Differential
d. None of the these
Hide Answer Workspace
Answer: (b) Incremental
Explanation: Incremental backups take less time and space than differential and
complete backups.
20) Which of the following is not a type of directory structure?
a. Acyclic-graph directory structure
b. Single-level directory structure
c. Tree directory structure
d. Stack directory structure
Hide Answer Workspace
Answer: (d) Stack directory structure
Explanation: Acyclic-graph, Single-level, and Tree directory structures are a type of
directory structure in the operating system. But the stack is a linear data structure, so
option (d) is correct answer.
21) Which of the following scheduling algorithm is non-preemptive scheduling?
a. SJF scheduling
b. Round-Robin scheduling
c. SRTF scheduling
d. None of these.
Hide Answer Workspace
Answer: (a) SJF scheduling
Explanation: Shortest job first scheduling is non-preemptive scheduling. In this
scheduling algorithm, the process which takes the least time to complete executes that
process first.
22) Which of the following scheduling reduces process flow time?
a. FCFS
b. LIFO
c. SJF
d. All of the these
Hide Answer Workspace
Answer: (b) SJF
Explanation: Shortest job first scheduling is non-preemptive scheduling. In this
scheduling algorithm, the process which takes the least time to complete executes that
process first.
23) Consider the following three processes in the FCFS.
Process ID. Brust-time. Arrival-time
P1 3 3
P2 6 6
P3 9 9
What is the average waiting time?
a. 2
b. 3
c. 4
d. 5
Hide Answer Workspace
Answer: (b) 3
Explanation:
TA Time = CT - AT
Waiting Time = TA - BT
Process ID.
Brust-time.
Arrival-
time
Completion-
Time (CT)
Turnaround-
Time (TA)
Waiting-
Time (WT)
P1 3 3 3 3 0
P2 6 6 9 8 2
P3 9 9 18 16 7
Average waiting time = (0 + 2 + 7) / 3 = 3
24) How many types of buffer overflow in the operating system?
a. Two
b. Six
c. Seven
d. Five
Hide Answer Workspace
Answer: (a) Two
Explanation: There are two types of buffer-overflows: heap-based and stack-based.
25) In which allocation method does the user size the file before creating the file?
a. Contiguous
b. Linked
c. Indexed
d. None of the these
Hide Answer Workspace
Answer: (a) Contiguous
Explanation: In the contiguous allocation method, the user has to give the size of the
file before creating the file so that the operating system can give contiguous blocks in
the disk-based on the size of that file.
26) Which of the following algorithms is used to avoid deadlock?
a. Dynamic Programming algorithm
b. Primality algorithms
c. Banker's algorithm
d. Deadlock algorithm
Hide Answer Workspace
Answer: (c) Banker's algorithm
Explanation: Banker's algorithm is a deadlock avoidance and resource allocation
algorithm. This algorithm was developed by Edger Dijkstra. It is also called a detection
algorithm.
27) Which of the following component does not belong to PCB (Process Control Block)?
a. CPU registers
b. CPU scheduling information
c. Operating System information
d. Accounting information
Hide Answer Workspace
Answer: (c) Operating System information
Explanation: The operating system information is not the component of the PCB, so
option (d) is the correct answer.
28) Which of the following method is used to improve the main memory utilization?
a. Swapping
b. Operating system
c. Memory stack
d. None of these.
Hide Answer Workspace
Answer: (a) Swapping
Explanation: Swapping is a technique in which the process is removed from the main
memory and stored in secondary memory. It is used to improve the main memory
utilization.
29) Buffer is a ___________.
a. Permanent area
b. Temporary area
c. Small area
d. Large area
Hide Answer Workspace
Answer: (b) Temporary area
Explanation: Buffer is a temporary area where data is stored for some time before
being transferred to the main memory.
30) Which of the following operating systems supports only real-time applications?
a. Batch OS
b. Distributed OS
c. Real-time OS
d. Network OS
Hide Answer Workspace
Answer: (c) Real-time OS
Explanation: The real-time OS supports real-time applications. This OS is used for
industrial and scientific work. It completes the tasks in a given time.
31) Which of the following binary formats support the Linux operating system?
a. 0 and 1
b. Binary Number Format
c. ELF Binary Format
d. None of the these
Hide Answer Workspace
Answer: (c) ELF Binary Format
Explanation: ELFstands for "Executable-and-Linkable-Format". The ELF format is used
for libraries and executable files in Linux operating systems.
32) What is Kali Linux?
a. Network device
b. Operating system
c. Server name
d. Computer name
Hide Answer Workspace
Answer: (b) Operating system
Explanation: Kali Linux is an operating system similar to Windows, Unix, and macOS.
Kali operating system was designed for reverse engineering, security, computer
forensics, etc.
33) Which of the following statement is correct about fragmentation?
a. It is software that connects the OS.
b. It is part of the software.
c. Loss the memory
d. All of the these
Hide Answer Workspace
Answer: (c) Loss the memory
Explanation: A fragmentation is a state of a hard disk in which the most important
parts of a single file are stored at different places in the disk. Due to which there is a
loss of memory, and the working efficiency of the operating system is also affected.
34) SSTF stands for ________.
a. Shortest Signal Time First
b. Shortest Seek Time First
c. System Seek Time First
d. System Shortest Time First
Hide Answer Workspace
Answer: (b) Shortest Seek Time First
Explanation: SSTF stands for Shortest-Seek-Time-First. In the SSTF algorithm, that
request is executed first, whose seek time is the shortest.
35) The PCB is identified by ___________.
a. Real-Number
b. Binary Number
c. Store block
d. Integer Process ID
Hide Answer Workspace
Answer: (d) Integer Process ID
Explanation: PCB is a data structure that is used to store the information of processes.
It is identified by an integer process ID (PID).
36) Which of the following method is used to prevent threads or processes from accessing
a single resource?
a. PCB
b. Semaphore
c. Job Scheduler
d. Non-Contiguous Memory Allocation
Hide Answer Workspace
Answer: (b) Semaphore
Explanation: Semaphore is an integer variable that is used to prevent threads or
processes from accessing a single resource.
37) Which of the following mechanisms is a locking mechanism?
a. Semaphore
b. PCB
c. Mutex
d. Binary Semaphore
Hide Answer Workspace
Answer: (c) Mutex
Explanation: The mutex is a locking mechanism that ensures that only one thread can
occupy the mutex at a time and enter the critical section.
38) Which of the following statements is correct about virtual memory?
a. It is a combination of the logical-memory and physical-memory
b. It is a separation of user logical memory and physical memory
c. It is a virtual network memory
d. None of the these
Hide Answer Workspace
Answer: (b) It is a separation of user logical memory and physical memory
Explanation: Virtual memory is used to separate the user's logical memory and actual
physical memory. Therefore, option (b) is the correct answer.
39) COW stands for __________
a. Compress of write memory
b. Copy overwrite
c. Compress overwrites
d. Computer of world
Hide Answer Workspace
Answer: (b) Copy overwrite
Explanation: COW stands for Copy-Overwrite. Initially, it allows both the parent and
child systems to share the same page.
40) Who is responsible for keeping the process from the program?
a. Operating system
b. CPU
c. Monitor
d. All of the these
Hide Answer Workspace
Answer: (a) Operating system
Explanation: A process is created from a program by the operating system. The OS is
software that acts as an interface between a device and users and is also known as
system software.
41) Which of the following operating systems require a command to run?
a. Kali Linux
b. Windows
c. Mac OS
d. Single-user operating system
Hide Answer Workspace
Answer: (a) Kali Linux
Explanation: Kali Linux is a fast operating system as more work is done through the
command line in it. This OS is a Debian-based Linux OS.
This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on
“RTOS”.
1. In real time operating system ____________
a) all processes have the same priority
b) a task must be serviced by its deadline period
c) process scheduling can be done only once
d) kernel is not required
View Answer
Answer: b
Explanation: None.
2. Hard real time operating system has ______________ jitter than a soft real time
operating system.
a) less
b) more
c) equal
d) none of the mentioned
View Answer
Answer: a
Explanation: Jitter is the undesired deviation from the true periodicity.
3. For real time operating systems, interrupt latency should be ____________
a) minimal
b) maximum
c) zero
d) dependent on the scheduling
View Answer
Answer: a
Explanation: Interrupt latency is the time duration between the generation of interrupt
and execution of its service.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. In rate monotonic scheduling ____________
a) shorter duration job has higher priority
b) longer duration job has higher priority
c) priority does not depend on the duration of the job
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
5. In which scheduling certain amount of CPU time is allocated to each process?
a) earliest deadline first scheduling
b) proportional share scheduling
c) equal share scheduling
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
Check this: Computer Science MCQs | BCA MCQs
6. The problem of priority inversion can be solved by ____________
a) priority inheritance protocol
b) priority inversion protocol
c) both priority inheritance and inversion protocol
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
7. Time duration required for scheduling dispatcher to stop one process and start
another is known as ____________
a) process latency
b) dispatch latency
c) execution latency
d) interrupt latency
View Answer
Answer: b
Explanation: None.
8. Time required to synchronous switch from the context of one thread to the context of
another thread is called?
a) threads fly-back time
b) jitter
c) context switch time
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
9. Which one of the following is a real time operating system?
a) RTLinux
b) VxWorks
c) Windows CE
d) All of the mentioned
View Answer
Answer: d
Explanation: None.
10. VxWorks is centered around ____________
a) wind microkernel
b) linux kernel
c) unix kernel
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on
“Basics”.
1. What is an operating system?
a) collection of programs that manages hardware resources
b) system service provider to the application programs
c) interface between the hardware and application programs
d) all of the mentioned
View Answer
Answer: d
Explanation: An Operating System acts as an intermediary between user/user
applications/application programs and hardware. It is a program that manages hardware
resources. It provides services to application programs.
2. To access the services of operating system, the interface is provided by the
___________
a) System calls
b) API
c) Library
d) Assembly instructions
View Answer
Answer: a
Explanation: To access services of the Operating System an interface is provided by the
System Calls. Generally, these are functions written in C and C++. Open, Close, Read,
Write are some of most prominently used system calls.
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 can not be loaded in running operating
system
d) kernel remains in the memory during the entire computer session
View Answer
Answer: c
Explanation: Kernel is the first program which is loaded in memory when OS is loading
as well as it remains in memory till OS is running. Kernel is the core part of the OS which
is responsible for managing resources, allowing multiple processes to use the resources
and provide services to various processes. Kernel modules can be loaded and unloaded
in run-time i.e. in running OS.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
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
View Answer
Answer: d
Explanation: All the mentioned errors are handled by OS. The OS is continuously
monitoring all of its resources. Also, the OS is constantly detecting and correcting errors.
5. What is the main function of the command interpreter?
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
View Answer
Answer: a
Explanation: The main function of command interpreter is to get and execute the next
user-specified command. Command Interpreter checks for valid command and then runs
that command else it will throw an error.
Check this: BCA MCQs | Computer Science Books
6. In Operating Systems, which of the following is/are CPU scheduling algorithms?
a) Round Robin
b) Shortest Job First
c) Priority
d) All of the mentioned
View Answer
Answer: d
Explanation: In Operating Systems, CPU scheduling algorithms are:
i) First Come First Served scheduling
ii) Shortest Job First scheduling
iii) Priority scheduling
iv) Round Robin scheduling
v) Multilevel Queue scheduling
vi) Multilevel Feedback Queue scheduling
All of these scheduling algorithms have their own advantages and disadvantages.
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
View Answer
Answer: a
Explanation: If a process fails, most operating systems write the error information to a
log file. Log file is examined by the debugger, to find out what is the actual cause of that
particular problem. Log file is useful for system programmers for correcting errors.
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
View Answer
Answer: a
Explanation: A facility that dynamically adds probes to a running system, both in user
process and in the kernel is called DTrace. This is very much useful in troubleshooting
kernels in real-time.
9. Which one of the following is not a real time operating system?
a) VxWorks
b) QNX
c) RTLinux
d) Palm OS
View Answer
Answer: d
Explanation: VxWorks, QNX & RTLinux are real-time operating systems. Palm OS is a
mobile operating system. Palm OS is developed for Personal Digital Assistants (PDAs).
10. The OS X has ____________
a) monolithic kernel
b) hybrid kernel
c) microkernel
d) monolithic kernel with modules
View Answer
Answer: b
Explanation: OS X has a hybrid kernel. Hybrid kernel is a combination of two different
kernels. OS X is developed by Apple and originally it is known as Mac OS X.
1. The systems which allow only one process execution at a time, are called
__________
a) uniprogramming systems
b) uniprocessing systems
c) unitasking systems
d) none of the mentioned
View Answer
Answer: b
Explanation: Those systems which allow more than one process execution at a time, are
called multiprocessing 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
View Answer
Answer: d
Explanation: In Operating Systems, each process has its own address space which
contains code, data, stack and heap segments or sections. Each process also has a list
of files which is opened by the process as well as all pending alarms, signals and
various signal handlers.
3. In Unix, Which system call creates the new process?
a) fork
b) create
c) new
d) none of the mentioned
View Answer
Answer: a
Explanation: In UNIX, a new process is created by fork() system call. fork() system call
returns a process ID which is generally the process id of the child process created.
Note: A process can be terminated due to __________
a) normal exit
b) fatal error
c) killed by another process
d) all of the mentioned
View Answer
Answer: d
Explanation: A process can be terminated normally by completing its task or because of
fatal error or killed by another process or forcefully killed by a user. When the process
completes its task without any error then it exits normally. The process may exit
abnormally because of the occurrence of fatal error while it is running. The process can
be killed or terminated forcefully by another process.
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
View Answer
Answer: a
Explanation: Ready state of the process means process has all necessary resources
which are required for execution of that process when CPU is allocated. Process is
ready for execution but waiting for the CPU to be allocated.
Take Operating System Tests Now!
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
View Answer
Answer: b
Explanation: Interprocess Communication (IPC) is a communication mechanism that
allows processes to communicate with each other and synchronise their actions without
using the same address space. IPC can be achieved using shared memory and
message passing.
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
View Answer
Answer: a
Explanation: Deadlock is a situation which occurs because process A is waiting for one
resource and holds another resource (blocking resource). At the same time another
process B demands blocking a resource as it is already held by a process A, process B
is waiting state unless and until process A releases occupied resource.
8. A process stack does not contain __________
a) Function parameters
b) Local variables
c) Return addresses
d) PID of child process
View Answer
Answer: d
Explanation: Process stack contains Function parameters, Local variables and Return
address. It does not contain the PID of child process.
9. Which system call can be used by a parent process to determine the termination of
child process?
a) wait
b) exit
c) fork
d) get
View Answer
Answer: a
Explanation: wait() system call is used by the parent process to determine termination of
child process. The parent process uses wait() system call and gets the exit status of the
child process as well as the pid of the child process which is terminated.
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
View Answer
Answer: b
Explanation: The address of the next instruction to be executed by the current process is
provided by the Program Counter. After every instruction is executed, the Program
Counter is incremented by 1 i.e. address of the next instruction to be executed. CPU
fetches instruction from the address denoted by Program Counter and execute it.
1. A Process Control Block(PCB) does not contain which of the following?
a) Code
b) Stack
c) Bootstrap program
d) Data
View Answer
Answer: c
Explanation: Process Control Block (PCB) contains information related to a process
such as Process State, Program Counter, CPU Register, etc. Process Control Block is
also known as Task Control Block. Bootstrap program is a program which runs initially
when the system or computer is booted or rebooted.
2. The number of processes completed per unit time is known as __________
a) Output
b) Throughput
c) Efficiency
d) Capacity
View Answer
Answer: b
Explanation: The number of processes completed per unit time is known as Throughput.
Suppose there are 4 processes A, B, C & D they are taking 1, 3, 4 & 7 units of time
respectively for their executions. For 10 units of time, throughput is high if process A, B
& C are running first as 3 processes can execute. If process C runs first then throughput
is low as maximum only 2 processes can execute. Throughput is low for processes
which take a long time for execution. Throughput is high for processes which take a
short time for execution.
3. The state of a process is defined by __________
a) the final activity of the process
b) the activity just executed by the process
c) the activity to next be executed by the process
d) the current activity of the process
View Answer
Answer: d
Explanation: The state of a process is defined by the current activity of the process. A
process state changes when the process executes. The process states are as New,
Ready, Running, Wait, Terminated.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. Which of the following is not the state of a process?
a) New
b) Old
c) Waiting
d) Running
View Answer
Answer: b
Explanation: There is no process state such as old. When a process is created then the
process is in New state. When the process gets the CPU for its execution then the
process is in Running state. When the process is waiting for an external event then the
process is in a Waiting state.
5. What is a Process Control Block?
a) Process type variable
b) Data Structure
c) A secondary storage section
d) A Block in memory
View Answer
Answer: b
Explanation: A Process Control Block (PCB) is a data structure. It contains information
related to a process such as Process State, Program Counter, CPU Register, etc.
Process Control Block is also known as Task Control Block.
Check this: BCA MCQs | Operating System Books
6. The entry of all the PCBs of the current processes is in __________
a) Process Register
b) Program Counter
c) Process Table
d) Process Unit
View Answer
Answer: c
Explanation: The entry of all the PCBs of the current processes is in Process Table. The
Process Table has the status of each and every process that is created in OS along with
their PIDs.
7. What is the degree of multiprogramming?
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
View Answer
Answer: d
Explanation: Multiprogramming means the number of processes are in the ready states.
To increase utilization of CPU, Multiprogramming is one of the most important abilities of
OS. Generally, a single process cannot use CPU or I/O at all time, whenever CPU or I/O
is available another process can use it. By doing this CPU utilization is increased.
8. A single thread of control allows the process to perform __________
a) only one task at a time
b) multiple tasks at a time
c) only two tasks at a time
d) all of the mentioned
View Answer
Answer: a
Explanation: A single thread of control allows the process to perform only one task at a
time. In the case of multi-core, multiple threads can be run simultaneously and can
perform multiple tasks at a time.
9. What is the objective of multiprogramming?
a) Have a process running at all time
b) Have multiple programs waiting in a queue ready to run
c) To increase CPU utilization
d) None of the mentioned
View Answer
Answer: c
Explanation: The objective of multiprogramming is to increase CPU utilization. Generally,
a single process cannot use CPU or I/O at all time, whenever CPU or I/O is available
another process can use it. Multiprogramming offers this ability to OS by keeping
multiple programs in a ready queue.
1. Which of the following do not belong to queues for processes?
a) Job Queue
b) PCB queue
c) Device Queue
d) Ready Queue
View Answer
Answer: b
Explanation: PCB queue does not belong to queues for processes. PCB is a process
control block which contains information related to process. Each process is represented
by PCB.
2. When the process issues an I/O request __________
a) It is placed in an I/O queue
b) It is placed in a waiting queue
c) It is placed in the ready queue
d) It is placed in the Job queue
View Answer
Answer: a
Explanation: When the process issues an I/O request it is placed in an I/O queue. I/O is
a resource and it should be used effectively and every process should get access to it.
There might be multiple processes which requested for I/O. Depending on scheduling
algorithm I/O is allocated to any particular process and after completing I/O operation,
I/O access is returned to the OS.
3. What will happen 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
View Answer
Answer: a
Explanation: When a process terminates, it removes from all queues. All allocated
resources to that particular process are deallocated and all those resources are returned
back to OS.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
4. What is a long-term scheduler?
a) It selects processes which have to be brought into the ready queue
b) It selects processes which have to be executed next and allocates CPU
c) It selects processes which heave to remove from memory by swapping
d) None of the mentioned
View Answer
Answer: a
Explanation: A long-term scheduler selects processes which have to be brought into the
ready queue. When processes enter the system, they are put in the job queue. Long-
term scheduler selects processes from the job queue and puts them in the ready queue.
It is also known as Job Scheduler.
5. If all processes I/O bound, the ready queue will almost always be ______ and the
Short term Scheduler will have a ______ to do.
a) full, little
b) full, lot
c) empty, little
d) empty, lot
View Answer
Answer: c
Explanation: If all processes are I/O bound, the ready queue will almost empty and the
short-term scheduler will have a little to do. I/O bound processes spend more time doing
I/O than computation.
Participate in Operating System Certification Contest of the Month Now!
6. What is a medium-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
View Answer
Answer: c
Explanation: A medium-term scheduler selects which process to remove from memory
by swapping. The medium-term scheduler swapped out the process and later swapped
in. Swapping helps to free up memory.
7. 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
View Answer
Answer: b
Explanation: A short-term scheduler selects a process which has to be executed next
and allocates CPU. Short-term scheduler selects a process from the ready queue. It
selects processes frequently.
8. The primary distinction between the short term scheduler and the long term scheduler
is __________
a) The length of their queues
b) The type of processes they schedule
c) The frequency of their execution
d) None of the mentioned
View Answer
Answer: c
Explanation: The primary distinction between the short-term scheduler and the long-term
scheduler is the frequency of their execution. The short-term scheduler executes
frequently while the long-term scheduler executes much less frequently.
9. The only state transition that is initiated by the user process itself is __________
a) block
b) wakeup
c) dispatch
d) none of the mentioned
View Answer
Answer: a
Explanation: The only state transition that is initiated by the user process itself is block.
Whenever a user process initiates an I/O request it goes into block state unless and until
the I/O request is not completed.
10. 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
View Answer
Answer: b
Explanation: 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 Ready State. In a time-
sharing operating system unit time is defined for sharing CPU, it is called a time
quantum or time slice. If a process takes less than 1 time quantum, then the process
itself releases the CPU.
11. In a multiprogramming environment __________
a) the processor executes more than one process at a time
b) the programs are developed by more than one person
c) more than one process resides in the memory
d) a single user can execute many programs at the same time
View Answer
Answer: c
Explanation: In a multiprogramming environment more than one process resides in the
memory. Whenever a CPU is available, one process amongst all present in memory
gets the CPU for execution. Multiprogramming increases CPU utilization.
12. Suppose that a process is in “Blocked” state waiting for some I/O service. When the
service is completed, it goes to the __________
a) Running state
b) Ready state
c) Suspended state
d) Terminated state
View Answer
Answer: b
Explanation: Suppose that a process is in “Blocked” state waiting for some I/O service.
When the service is completed, it goes to the ready state. Process never goes directly to
the running state from the waiting state. Only processes which are in ready state go to
the running state whenever CPU allocated by operating system.
13. 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
View Answer
Answer: d
Explanation: The context of a process in the PCB of a process does not contain context
switch time. When switching CPU from one process to another, the current context of
the process needs to be saved. It includes values of the CPU registers, process states,
memory-management information.
14. Which of the following need not necessarily be saved on a context switch between
processes?
a) General purpose registers
b) Translation lookaside buffer
c) Program counter
d) All of the mentioned
View Answer
Answer: b
Explanation: Translation Look-aside Buffer (TLB) need not necessarily be saved on a
context switch between processes. A special, small, fast-lookup hardware cache is
called Translation Look-aside Buffer. TLB used to reduce memory access time.
15. Which of the following does not interrupt a running process?
a) A device
b) Timer
c) Scheduler process
d) Power failure
View Answer
Answer: c
Explanation: Scheduler process does not interrupt a running process. Scheduler process
selects an available process from a pool of available processes and allocates CPU to it.
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
View Answer
Answer: a
Explanation: A cooperating process can be affected by other processes executing in the
system. Also it can affect other processes executing in the system. A process shares
data with other processes, such a process is known as a cooperating process.
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
View Answer
Answer: b
Explanation: When several processes access the same data concurrently and the
outcome of the execution depends on the particular order in which access takes place is
called race condition.
3. If a process is executing in its critical section, then no other processes can be
executing in their critical section. What is this condition called?
a) mutual exclusion
b) critical exclusion
c) synchronous exclusion
d) asynchronous exclusion
View Answer
Answer: a
Explanation: If a process is executing in its critical section, then no other processes can
be executed in their critical section. This condition is called Mutual Exclusion. Critical
section of the process is shared between multiple processes. If this section is executed
by more than one or all of them concurrently then the outcome of this is not as per
desired outcome. For this reason the critical section of the process should not be
executed concurrently.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. Which one of the following is a synchronization tool?
a) thread
b) pipe
c) semaphore
d) socket
View Answer
Answer: c
Explanation: Semaphore is a synchronization tool. Semaphore is a mechanism which
synchronizes or controls access of threads on critical resources. There are two types of
semaphores i) Binary Semaphore ii) Counting Semaphore.
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
View Answer
Answer: a
Explanation: A semaphore is a shared integer variable that can not drop below zero. In
binary semaphore, if the value of the semaphore variable is zero that means there is a
process that uses a critical resource and no other process can access the same critical
resource until it is released. In Counting semaphore, if the value of the semaphore
variable is zero that means there is no resource available.
Take Operating System Mock Tests - Chapterwise!
Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
6. Mutual exclusion can be provided by the __________
a) mutex locks
b) binary semaphores
c) both mutex locks and binary semaphores
d) none of the mentioned
View Answer
Answer: c
Explanation: Mutual exclusion can be provided by both mutex locks and binary
semaphore. Mutex is a short form of Mutual Exclusion. Binary semaphore also provides
a mechanism for mutual exclusion. Binary semaphore behaves similar to 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
View Answer
Answer: a
Explanation: When a high priority task is indirectly preempted by a medium priority task
effectively inverting the relative priority of the two tasks, the scenario is called priority
inversion.
8. Process synchronization can be done on __________
a) hardware level
b) software level
c) both hardware and software level
d) none of the mentioned
View Answer
Answer: c
Explanation: Process synchronization can be done on both hardware and software level.
Critical section problems can be resolved using hardware synchronisation. But this
method is not simple for implementation so software synchronization is mostly used.
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
View Answer
Answer: d
Explanation: A monitor is a module that encapsulates shared data structures,
procedures that operate on shared data structure, synchronization between concurrent
procedure invocation.
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
View Answer
Answer: a
Explanation: To enable a process to wait within the monitor a condition variable must be
declared as condition.
1. Restricting the child process to a subset of the parent’s resources prevents any
process from __________
a) overloading the system by using a lot of secondary storage
b) under-loading the system by very less CPU utilization
c) overloading the system by creating a lot of sub-processes
d) crashing the system by utilizing multiple resources
View Answer
Answer: c
Explanation: Restricting the child process to a subset of the parent’s resources prevents
any process from overloading the system by creating a lot of sub-processes. A process
creates a child process, child process requires certain resources to complete its task. A
child process can demand required resources directly from the system, but by doing this
system will be overloaded. So to avoid overloading of the system, the parent process
shares its resources among children.
2. A parent process calling _____ system call will be suspended until children processes
terminate.
a) wait
b) fork
c) exit
d) exec
View Answer
Answer: a
Explanation: A parent process calling wait system call will be suspended until children
processes terminate. A parameter is passed to wait system call which will obtain exit
status of child as well as wait system call returns PID of terminated process.
3. Cascading termination refers to termination of all child processes if the parent process
terminates ______
a) Normally
b) Abnormally
c) Normally or abnormally
d) None of the mentioned
View Answer
Answer: c
Explanation: Cascading termination refers to termination of all child processes if the
parent process terminates Normally or Abnormally. Some systems don’t allow child
processes to exist if the parent process has terminated. Cascading termination is
normally initiated by the operating system.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. With _____________ only one process can execute at a time; meanwhile all other
process are waiting for the processor. With ______________ more than one process
can be running simultaneously each on a different processor.
a) Multiprocessing, Multiprogramming
b) Multiprogramming, Uniprocessing
c) Multiprogramming, Multiprocessing
d) Uniprogramming, Multiprocessing
View Answer
Answer: d
Explanation: With Uniprogramming only one process can execute at a time; meanwhile
all other processes are waiting for the processor. With Multiprocessing more than one
process can run simultaneously each on different processors. The Uniprogramming
system has only one program inside the core while the Multiprocessing system has
multiple processes inside multiple cores. The core is one which executes instructions
and stores data locally into registers.
5. In UNIX, each process is identified by its __________
a) Process Control Block
b) Device Queue
c) Process Identifier
d) None of the mentioned
View Answer
Answer: c
Explanation: In Unix, each process is identified by its Process Identifier or PID. The PID
provides unique value to each process in the system so that each process can be
identified uniquely.
Take Operating System Tests Now!
6. In UNIX, the return value for the fork system call is _____ for the child process and
_____ for the parent process.
a) A Negative integer, Zero
b) Zero, A Negative integer
c) Zero, A nonzero integer
d) A nonzero integer, Zero
View Answer
Answer: c
Explanation: In Unix, the return value of the fork system call is Zero for the child process
and Non-zero value for parent process. A fork system call returns the PID of a newly
created (child) process to the parent and returns Zero to that newly created (child)
process.
7. The child process can __________
a) be a duplicate of the parent process
b) never be a duplicate of the parent process
c) cannot have another program loaded into it
d) never have another program loaded into it
View Answer
Answer: a
Explanation: The child process can be a duplicate of the parent process. The child
process created by fork consists of a copy of the address space of the parent process.
8. The child process completes execution, but the parent keeps executing, then the child
process is known as __________
a) Orphan
b) Zombie
c) Body
d) Dead
View Answer
Answer: b
Explanation: The child process completes execution, but the parent keeps executing,
then the child process is known as Zombie. When a child process terminates, its
resources get deallocated but its entry in the Process Control Block (PCB) remains there
until its parent calls wait system call.
1. What is Interprocess communication?
a) allows processes to communicate and synchronize their actions when using the same
address space
b) allows processes to communicate and synchronize their actions
c) allows the processes to only synchronize their actions without communication
d) none of the mentioned
View Answer
Answer: b
Explanation: Interprocess Communication allows processes to communicate and
synchronize their actions. Interprocess Communication (IPC) mechanism is used by
cooperating processes to exchange data and information.
There are two models of IPC:
→ Shared Memory
→ Message Passing
2. Message passing system allows processes to __________
a) communicate with each other without sharing the same address space
b) communicate with one another by resorting to shared data
c) share data
d) name the recipient or sender of the message
View Answer
Answer: a
Explanation: Message Passing system allows processes to communicate with each
other without sharing the same address space.
3. Which of the following two operations are provided by the IPC facility?
a) write & delete message
b) delete & receive message
c) send & delete message
d) receive & send message
View Answer
Answer: d
Explanation: Two operations provided by the IPC facility are receive and send
messages. Exchange of data takes place in cooperating processes.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
4. Messages sent by a process __________
a) have to be of a fixed size
b) have to be a variable size
c) can be fixed or variable sized
d) none of the mentioned
View Answer
Answer: c
Explanation: Messages sent by a process can be fixed or variable size. If the message
size of the process is fixed then system level implementation is straightforward but it
makes the task of programming more difficult. If the message size of the process is
variable then system level implementation is more complex but it makes the task of
programming simpler.
5. The link between two processes P and Q to send and receive messages is called
__________
a) communication link
b) message-passing link
c) synchronization link
d) all of the mentioned
View Answer
Answer: a
Explanation: The link between two processes P and Q to send and receive messages is
called communication link. Two processes P and Q want to communicate with each
other; there should be a communication link that must exist between these two
processes so that both processes can able to send and receive messages using that
link.
Participate in Operating System Certification Contest of the Month Now!
6. Which of the following are TRUE for direct communication?
a) A communication link can be associated with N number of process(N = max. number
of processes supported by system)
b) A communication link is associated with exactly two processes
c) Exactly N/2 links exist between each pair of processes(N = max. number of processes
supported by system)
d) Exactly two link exists between each pair of processes
View Answer
Answer: b
Explanation: For direct communication, a communication link is associated with exactly
two processes. One communication link must exist between a pair of processes.
7. In indirect communication between processes P and Q __________
a) there is another process R to handle and pass on the messages between P and Q
b) there is another machine between the two processes to help communication
c) there is a mailbox to help communication between P and Q
d) none of the mentioned
View Answer
Answer: c
Explanation: In indirect communication between processes P and Q there is a mailbox to
help communication between P and Q. A mailbox can be viewed abstractly as an object
into which messages can be placed by processes and from which messages can be
removed.
8. In the non blocking send __________
a) the sending process keeps sending until the message is received
b) the sending process sends the message and resumes operation
c) the sending process keeps sending until it receives a message
d) none of the mentioned
View Answer
Answer: b
Explanation: In the non blocking send, the sending process sends the message and
resumes operation. Sending process doesn’t care about reception. It is also known as
asynchronous send.
9. In the Zero capacity queue __________
a) the queue can store at least one message
b) the sender blocks until the receiver receives the message
c) the sender keeps sending and the messages don’t wait in the queue
d) none of the mentioned
View Answer
Answer: b
Explanation: In the Zero capacity queue the sender blocks until the receiver receives the
message. Zero capacity queue has maximum capacity of Zero; thus message queue
does not have any waiting message in it.
10. The Zero Capacity queue __________
a) is referred to as a message system with buffering
b) is referred to as a message system with no buffering
c) is referred to as a link
d) none of the mentioned
View Answer
Answer: b
Explanation: The Zero capacity queue is referred to as a message system with no
buffering. Zero capacity queue has maximum capacity of Zero; thus message queue
does not have any waiting message in it.
11. Bounded capacity and Unbounded capacity queues are referred to as __________
a) Programmed buffering
b) Automatic buffering
c) User defined buffering
d) No buffering
View Answer
Answer: b
Explanation: Bounded capacity and Unbounded capacity queues are referred to as
Automatic buffering. Buffer capacity of the Bounded capacity queue is finite length and
buffer capacity of the Unbounded queue is infinite.
1. Remote Procedure Calls are used ____________
a) for communication between two processes remotely different from each other on the
same system
b) for communication between two processes on the same system
c) for communication between two processes on separate systems
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
2. To differentiate the many network services a system supports ______ are used.
a) Variables
b) Sockets
c) Ports
d) Service names
View Answer
Answer: c
Explanation: None.
3. RPC provides a(an) _____ on the client-side, a separate one for each remote
procedure.
a) stub
b) identifier
c) name
d) process identifier
View Answer
Answer: a
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. What is stub?
a) transmits the message to the server where the server side stub receives the message
and invokes procedure on the server side
b) packs the parameters into a form transmittable over the network
c) locates the port on the server
d) all of the mentioned
View Answer
Answer: d
Explanation: None.
5. To resolve the problem of data representation on different systems RPCs define
_____________
a) machine dependent representation of data
b) machine representation of data
c) machine-independent representation of data
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
Check this: BCA MCQs | Computer Science MCQs
6. What is the full form of RMI?
a) Remote Memory Installation
b) Remote Memory Invocation
c) Remote Method Installation
d) Remote Method Invocation
View Answer
Answer: d
Explanation: None.
7. The remote method invocation __________
a) allows a process to invoke memory on a remote object
b) allows a thread to invoke a method on a remote object
c) allows a thread to invoke memory on a remote object
d) allows a process to invoke a method on a remote object
View Answer
Answer: b
Explanation: None.
8. A process that is based on IPC mechanism which executes on different systems and
can communicate with other processes using message based communication, is called
________
a) Local Procedure Call
b) Inter Process Communication
c) Remote Procedure Call
d) Remote Machine Invocation
View Answer
Answer: c
Explanation: None.
1. The initial program that is run when the computer is powered up is called __________
a) boot program
b) bootloader
c) initializer
d) bootstrap program
View Answer
Answer: d
Explanation: None.
2. How does the software trigger an interrupt?
a) Sending signals to CPU through bus
b) Executing a special operation called system call
c) Executing a special program called system program
d) Executing a special program called interrupt trigger program
View Answer
Answer: b
Explanation: None.
3. What is a trap/exception?
a) hardware generated interrupt caused by an error
b) software generated interrupt caused by an error
c) user generated interrupt caused by an error
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
4. What is an ISR?
a) Information Service Request
b) Interrupt Service Request
c) Interrupt Service Routine
d) Information Service Routine
View Answer
Answer: c
Explanation: None.
5. What is an interrupt vector?
a) It is an address that is indexed to an interrupt handler
b) It is a unique device number that is indexed by an address
c) It is a unique identity given to an interrupt
d) None of the mentioned
View Answer
Answer: a
Explanation: None.
Participate in Operating System Certification Contest of the Month Now!
6. DMA is used for __________
a) High speed devices(disks and communications network)
b) Low speed devices
c) Utilizing CPU cycles
d) All of the mentioned
View Answer
Answer: a
Explanation: None.
7. In a memory mapped input/output __________
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is
ready
b) the CPU writes one data byte to the data register and sets a bit in control register to
show that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly
View Answer
Answer: b
Explanation: None.
8. In a programmed input/output(PIO) __________
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is
ready
b) the CPU writes one data byte to the data register and sets a bit in control register to
show that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly
View Answer
Answer: a
Explanation: None.
9. In an interrupt driven input/output __________
a) the CPU uses polling to watch the control bit constantly, looping to see if a device is
ready
b) the CPU writes one data byte to the data register and sets a bit in control register to
show that a byte is available
c) the CPU receives an interrupt when the device is ready for the next byte
d) the CPU runs a user written code and does accordingly
View Answer
Answer: c
Explanation: None.
10. In the layered approach of Operating Systems __________
a) Bottom Layer(0) is the User interface
b) Highest Layer(N) is the User interface
c) Bottom Layer(N) is the hardware
d) Highest Layer(N) is the hardware
View Answer
Answer: b
Explanation: None.
11. How does the Hardware trigger an interrupt?
a) Sending signals to CPU through a system bus
b) Executing a special program called interrupt program
c) Executing a special program called system program
d) Executing a special operation called system call
View Answer
Answer: a
Explanation: None.
12. Which operation is performed by an interrupt handler?
a) Saving the current state of the system
b) Loading the interrupt handling code and executing it
c) Once done handling, bringing back the system to the original state it was before the
interrupt occurred
d) All of the mentioned
View Answer
Answer: d
Explanation: None.
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
View Answer
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
View Answer
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
View Answer
Answer: b
Explanation: None.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
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
View Answer
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
View Answer
Answer: a
Explanation: None.
Become Top Ranker in Operating System Now!
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
View Answer
Answer: b
Explanation: None.
7. Which algorithm is defined in Time quantum?
a) shortest job scheduling algorithm
b) round robin scheduling algorithm
c) priority scheduling algorithm
d) multilevel queue scheduling algorithm
View Answer
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
View Answer
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
View Answer
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
View Answer
Answer: b
Explanation: User level threads are managed by thread library and the kernel is unaware
of them.
1. CPU scheduling is the basis of ___________
a) multiprocessor systems
b) multiprogramming operating systems
c) larger memory sized systems
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
2. With multiprogramming ______ is used productively.
a) time
b) space
c) money
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
3. What are the two steps of a process execution?
a) I/O & OS Burst
b) CPU & I/O Burst
c) Memory & I/O Burst
d) OS & Memory Burst
View Answer
Answer: b
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. An I/O bound program will typically have ____________
a) a few very short CPU bursts
b) many very short I/O bursts
c) many very short CPU bursts
d) a few very short I/O bursts
View Answer
Answer: c
Explanation: None.
5. A process is selected from the ______ queue by the ________ scheduler, to be
executed.
a) blocked, short term
b) wait, long term
c) ready, short term
d) ready, long term
View Answer
Answer: c
Explanation: None.
Check this: Operating System Books | BCA MCQs
6. In the following cases non – preemptive scheduling occurs?
a) When a process switches from the running state to the ready state
b) When a process goes from the running state to the waiting state
c) When a process switches from the waiting state to the ready state
d) All of the mentioned
View Answer
Answer: b
Explanation: There is no other choice.
7. The switching of the CPU from one process or thread to another is called
____________
a) process switch
b) task switch
c) context switch
d) all of the mentioned
View Answer
Answer: d
Explanation: None.
8. What is Dispatch latency?
a) the speed of dispatching a process from running to the ready state
b) the time of dispatching a process from running to ready state and keeping the CPU
idle
c) the time to stop one process and start running another one
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
9. Scheduling is done so as to ____________
a) increase CPU utilization
b) decrease CPU utilization
c) keep the CPU more idle
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
10. Scheduling is done so as to ____________
a) increase the throughput
b) decrease the throughput
c) increase the duration of a specific amount of work
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
11. What is Turnaround time?
a) the total waiting time for a process to finish execution
b) the total time spent in the ready queue
c) the total time spent in the running queue
d) the total time from the completion till the submission of a process
View Answer
Answer: d
Explanation: None.
12. Scheduling is done so as to ____________
a) increase the turnaround time
b) decrease the turnaround time
c) keep the turnaround time same
d) there is no relation between scheduling and turnaround time
View Answer
Answer: b
Explanation: None.
13. What is Waiting time?
a) the total time in the blocked and waiting queues
b) the total time spent in the ready queue
c) the total time spent in the running queue
d) the total time from the completion till the submission of a process
View Answer
Answer: b
Explanation: None.
14. Scheduling is done so as to ____________
a) increase the waiting time
b) keep the waiting time the same
c) decrease the waiting time
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
15. What is Response time?
a) the total time taken from the submission time till the completion time
b) the total time taken from the submission time till the first response is produced
c) the total time taken from submission time till the response is output
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
1. Round robin scheduling falls under the category of ____________
a) Non-preemptive scheduling
b) Preemptive scheduling
c) All of the mentioned
d) None of the mentioned
View Answer
Answer: b
Explanation: None.
2. With round robin scheduling algorithm in a time shared system ____________
a) using very large time slices converts it into First come First served scheduling
algorithm
b) using very small time slices converts it into First come First served scheduling
algorithm
c) using extremely small time slices increases performance
d) using very small time slices converts it into Shortest Job First algorithm
View Answer
Answer: a
Explanation: All the processes will be able to get completed.
3. The portion of the process scheduler in an operating system that dispatches
processes is concerned with ____________
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
c) assigning running processes to blocked queue
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
4. Complex scheduling algorithms ____________
a) are very appropriate for very large computers
b) use minimal resources
c) use many resources
d) all of the mentioned
View Answer
Answer: a
Explanation: Large computers are overloaded with a greater number of processes.
5. What is FIFO algorithm?
a) first executes the job that came in last in the queue
b) first executes the job that came in first in the queue
c) first executes the job that needs minimal processor
d) first executes the job that has maximum processor needs
View Answer
Answer: b
Explanation: None.
Get Free Certificate of Merit in Operating System Now!
6. The strategy of making processes that are logically runnable to be temporarily
suspended is called ____________
a) Non preemptive scheduling
b) Preemptive scheduling
c) Shortest job first
d) First come First served
View Answer
Answer: b
Explanation: None.
7. What is Scheduling?
a) allowing a job to use the processor
b) making proper use of processor
c) all of the mentioned
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
8. There are 10 different processes running on a workstation. Idle processes are waiting
for an input event in the input queue. Busy processes are scheduled with the Round-
Robin time sharing method. Which out of the following quantum times is the best value
for small response times, if the processes have a short runtime, e.g. less than 10ms?
a) tQ = 15ms
b) tQ = 40ms
c) tQ = 45ms
d) tQ = 50ms
View Answer
Answer: a
Explanation: None.
9. Orders are processed in the sequence they arrive if _______ rule sequences the jobs.
a) earliest due date
b) slack time remaining
c) first come, first served
d) critical ratio
View Answer
Answer: c
Explanation: None.
10. Which of the following algorithms tends to minimize the process flow time?
a) First come First served
b) Shortest Job First
c) Earliest Deadline First
d) Longest Job First
View Answer
Answer: b
Explanation: None.
11. Under multiprogramming, turnaround time for short jobs is usually ________ and
that for long jobs is slightly ___________
a) Lengthened; Shortened
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged
View Answer
Answer: b
Explanation: None.
12. Which of the following statements are true? (GATE 2010)
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
a) I only
b) I and III only
c) II and III only
d) I, II and III
View Answer
Answer: d
Explanation: I) Shortest remaining time first scheduling is a preemptive version of
shortest job scheduling. It may cause starvation as shorter processes may keep coming
and a long CPU burst process never gets CPU.
II) Preemption may cause starvation. If priority based scheduling with preemption is
used, then a low priority process may never get CPU.
III) Round Robin Scheduling improves response time as all processes get CPU after a
specified time.
1. Which is the most optimal scheduling algorithm?
a) FCFS – First come First served
b) SJF – Shortest Job First
c) RR – Round Robin
d) None of the mentioned
View Answer
Answer: b
Explanation: None.
2. The real difficulty with SJF in short term scheduling is ____________
a) it is too good an algorithm
b) knowing the length of the next CPU request
c) it is too complex to understand
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
3. The FCFS algorithm is particularly troublesome for ____________
a) time sharing systems
b) multiprogramming systems
c) multiprocessor systems
d) operating systems
View Answer
Answer: b
Explanation: In a time sharing system, each user needs to get a share of the CPU at
regular intervals.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. Consider the following set of processes, the length of the CPU burst time given in
milliseconds.
Process Burst time
P1 6
P2 8
P3 7
P4 3
Assuming the above process being scheduled with the SJF scheduling algorithm.
a) The waiting time for process P1 is 3ms
b) The waiting time for process P1 is 0ms
c) The waiting time for process P1 is 16ms
d) The waiting time for process P1 is 9ms
View Answer
Answer: a
Explanation: None.
Take Operating System Tests Now!
5. Preemptive Shortest Job First scheduling is sometimes called ____________
a) Fast SJF scheduling
b) EDF scheduling – Earliest Deadline First
c) HRRN scheduling – Highest Response Ratio Next
d) SRTN scheduling – Shortest Remaining Time Next
View Answer
Answer: d
Explanation: None.
6. An SJF algorithm is simply a priority algorithm where the priority is ____________
a) the predicted next CPU burst
b) the inverse of the predicted next CPU burst
c) the current CPU burst
d) anything the user wants
View Answer
Answer: a
Explanation: The larger the CPU burst, the lower the priority.
7. Choose one of the disadvantages of the priority scheduling algorithm?
a) it schedules in a very complex manner
b) its scheduling takes up a lot of time
c) it can lead to some low priority process waiting indefinitely for the CPU
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
8. What is ‘Aging’?
a) keeping track of cache contents
b) keeping track of what pages are currently residing in memory
c) keeping track of how many times a given page is referenced
d) increasing the priority of jobs to ensure termination in a finite time
View Answer
Answer: d
Explanation: None.
9. A solution to the problem of indefinite blockage of low – priority processes is
____________
a) Starvation
b) Wait queue
c) Ready queue
d) Aging
View Answer
Answer: d
Explanation: None.
10. Which of the following statements are true? (GATE 2010)
i) Shortest remaining time first scheduling may cause starvation
ii) Preemptive scheduling may cause starvation
iii) Round robin is better than FCFS in terms of response time
a) i only
b) i and iii only
c) ii and iii only
d) i, ii and iii
View Answer
Answer: d
Explanation: None.
11. Which of the following scheduling algorithms gives minimum average waiting time?
a) FCFS
b) SJF
c) Round – robin
d) Priority
View Answer
Answer: b
Explanation: None.
1. Concurrent access to shared data may result in ____________
a) data consistency
b) data insecurity
c) data inconsistency
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
2. A situation where several processes access and manipulate the same data
concurrently and the outcome of the execution depends on the particular order in which
access takes place is called ____________
a) data consistency
b) race condition
c) aging
d) starvation
View Answer
Answer: b
Explanation: None.
3. 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
View Answer
Answer: b
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. 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
View Answer
Answer: d
Explanation: None.
5. Mutual exclusion implies that ____________
a) if a process is executing in its critical section, then no other process must be
executing in their critical sections
b) if a process is executing in its critical section, then other processes must be executing
in their critical sections
c) if a process is executing in its critical section, then all the resources of the system
must be blocked until it finishes execution
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
Take Operating System Mock Tests - Chapterwise!
Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
6. Bounded waiting implies that there exists a bound on the number of times a process
is allowed to enter its critical section ____________
a) after a process has made a request to enter its critical section and before the request
is granted
b) when another process is in its critical section
c) before a process has made a request to enter its critical section
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
7. A minimum of _____ variable(s) is/are required to be shared between processes to
solve the critical section problem.
a) one
b) two
c) three
d) four
View Answer
Answer: b
Explanation: None.
8. In the bakery algorithm to solve the critical section problem ____________
a) each process is put into a queue and picked up in an ordered manner
b) each process receives a number (may or may not be unique) and the one with the
lowest number is served next
c) each process gets a unique number and the one with the highest number is served
next
d) each process gets a unique number and the one with the lowest number is served
next
View Answer
Answer: b
Explanation: None.
1. An un-interruptible unit is known as ____________
a) single
b) atomic
c) static
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
2. TestAndSet instruction is executed ____________
a) after a particular process
b) periodically
c) atomically
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
3. Semaphore is a/an _______ to solve the critical section problem.
a) hardware for a system
b) special program for a system
c) integer variable
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. What are the two atomic operations permissible on semaphores?
a) wait
b) stop
c) hold
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
5. What are Spinlocks?
a) CPU cycles wasting locks over critical sections of programs
b) Locks that avoid time wastage in context switches
c) Locks that work better on multiprocessor systems
d) All of the mentioned
View Answer
Answer: d
Explanation: None.
Check this: BCA MCQs | Operating System Books
6. What is the main disadvantage of spinlocks?
a) they are not sufficient for many process
b) they require busy waiting
c) they are unreliable sometimes
d) they are too complex for programmers
View Answer
Answer: b
Explanation: None.
7. The wait operation of the semaphore basically works on the basic _______ system
call.
a) stop()
b) block()
c) hold()
d) wait()
View Answer
Answer: b
Explanation: None.
8. The signal operation of the semaphore basically works on the basic _______ system
call.
a) continue()
b) wakeup()
c) getup()
d) start()
View Answer
Answer: b
Explanation: None.
9. If the semaphore value is negative ____________
a) its magnitude is the number of processes waiting on that semaphore
b) it is invalid
c) no operation can be further performed on it until the signal operation is performed on
it
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
10. The code that changes the value of the semaphore is ____________
a) remainder section code
b) non – critical section code
c) critical section code
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
11. The following program consists of 3 concurrent processes and 3 binary semaphores.
The semaphores are initialized as S0 = 1, S1 = 0, S2 = 0.
Process P0
while(true)
{
wait(S0);
print '0';
release(S1);
release(S2);
}
Process P1
wait(S1);
release(S0);
Process P2
wait(S2);
release(S0);
How many times will P0 print ‘0’?
a) At least twice
b) Exactly twice
c) Exactly thrice
d) Exactly once
View Answer
Answer: a
Explanation: None.
12. Each process Pi, i = 0,1,2,3,……,9 is coded as follows.
repeat
P(mutex)
{Critical Section}
V(mutex)
forever
The code for P10 is identical except that it uses V(mutex) instead of P(mutex). What is
the largest number of processes that can be inside the critical section at any moment
(the mutex being initialized to 1)?
a) 1
b) 2
c) 3
d) None of the mentioned
View Answer
Answer: c
Explanation: Any one of the 9 processes can get into critical section after executing
P(mutex) which decrements the mutex value to 0. At this time P10 can enter critical
section by incrementing the value to 1. Now any of the 9 processes can enter the critical
section by again decrementing the mutex value to 0. None of the remaining processes
can get into their critical sections.
13. Two processes, P1 and P2, need to access a critical section of code. Consider the
following synchronization construct used by the processes.
Process P1 :
while(true)
{
w1 = true;
while(w2 == true);
Critical section
w1 = false;
}
Remainder Section
Process P2 :
while(true)
{
w2 = true;
while(w1 == true);
Critical section
w2 = false;
}
Remainder Section
Here, w1 and w2 have shared variables, which are initialized to false. Which one of the
following statements is TRUE about the above construct?
a) It does not ensure mutual exclusion
b) It does not ensure bounded waiting
c) It requires that processes enter the critical section in strict alternation
d) It does not prevent deadlocks but ensures mutual exclusion
View Answer
Answer: d
Explanation: None.
1. What will happen if a non-recursive mutex is locked more than once?
a) Starvation
b) Deadlock
c) Aging
d) Signaling
View Answer
Answer: b
Explanation: If a thread which had already locked a mutex, tries to lock the mutex again,
it will enter into the waiting list of that mutex, which results in a deadlock. It is because
no other thread can unlock the mutex.
2. What is a semaphore?
a) is a binary mutex
b) must be accessed from only one process
c) can be accessed from multiple processes
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
3. What are the two kinds of semaphores?
a) mutex & counting
b) binary & counting
c) counting & decimal
d) decimal & binary
View Answer
Answer: b
Explanation: None.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
4. What is a mutex?
a) is a binary mutex
b) must be accessed from only one process
c) can be accessed from multiple processes
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
5. At a particular time of computation the value of a counting semaphore is 7.Then 20 P
operations and 15 V operations were completed on this semaphore. The resulting value
of the semaphore is? (GATE 1987)
a) 42
b) 2
c) 7
d) 12
View Answer
Answer: b
Explanation: P represents Wait and V represents Signal. P operation will decrease the
value by 1 every time and V operation will increase the value by 1 every time.
Get Free Certificate of Merit in Operating System Now!
6. A binary semaphore is a semaphore with integer values ____________
a) 1
b) -1
c) 0.8
d) 0.5
View Answer
Answer: a
Explanation: None.
7. The following pair of processes share a common variable X.
Process A
int Y;
A1: Y = X*2;
A2: X = Y;
Process B
int Z;
B1: Z = X+1;
B2: X = Z;
X is set to 5 before either process begins execution. As usual, statements within a
process are executed sequentially, but statements in process A may execute in any
order with respect to statements in process B.
How many different values of X are possible after both processes finish executing?
a) two
b) three
c) four
d) eight
View Answer
Answer: c
Explanation: Here are the possible ways in which statements from A and B can be
interleaved.
A1 A2 B1 B2: X = 11
A1 B1 A2 B2: X = 6
A1 B1 B2 A2: X = 10
B1 A1 B2 A2: X = 10
B1 A1 A2 B2: X = 6
B1 B2 A1 A2: X = 12.
8. The program follows to use a shared binary semaphore T.
Process A
int Y;
A1: Y = X*2;
A2: X = Y;
signal(T);
Process B
int Z;
B1: wait(T);
B2: Z = X+1;
X = Z;
T is set to 0 before either process begins execution and, as before, X is set to 5.
Now, how many different values of X are possible after both processes finish executing?
a) one
b) two
c) three
d) four
View Answer
Answer: a
Explanation: The semaphore T ensures that all the statements from A finish execution
before B begins. So now there is only one way in which statements from A and B can be
interleaved:
A1 A2 B1 B2: X = 11.
9. Semaphores are mostly used to implement ____________
a) System calls
b) IPC mechanisms
c) System protection
d) None of the mentioned
View Answer
Answer: b
Explanation: None.
10. Spinlocks are intended to provide __________ only.
a) Mutual Exclusion
b) Bounded Waiting
c) Aging
d) Progress
View Answer
Answer: b
Explanation: None.
1. The bounded buffer problem is also known as ____________
a) Readers – Writers problem
b) Dining – Philosophers problem
c) Producer – Consumer problem
d) None of the mentioned
View Answer
Answer: c
Explanation: None.
2. In the bounded buffer problem, there are the empty and full semaphores that
____________
a) count the number of empty and full buffers
b) count the number of empty and full memory spaces
c) count the number of empty and full queues
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
3. In the bounded buffer problem ____________
a) there is only one buffer
b) there are n buffers ( n being greater than one but finite)
c) there are infinite buffers
d) the buffer size is bounded
View Answer
Answer: b
Explanation: None.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
4. To ensure difficulties do not arise in the readers – writers problem _______ are given
exclusive access to the shared object.
a) readers
b) writers
c) readers and writers
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
5. The dining – philosophers problem will occur in case of ____________
a) 5 philosophers and 5 chopsticks
b) 4 philosophers and 5 chopsticks
c) 3 philosophers and 5 chopsticks
d) 6 philosophers and 5 chopsticks
View Answer
Answer: a
Explanation: None.
Become Top Ranker in Operating System Now!
6. A deadlock free solution to the dining philosophers problem ____________
a) necessarily eliminates the possibility of starvation
b) does not necessarily eliminate the possibility of starvation
c) eliminates any possibility of any kind of problem further
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
7. All processes share a semaphore variable mutex, initialized to 1. Each process must
execute wait(mutex) before entering the critical section and signal(mutex) afterward.
Suppose a process executes in the following manner.
signal(mutex);
.....
critical section
.....
wait(mutex);
In this situation :
a) a deadlock will occur
b) processes will starve to enter critical section
c) several processes maybe executing in their critical section
d) all of the mentioned
View Answer
Answer: c
Explanation: None.
8. All processes share a semaphore variable mutex, initialized to 1. Each process must
execute wait(mutex) before entering the critical section and signal(mutex) afterward.
Suppose a process executes in the following manner.
wait(mutex);
.....
critical section
.....
wait(mutex);
a) a deadlock will occur
b) processes will starve to enter critical section
c) several processes maybe executing in their critical section
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
9. Consider the methods used by processes P1 and P2 for accessing their critical
sections whenever needed, as given below. The initial values of shared boolean
variables S1 and S2 are randomly assigned. (GATE 2010)
Method used by P1 :
while(S1==S2);
Critical section
S1 = S2;
Method used by P2 :
while(S1!=S2);
Critical section
S2 = not(S1);
Which of the following statements describes properties achieved?
a) Mutual exclusion but not progress
b) Progress but not mutual exclusion
c) Neither mutual exclusion nor progress
d) Both mutual exclusion and progress
View Answer
Answer: d
Explanation: None.
1. A monitor is a type of ____________
a) semaphore
b) low level synchronization construct
c) high level synchronization construct
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
2. 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
View Answer
Answer: a
Explanation: None.
3. 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
View Answer
Answer: d
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. 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
View Answer
Answer: a
Explanation: None.
5. What are the operations that can be invoked on a condition variable?
a) wait & signal
b) hold & wait
c) signal & hold
d) continue & signal
View Answer
Answer: a
Explanation: None.
Take Operating System Practice Tests - Chapterwise!
Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
6. 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
View Answer
Answer: a
Explanation: None.
7. 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
View Answer
Answer: c
Explanation: None.
1. A collection of instructions that performs a single logical function is called
____________
a) transaction
b) operation
c) function
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
2. A terminated transaction that has completed its execution successfully is
____________ otherwise it is __________
a) committed, destroyed
b) aborted, destroyed
c) committed, aborted
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
3. The state of the data accessed by an aborted transaction must be restored to what it
was just before the transaction started executing. This restoration is known as ________
of transaction.
a) safety
b) protection
c) roll – back
d) revert – back
View Answer
Answer: c
Explanation: None.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
4. Write ahead logging is a way ____________
a) to ensure atomicity
b) to keep data consistent
c) that records data on stable storage
d) all of the mentioned
View Answer
Answer: d
Explanation: None.
5. In the write ahead logging a _____________ is maintained.
a) a memory
b) a system
c) a disk
d) a log record
View Answer
Answer: d
Explanation: None.
Get Free Certificate of Merit in Operating System Now!
6. An actual update is not allowed to a data item ____________
a) before the corresponding log record is written out to stable storage
b) after the corresponding log record is written out to stable storage
c) until the whole log record has been checked for inconsistencies
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
7. The undo and redo operations must be _________ to guarantee correct behaviour,
even if a failure occurs during recovery process.
a) idempotent
b) easy
c) protected
d) all of the mentioned
View Answer
Answer: a
Explanation: Idempotent – Multiple executions of an operation have the same result as
does one execution.
8. The system periodically performs checkpoints that consists of the following
operation(s) ____________
a) Putting all the log records currently in main memory onto stable storage
b) putting all modified data residing in main memory onto stable storage
c) putting a log record onto stable storage
d) all of the mentioned
View Answer
Answer: d
Explanation: None.
9. Consider a transaction T1 that committed prior to checkpoint. The <T1 commits>
record appears in the log before the <checkpoint> record. Any modifications made by T1
must have been written to the stable storage either with the checkpoint or prior to it.
Thus at recovery time ____________
a) There is a need to perform an undo operation on T1
b) There is a need to perform a redo operation on T1
c) There is no need to perform an undo and redo operation on T1
d) All of the mentioned
View Answer
Answer: c
Explanation: None.
10. Serializable schedules are ones where ____________
a) concurrent execution of transactions is equivalent to the transactions executed
serially
b) the transactions can be carried out one after the other
c) a valid result occurs after execution transactions
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
11. A locking protocol is one that ____________
a) governs how locks are acquired
b) governs how locks are released
c) governs how locks are acquired and released
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
12. The two phase locking protocol consists of ____________
a) growing & shrinking phase
b) shrinking & creation phase
c) creation & growing phase
d) destruction & creation phase
View Answer
Answer: a
Explanation: None.
13. The growing phase is a phase in which?
a) A transaction may obtain locks, but does not release any
b) A transaction may obtain locks, and releases a few or all of them
c) A transaction may release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks
View Answer
Answer: a
Explanation: None.
14. The shrinking phase is a phase in which?
a) A transaction may obtain locks, but does not release any
b) A transaction may obtain locks, and releases a few or all of them
c) A transaction may release locks, but does not obtain any new locks
d) A transaction may release locks, and does obtain new locks
View Answer
Answer: c
Explanation: None.
15. Which of the following concurrency control protocols ensure both conflict
serializability and freedom from deadlock?
I) 2-phase locking
II) Timestamp ordering
a) I only
b) II only
c) Both I and II
d) Neither I nor II
View Answer
Answer: b
Explanation: None.
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
View Answer
Answer: a
Explanation: None.
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
View Answer
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) all of the mentioned
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
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
View Answer
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
View Answer
Answer: a
Explanation: None.
Take Operating System Mock Tests - Chapterwise!
Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
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
View Answer
Answer: d
Explanation: None.
7. For an effective operating system, when to check for deadlock?
a) every time a resource request is made
b) at fixed time intervals
c) every time a resource request is made at fixed time intervals
d) none of the mentioned
View Answer
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
View Answer
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
View Answer
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
View Answer
Answer: a
Explanation: None.
1. The number of resources requested by a process ____________
a) must always be less than the total number of resources available in the system
b) must always be equal to the total number of resources available in the system
c) must not exceed the total number of resources available in the system
d) must exceed the total number of resources available in the system
View Answer
Answer: c
Explanation: None.
2. The request and release of resources are ___________
a) command line statements
b) interrupts
c) system calls
d) special programs
View Answer
Answer: c
Explanation: None.
3. What are Multithreaded programs?
a) lesser prone to deadlocks
b) more prone to deadlocks
c) not at all prone to deadlocks
d) none of the mentioned
View Answer
Answer: b
Explanation: Multiple threads can compete for shared resources.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. 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
View Answer
Answer: d
Explanation: None.
5. 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
View Answer
Answer: a
Explanation: If another process requests that resource (non – shareable resource), the
requesting process must be delayed until the resource has been released.
Take Operating System Tests Now!
6. For a Hold and wait condition to prevail ____________
a) A process must be not be holding a resource, but waiting for one to be freed, and
then request to acquire it
b) A process must be holding at least one resource and waiting to acquire additional
resources that are being held by other processes
c) A process must hold at least one resource and not be waiting to acquire additional
resources
d) None of the mentioned
View Answer
Answer: b
Explanation: None.
7. Deadlock prevention is a set of methods ____________
a) to ensure that at least one of the necessary conditions cannot hold
b) to ensure that all of the necessary conditions do not hold
c) to decide if the requested resources for a process have to be given or not
d) to recover from a deadlock
View Answer
Answer: a
Explanation: None.
8. For non sharable resources like a printer, mutual exclusion ____________
a) must exist
b) must not exist
c) may exist
d) none of the mentioned
View Answer
Answer: a
Explanation: A printer cannot be simultaneously shared by several processes.
9. For sharable resources, mutual exclusion ____________
a) is required
b) is not required
c) may be or may not be required
d) none of the mentioned
View Answer
Answer: b
Explanation: They do not require mutually exclusive access, and hence cannot be
involved in a deadlock.
10. To ensure that the hold and wait condition never occurs in the system, it must be
ensured that ____________
a) whenever a resource is requested by a process, it is not holding any other resources
b) each process must request and be allocated all its resources before it begins its
execution
c) a process can request resources only when it has none
d) all of the mentioned
View Answer
Answer: d
Explanation: c – A process may request some resources and use them. Before it can
can request any additional resources, however it must release all the resources that it is
currently allocated.
11. The disadvantage of a process being allocated all its resources before beginning its
execution is ____________
a) Low CPU utilization
b) Low resource utilization
c) Very high resource utilization
d) None of the mentioned
View Answer
Answer: b
Explanation: None.
12. To ensure no preemption, if a process is holding some resources and requests
another resource that cannot be immediately allocated to it ____________
a) then the process waits for the resources be allocated to it
b) the process keeps sending requests until the resource is allocated to it
c) the process resumes execution without the resource being allocated to it
d) then all resources currently being held are preempted
View Answer
Answer: d
Explanation: None.
13. One way to ensure that the circular wait condition never holds is to ____________
a) impose a total ordering of all resource types and to determine whether one precedes
another in the ordering
b) to never let a process acquire resources that are held by other processes
c) to let a process wait for only one resource at a time
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
1. Each request requires that the system consider the _____________ to decide
whether the current request can be satisfied or must wait to avoid a future possible
deadlock.
a) resources currently available
b) processes that have previously been in the system
c) resources currently allocated to each process
d) future requests and releases of each process
View Answer
Answer: a
Explanation: None.
2. Given a priori information about the ________ number of resources of each type that
maybe requested for each process, it is possible to construct an algorithm that ensures
that the system will never enter a deadlock state.
a) minimum
b) average
c) maximum
d) approximate
View Answer
Answer: c
Explanation: None.
3. 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
View Answer
Answer: a
Explanation: Resource allocation states are used to maintain the availability of the
already and current available resources.
Subscribe Now: Operating System Newsletter | Important Subjects Newsletters
advertisement
4. 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
View Answer
Answer: b
Explanation: None.
5. 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
View Answer
Answer: c
Explanation: None.
Participate in Operating System Certification Contest of the Month Now!
6. All unsafe states are ____________
a) deadlocks
b) not deadlocks
c) fatal
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
7. A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0
requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives.
Process
P0
P1
P2
Maximum needs (process-wise: P0 through P2 top to bottom)
10
4
9
Currently allocated (process-wise)
5
2
2
Which of the following sequence is a safe sequence?
a) P0, P1, P2
b) P1, P2, P0
c) P2, P0, P1
d) P1, P0, P2
View Answer
Answer: d
Explanation: None.
8. 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
View Answer
Answer: b
Explanation: None.
9. The resource allocation graph is not applicable to a resource allocation system
____________
a) with multiple instances of each resource type
b) with a single instance of each resource type
c) single & multiple instances of each resource type
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
10. The Banker’s algorithm is _____________ than the resource allocation graph
algorithm.
a) less efficient
b) more efficient
c) equal
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
11. The data structures available in the Banker’s algorithm are ____________
a) Available
b) Need
c) Allocation
d) All of the mentioned
View Answer
Answer: d
Explanation: None.
12. The content of the matrix Need is ____________
a) Allocation – Available
b) Max – Available
c) Max – Allocation
d) Allocation – Max
View Answer
Answer: c
Explanation: None.
13. A system with 5 processes P0 through P4 and three resource types A, B, C have A
with 10 instances, B with 5 instances, and C with 7 instances. At time t0, the following
snapshot has been taken:
Process
P0
P1
P2
P3
P4
Allocation (process-wise : P0 through P4 top TO bottom)
A B C
0 1 0
2 0 0
3 0 2
2 1 1
0 0 2
MAX (process-wise: P0 through P4 top TO bottom)
A B C
7 5 3
3 2 2
9 0 2
2 2 2
4 3 3
Available
A B C
3 3 2
The sequence <P1, P3, P4, P2, P0> leads the system to ____________
a) an unsafe state
b) a safe state
c) a protected state
d) a deadlock
View Answer
Answer: b
Explanation: None.
1. The wait-for graph is a deadlock detection algorithm that is applicable when
____________
a) all resources have a single instance
b) all resources have multiple instances
c) all resources have a single 7 multiple instances
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
2. An edge from process Pi to Pj in a wait for graph indicates that ____________
a) Pi is waiting for Pj to release a resource that Pi needs
b) Pj is waiting for Pi to release a resource that Pj needs
c) Pi is waiting for Pj to leave the system
d) Pj is waiting for Pi to leave the system
View Answer
Answer: a
Explanation: None.
3. If the wait for graph contains a cycle ____________
a) then a deadlock does not exist
b) then a deadlock exists
c) then the system is in a safe state
d) either deadlock exists or system is in a safe state
View Answer
Answer: b
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. If deadlocks occur frequently, the detection algorithm must be invoked ________
a) rarely
b) frequently
c) rarely & frequently
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
5. What is the disadvantage of invoking the detection algorithm for every request?
a) overhead of the detection algorithm due to consumption of memory
b) excessive time consumed in the request to be allocated memory
c) considerable overhead in computation time
d) all of the mentioned
View Answer
Answer: c
Explanation: None.
Take Operating System Practice Tests - Chapterwise!
Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
6. A deadlock eventually cripples system throughput and will cause the CPU utilization to
______
a) increase
b) drop
c) stay still
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
7. Every time a request for allocation cannot be granted immediately, the detection
algorithm is invoked. This will help identify ____________
a) the set of processes that have been deadlocked
b) the set of processes in the deadlock queue
c) the specific process that caused the deadlock
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
8. A computer system has 6 tape drives, with ‘n’ processes competing for them. Each
process may need 3 tape drives. The maximum value of ‘n’ for which the system is
guaranteed to be deadlock free is?
a) 2
b) 3
c) 4
d) 1
View Answer
Answer: a
Explanation: None.
9. A system has 3 processes sharing 4 resources. If each process needs a maximum of
2 units then, deadlock ____________
a) can never occur
b) may occur
c) has to occur
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
10. ‘m’ processes share ‘n’ resources of the same type. The maximum need of each
process doesn’t exceed ‘n’ and the sum of all their maximum needs is always less than
m+n. In this setup, deadlock ____________
a) can never occur
b) may occur
c) has to occur
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
1. A deadlock can be broken by ____________
a) abort one or more processes to break the circular wait
b) abort all the process in the system
c) preempt all resources from all processes
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
2. The two ways of aborting processes and eliminating deadlocks are ____________
a) Abort all deadlocked processes
b) Abort all processes
c) Abort one process at a time until the deadlock cycle is eliminated
d) All of the mentioned
View Answer
Answer: c
Explanation: None.
3. Those processes should be aborted on occurrence of a deadlock, the termination of
which?
a) is more time consuming
b) incurs minimum cost
c) safety is not hampered
d) all of the mentioned
View Answer
Answer: b
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. 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
View Answer
Answer: d
Explanation: None.
5. Cost factors for process termination include ____________
a) Number of resources the deadlock process is not holding
b) CPU utilization at the time of deadlock
c) Amount of time a deadlocked process has thus far consumed during its execution
d) All of the mentioned
View Answer
Answer: c
Explanation: None.
Check this: Computer Science MCQs | Computer Science Books
6. 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
View Answer
Answer: b
Explanation: None.
7. To _______ to a safe state, the system needs to keep more information about the
states of processes.
a) abort the process
b) roll back the process
c) queue the process
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
8. If the resources are always preempted from the same process __________ can
occur.
a) deadlock
b) system crash
c) aging
d) starvation
View Answer
Answer: d
Explanation: None.
9. What is the solution to starvation?
a) the number of rollbacks must be included in the cost factor
b) the number of resources must be included in resource preemption
c) resource preemption be done instead
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
1. If one or more devices use a common set of wires to communicate with the computer
system, the connection is called ______
a) CPU
b) Monitor
c) Wirefull
d) Bus
View Answer
Answer: d
Explanation: None.
2. A ____ a set of wires and a rigidly defined protocol that specifies a set of messages
that can be sent on the wires.
a) port
b) node
c) bus
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
3. When device A has a cable that plugs into device B, and device B has a cable that
plugs into device C and device C plugs into a port on the computer, this arrangement is
called a _________
a) port
b) daisy chain
c) bus
d) cable
View Answer
Answer: b
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. The _________ present a uniform device-access interface to the I/O subsystem,
much as system calls provide a standard interface between the application and the
operating system.
a) Devices
b) Buses
c) Device drivers
d) I/O systems
View Answer
Answer: c
Explanation: None.
5. A ________ is a collection of electronics that can operate a port, a bus, or a device.
a) controller
b) driver
c) host
d) bus
View Answer
Answer: a
Explanation: None.
Take Operating System Practice Tests - Chapterwise!
Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
6. An I/O port typically consists of four registers status, control, ________ and ________
registers.
a) system in, system out
b) data in, data out
c) flow in, flow out
d) input, output
View Answer
Answer: b
Explanation: None.
7. The ______ register is read by the host to get input.
a) flow in
b) flow out
c) data in
d) data out
View Answer
Answer: c
Explanation: None.
8. The ______ register is written by the host to send output.
a) status
b) control
c) data in
d) data out
View Answer
Answer: d
Explanation: None.
9. The hardware mechanism that allows a device to notify the CPU is called _______
a) polling
b) interrupt
c) driver
d) controlling
View Answer
Answer: b
Explanation: None.
10. The CPU hardware has a wire called __________ that the CPU senses after
executing every instruction.
a) interrupt request line
b) interrupt bus
c) interrupt receive line
d) interrupt sense line
View Answer
Answer: a
Explanation: None.
11. The _________ determines the cause of the interrupt, performs the necessary
processing and executes a return from the interrupt instruction to return the CPU to the
execution state prior to the interrupt.
a) interrupt request line
b) device driver
c) interrupt handler
d) all of the mentioned
View Answer
Answer: c
Explanation: None.
12. In general the two interrupt request lines are ____________
a) maskable & non maskable interrupts
b) blocked & non maskable interrupts
c) maskable & blocked interrupts
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
13. The _________ are reserved for events such as unrecoverable memory errors.
a) non maskable interrupts
b) blocked interrupts
c) maskable interrupts
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
1. The ________ can be turned off by the CPU before the execution of critical instruction
sequences that must not be interrupted.
a) nonmaskable interrupt
b) blocked interrupt
c) maskable interrupt
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
2. The __________ is used by device controllers to request service.
a) nonmaskable interrupt
b) blocked interrupt
c) maskable interrupt
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
3. The interrupt vector contains ____________
a) the interrupts
b) the memory addresses of specialized interrupt handlers
c) the identifiers of interrupts
d) the device addresses
View Answer
Answer: b
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. Division by zero, accessing a protected or non existent memory address, or
attempting to execute a privileged instruction from user mode are all categorized as
________
a) errors
b) exceptions
c) interrupt handlers
d) all of the mentioned
View Answer
Answer: b
Explanation: None.
5. For large data transfers, _________ is used.
a) dma
b) programmed I/O
c) controller register
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
Check this: BCA MCQs | Operating System Books
6. A character stream device transfers ____________
a) bytes one by one
b) block of bytes as a unit
c) with unpredictable response times
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
7. A block device transfers ____________
a) bytes one by one
b) block of bytes as a unit
c) with unpredictable response times
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
8. What is a dedicated device?
a) opposite to a sharable device
b) same as a sharable device
c) can be used concurrently by several processes
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
9. A keyboard is an example of a device that is accessed through a __________
interface.
a) block stream
b) set of blocks
c) character stream
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
10. In polling ____________
a) busy – wait cycles wait for I/O from device
b) interrupt handler receives interrupts
c) interrupt-request line is triggered by I/O device
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
11. A non blocking system call _________________
a) halts the execution of the application for an extended time
b) does not halt the execution of the application
c) does not block the interrupts
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
12. An asynchronous call ____________
a) returns immediately, without waiting for the I/O to complete
b) does not return immediately and waits for the I/O to complete
c) consumes a lot of time
d) is too slow
View Answer
Answer: a
Explanation: None.
1. Buffering is done to ____________
a) cope with device speed mismatch
b) cope with device transfer size mismatch
c) maintain copy semantics
d) all of the mentioned
View Answer
Answer: d
Explanation: None.
2. Caching is ________ spooling.
a) same as
b) not the same as
c) all of the mentioned
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
3. Caching ____________
a) holds a copy of the data
b) is fast memory
c) holds the only copy of the data
d) holds output for a device
View Answer
Answer: a
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. Spooling ____________
a) holds a copy of the data
b) is fast memory
c) holds the only copy of the data
d) holds output for a device
View Answer
Answer: c
Explanation: None.
5. The ________ keeps state information about the use of I/O components.
a) CPU
b) OS
c) kernel
d) shell
View Answer
Answer: c
Explanation: None.
Check this: Computer Science MCQs | Operating System Books
6. The kernel data structures include ____________
a) process table
b) open file table
c) close file table
d) all of the mentioned
View Answer
Answer: b
Explanation: None.
7. Windows NT uses a __________ implementation for I/O.
a) message – passing
b) draft – passing
c) secondary memory
d) cache
View Answer
Answer: a
Explanation: None.
8. A ________ is a full duplex connection between a device driver and a user level
process.
a) Bus
b) I/O operation
c) Stream
d) Flow
View Answer
Answer: c
Explanation: None.
9. I/O is a _________ in system performance.
a) major factor
b) minor factor
c) does not matter
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
10. If the number of cycles spent busy – waiting is not excessive, then ____________
a) interrupt driven I/O is more efficient than programmed I/O
b) programmed I/O is more efficient than interrupt driven I/O
c) both programmed and interrupt driven I/O are equally efficient
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
1. In real time operating system ____________
a) all processes have the same priority
b) a task must be serviced by its deadline period
c) process scheduling can be done only once
d) kernel is not required
View Answer
Answer: b
Explanation: None.
2. Hard real time operating system has ______________ jitter than a soft real time
operating system.
a) less
b) more
c) equal
d) none of the mentioned
View Answer
Answer: a
Explanation: Jitter is the undesired deviation from the true periodicity.
3. For real time operating systems, interrupt latency should be ____________
a) minimal
b) maximum
c) zero
d) dependent on the scheduling
View Answer
Answer: a
Explanation: Interrupt latency is the time duration between the generation of interrupt
and execution of its service.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. In rate monotonic scheduling ____________
a) shorter duration job has higher priority
b) longer duration job has higher priority
c) priority does not depend on the duration of the job
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
5. In which scheduling certain amount of CPU time is allocated to each process?
a) earliest deadline first scheduling
b) proportional share scheduling
c) equal share scheduling
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
Check this: Computer Science MCQs | BCA MCQs
6. The problem of priority inversion can be solved by ____________
a) priority inheritance protocol
b) priority inversion protocol
c) both priority inheritance and inversion protocol
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
7. Time duration required for scheduling dispatcher to stop one process and start
another is known as ____________
a) process latency
b) dispatch latency
c) execution latency
d) interrupt latency
View Answer
Answer: b
Explanation: None.
8. Time required to synchronous switch from the context of one thread to the context of
another thread is called?
a) threads fly-back time
b) jitter
c) context switch time
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
9. Which one of the following is a real time operating system?
a) RTLinux
b) VxWorks
c) Windows CE
d) All of the mentioned
View Answer
Answer: d
Explanation: None.
10. VxWorks is centered around ____________
a) wind microkernel
b) linux kernel
c) unix kernel
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
1. What is the disadvantage of real addressing mode?
a) there is a lot of cost involved
b) time consumption overhead
c) absence of memory protection between processes
d) restricted access to memory locations by processes
View Answer
Answer: c
Explanation: None.
2. Preemptive, priority based scheduling guarantees ____________
a) hard real time functionality
b) soft real time functionality
c) protection of memory
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
3. Real time systems must have ____________
a) preemptive kernels
b) non preemptive kernels
c) preemptive kernels or non preemptive kernels
d) neither preemptive nor non preemptive kernels
View Answer
Answer: a
Explanation: None.
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
4. What is Event latency?
a) the amount of time an event takes to occur from when the system started
b) the amount of time from the event occurrence till the system stops
c) the amount of time from event occurrence till the event crashes
d) the amount of time that elapses from when an event occurs to when it is serviced.
View Answer
Answer: d
Explanation: None.
5. Interrupt latency refers to the period of time ____________
a) from the occurrence of an event to the arrival of an interrupt
b) from the occurrence of an event to the servicing of an interrupt
c) from arrival of an interrupt to the start of the interrupt service routine
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
Take Operating System Tests Now!
6. Real time systems need to __________ the interrupt latency.
a) minimize
b) maximize
c) not bother about
d) none of the mentioned
View Answer
Answer: a
Explanation: None.
7. The amount of time required for the scheduling dispatcher to stop one process and
start another is known as ______________
a) event latency
b) interrupt latency
c) dispatch latency
d) context switch
View Answer
Answer: c
Explanation: None.
8. The most effective technique to keep dispatch latency low is to ____________
a) provide non preemptive kernels
b) provide preemptive kernels
c) make it user programmed
d) run less number of processes at a time
View Answer
Answer: b
Explanation: None.
9. Priority inversion is solved by use of _____________
a) priority inheritance protocol
b) two phase lock protocol
c) time protocol
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
1. In a real time system the computer results ____________
a) must be produced within a specific deadline period
b) may be produced at any time
c) may be correct
d) all of the mentioned
View Answer
Answer: a
Explanation: None.
2. In a safety critical system, incorrect operation ____________
a) does not affect much
b) causes minor problems
c) causes major and serious problems
d) none of the mentioned
View Answer
Answer: c
Explanation: None.
3. Antilock brake systems, flight management systems, pacemakers are examples of
____________
a) safety critical system
b) hard real time system
c) soft real time system
d) safety critical system and hard real time system
View Answer
Answer: d
Explanation: None.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate
Now!
advertisement
4. In a ______ real time system, it is guaranteed that critical real time tasks will be
completed within their deadlines.
a) soft
b) hard
c) critical
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
5. Some of the properties of real time systems include ____________
a) single purpose
b) inexpensively mass produced
c) small size
d) all of the mentioned
View Answer
Answer: d
Explanation: None.
Check this: Computer Science Books | Computer Science MCQs
6. The amount of memory in a real time system is generally ____________
a) less compared to PCs
b) high compared to PCs
c) same as in PCs
d) they do not have any memory
View Answer
Answer: a
Explanation: None.
7. What is the priority of a real time task?
a) must degrade over time
b) must not degrade over time
c) may degrade over time
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
8. Memory management units ____________
a) increase the cost of the system
b) increase the power consumption of the system
c) increase the time required to complete an operation
d) all of the mentioned
View Answer
Answer: d
Explanation: None.
9. The technique in which the CPU generates physical addresses directly is known as
____________
a) relocation register method
b) real addressing
c) virtual addressing
d) none of the mentioned
View Answer
Answer: b
Explanation: None.
1. Earliest deadline first algorithm assigns priorities according to ____________
a) periods
b) deadlines
c) burst times
d) none of the mentioned
View Answer
advertisement
2. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of
80 and a CPU burst of 35. The total CPU utilization is ____________
a) 0.90
b) 0.74
c) 0.94
d) 0.80
View Answer
3. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of
80 and a CPU burst of 35., the priorities of P1 and P2 are?
a) remain the same throughout
b) keep varying from time to time
c) may or may not be change
d) none of the mentioned
View Answer
Note: Join free Sanfoundry classes at Telegram or Youtube
advertisement
advertisement
4. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of
80 and a CPU burst of 35., can the two processes be scheduled using the EDF
algorithm without missing their respective deadlines?
a) Yes
b) No
c) Maybe
d) None of the mentioned
View Answer
5. Using EDF algorithm practically, it is impossible to achieve 100 percent
utilization due to __________
a) the cost of context switching
b) interrupt handling
c) power consumption
d) all of the mentioned
View Answer
Take Operating System Practice Tests - Chapterwise!
Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
advertisement
6. T shares of time are allocated among all processes out of N shares in
__________ scheduling algorithm.
a) rate monotonic
b) proportional share
c) earliest deadline first
d) none of the mentioned
View Answer
7. If there are a total of T = 100 shares to be divided among three processes, A, B
and C. A is assigned 50 shares, B is assigned 15 shares and C is assigned 20
shares.
A will have ______ percent of the total processor time.
a) 20
b) 15
c) 50
d) none of the mentioned
View Answer
advertisement
8. If there are a total of T = 100 shares to be divided among three processes, A, B
and C. A is assigned 50 shares, B is assigned 15 shares and C is assigned 20
shares.
B will have ______ percent of the total processor time.
a) 20
b) 15
c) 50
d) none of the mentioned
View Answer
9. If there are a total of T = 100 shares to be divided among three processes, A, B
and C. A is assigned 50 shares, B is assigned 15 shares and C is assigned 20
shares.
C will have ______ percent of the total processor time.
a) 20
b) 15
c) 50
d) none of the mentioned
View Answer
advertisement
10. If there are a total of T = 100 shares to be divided among three processes, A, B
and C. A is assigned 50 shares, B is assigned 15 shares and C is assigned 20
shares.
If a new process D requested 30 shares, the admission controller would
__________
a) allocate 30 shares to it
b) deny entry to D in the system
c) all of the mentioned
d) none of the mentioned
View Answer
1. To schedule the processes, they are considered _________
a) infinitely long
b) periodic
c) heavy weight
d) light weight
View Answer
advertisement
2. If the period of a process is ‘p’, then what is the rate of the task?
a) p2
b) 2*p
c) 1/p
d) p
View Answer
3. The scheduler admits a process using __________
a) two phase locking protocol
b) admission control algorithm
c) busy wait polling
d) none of the mentioned
View Answer
Subscribe Now: Operating System Newsletter | Important Subjects
Newsletters
advertisement
advertisement
4. The ____________ scheduling algorithm schedules periodic tasks using a static
priority policy with preemption.
a) earliest deadline first
b) rate monotonic
c) first cum first served
d) priority
View Answer
5. Rate monotonic scheduling assumes that the __________
a) processing time of a periodic process is same for each CPU burst
b) processing time of a periodic process is different for each CPU burst
c) periods of all processes is the same
d) none of the mentioned
View Answer
Become Top Ranker in Operating System Now!
advertisement
6. In rate monotonic scheduling, a process with a shorter period is assigned
__________
a) a higher priority
b) a lower priority
c) higher & lower priority
d) none of the mentioned
View Answer
7. There are two processes P1 and P2, whose periods are 50 and 100 respectively.
P1 is assigned higher priority than P2. The processing times are t1 = 20 for P1 and
t2 = 35 for P2. Is it possible to schedule these tasks so that each meets its deadline
using Rate monotonic scheduling?
a) yes
b) no
c) maybe
d) none of the mentioned
View Answer
advertisement
8. If a set of processes cannot be scheduled by rate monotonic scheduling
algorithm, then __________
a) they can be scheduled by EDF algorithm
b) they cannot be scheduled by EDF algorithm
c) they cannot be scheduled by any other algorithm
d) none of the mentioned
View Answer
9. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of
80 and a CPU burst of 35. The total CPU utilization is?
a) 0.90
b) 0.74
c) 0.94
d) 0.80
View Answer
advertisement
10. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of
80 and a CPU burst of 35. Can the processes be scheduled without missing the
deadlines?
a) Yes
b) No
c) Maybe
d) None of the mentioned
View Answer
RTOS.docx

More Related Content

PDF
Operating System MCQ (OS Most Important Question)
DOC
Assignment unix & shell programming
PDF
A+ Guide to IT Technical Support Hardware and Software 9th Edition Andrews Te...
PDF
ITI Training Officer COPA Previous Year Paper MCQ
PDF
COPA IT and ITES MCQ Questions and Answers
PDF
Operating Systems MCQ Bank from mcqSets.com
PDF
Computer knowledge-old-papers
DOCX
Anhnh osg202-1
Operating System MCQ (OS Most Important Question)
Assignment unix & shell programming
A+ Guide to IT Technical Support Hardware and Software 9th Edition Andrews Te...
ITI Training Officer COPA Previous Year Paper MCQ
COPA IT and ITES MCQ Questions and Answers
Operating Systems MCQ Bank from mcqSets.com
Computer knowledge-old-papers
Anhnh osg202-1

Similar to RTOS.docx (20)

PDF
1 allahabad bank-clerk-exam-computer-general-konwledge-solved-paper-2008
PDF
1 allahabad bank-clerk-exam-computer-general-konwledge-solved-paper-2008
PDF
Bharat Skills COPA Question Bank Important MCQ
PDF
INTRODUCTION TO COMPUTING.pdf
PDF
Computer Software MCQ (Application Related Question)
PDF
Operating System Multiple Choice Questions
PDF
Technology In Action Complete 14th Edition Evans Test Bank
PDF
Bharat Skills COPA Question Bank with Answers
PDF
Technology In Action Complete 14th Edition Evans Test Bank
PDF
final_2014.pdf
DOCX
Qbjective question linux
PDF
computer-yes.pdfndjdksksksjhshdjdkslslsllslsks
PDF
COPA Practice Set (Previous Year Question Paper)
PDF
DIGITAL FLUENCY MULTIPLE QUESTION ANSWERS
PDF
Test Bank, Solutions for Java How to Program, An Objects-Natural Approach, 12...
PDF
Computer Basic Questions and answers MCQ
DOCX
computer basics from bismark
PDF
Question Bank for Operating System Concepts (9th Edition, International Stude...
DOCX
test.docx
PDF
Test Bank for Operating Systems: Internals and Design Principles, 7th Edition...
1 allahabad bank-clerk-exam-computer-general-konwledge-solved-paper-2008
1 allahabad bank-clerk-exam-computer-general-konwledge-solved-paper-2008
Bharat Skills COPA Question Bank Important MCQ
INTRODUCTION TO COMPUTING.pdf
Computer Software MCQ (Application Related Question)
Operating System Multiple Choice Questions
Technology In Action Complete 14th Edition Evans Test Bank
Bharat Skills COPA Question Bank with Answers
Technology In Action Complete 14th Edition Evans Test Bank
final_2014.pdf
Qbjective question linux
computer-yes.pdfndjdksksksjhshdjdkslslsllslsks
COPA Practice Set (Previous Year Question Paper)
DIGITAL FLUENCY MULTIPLE QUESTION ANSWERS
Test Bank, Solutions for Java How to Program, An Objects-Natural Approach, 12...
Computer Basic Questions and answers MCQ
computer basics from bismark
Question Bank for Operating System Concepts (9th Edition, International Stude...
test.docx
Test Bank for Operating Systems: Internals and Design Principles, 7th Edition...
Ad

Recently uploaded (20)

PPTX
Review1_Bollywood_Project analysis of bolywood trends from 1950s to 2025
PPTX
Cloud Computing ppt.ppt1QU4FFIWEKWEIFRRGx
PPTX
CPAR-ELEMENTS AND PRINCIPLE OF ARTS.pptx
PPTX
current by laws xxxxxxxxxxxxxxxxxxxxxxxxxxx
PPTX
QA PROCESS FLOW CHART (1).pptxaaaaaaaaaaaa
PPTX
Neoclassical and Mystery Plays Entertain
PDF
Love & Romance in Every Sparkle_ Discover the Magic of Diamond Painting.pdf
PPTX
Green and Orange Illustration Understanding Climate Change Presentation.pptx
PPTX
philippine contemporary artscot ppt.pptx
PPTX
Presentation on tradtional textiles of kutch
PDF
Dating-Courtship-Marriage-and-Responsible-Parenthood.pdf
PPTX
Lung Cancer - Bimbingan.pptxmnbmbnmnmn mn mn
PPSX
opcua_121710.ppsxthsrtuhrbxdtnhtdtndtyty
PPTX
unit5-servicesrelatedtogeneticsinnursing-241221084421-d77c4adb.pptx
PPTX
65bc3704-6ed1-4724-977d-a70f145d40da.pptx
PDF
630895715-Romanesque-Architecture-ppt.pdf
PDF
Arts and Crats of Cagayan and Central Luzon.pdf
PDF
waiting, Queuing, best time an event cab be done at a time .pdf
PDF
witch fraud storyboard sequence-_1x1.pdf
PDF
Triangle of photography : aperture, exposure and ISO
Review1_Bollywood_Project analysis of bolywood trends from 1950s to 2025
Cloud Computing ppt.ppt1QU4FFIWEKWEIFRRGx
CPAR-ELEMENTS AND PRINCIPLE OF ARTS.pptx
current by laws xxxxxxxxxxxxxxxxxxxxxxxxxxx
QA PROCESS FLOW CHART (1).pptxaaaaaaaaaaaa
Neoclassical and Mystery Plays Entertain
Love & Romance in Every Sparkle_ Discover the Magic of Diamond Painting.pdf
Green and Orange Illustration Understanding Climate Change Presentation.pptx
philippine contemporary artscot ppt.pptx
Presentation on tradtional textiles of kutch
Dating-Courtship-Marriage-and-Responsible-Parenthood.pdf
Lung Cancer - Bimbingan.pptxmnbmbnmnmn mn mn
opcua_121710.ppsxthsrtuhrbxdtnhtdtndtyty
unit5-servicesrelatedtogeneticsinnursing-241221084421-d77c4adb.pptx
65bc3704-6ed1-4724-977d-a70f145d40da.pptx
630895715-Romanesque-Architecture-ppt.pdf
Arts and Crats of Cagayan and Central Luzon.pdf
waiting, Queuing, best time an event cab be done at a time .pdf
witch fraud storyboard sequence-_1x1.pdf
Triangle of photography : aperture, exposure and ISO
Ad

RTOS.docx

  • 1. 1) Which of the following is not an operating system? a. Windows b. Linux c. Oracle d. DOS Hide Answer Workspace Answer: (c) Oracle Explanation: Oracle is an RDBMS (Relational Database Management System). It is known as Oracle Database, Oracle DB, or Oracle Only. The first database for enterprise grid computing is the Oracle database. 2) What is the maximum length of the filename in DOS? a. 4 b. 5 c. 8 d. 12 Hide Answer Workspace Answer: (c) 8 Explanation: The maximum length of the filename is 8 characters in the DOS operating system. It is commonly known as an 8.3 filename. 3) When was the first operating system developed? a. 1948 b. 1949 c. 1950 d. 1951 Hide Answer Workspace
  • 2. Answer: (c) 1950 Explanation: The first operating system was developed in the early 1950's. It was also called a single-stream batch processing system because it presented data in groups. 4) When were MS windows operating systems proposed? 10 Sec OOPs Concepts in Java a. 1994 b. 1990 c. 1992 d. 1985 Hide Answer Workspace Answer: (d) 1985 Explanation: The first MS Windows operating system was introduced in early 1985. 5) Which of the following is the extension of Notepad? a. .txt b. .xls c. .ppt d. .bmp Hide Answer Workspace Answer: (a) .txt Explanation: The .txt file extension is a standard text document extension that contains the unformatted text. It is the default file extension for the notepad. 6) What else is a command interpreter called? a. prompt
  • 3. b. kernel c. shell d. command Hide Answer Workspace Answer: (c) shell Explanation: The command interpreter is also called the shell. 7) What is the full name of FAT? a. File attribute table b. File allocation table c. Font attribute table d. Format allocation table Hide Answer Workspace Answer: (b) File allocation table. Explanation: The FAT stands for File allocation table. The FAT is a file system architecture. It is used in computer systems and memory cards. A FAT of the contents of a computer disk indicates which field is used for which file. 8) BIOS is used? a. By operating system b. By compiler c. By interpreter d. By application software Hide Answer Workspace Answer: (a) By operating system
  • 4. Explanation: BIOS is used by the operating system. It is used to configure and identify the hardware in a system such as the hard drive, floppy drive, optical drive, CPU, and memory. 9) What is the mean of the Booting in the operating system? a. Restarting computer b. Install the program c. To scan d. To turn off Hide Answer Workspace Answer: (a) Restarting computer Explanation: Booting is a process of the restart the computer. After restarting it, there is no software in the computer's main memory. 10) When does page fault occur? a. The page is present in memory. b. The deadlock occurs. c. The page does not present in memory. d. The buffering occurs. Hide Answer Workspace Answer: (c) The page does not present in memory. Explanation: Page faults occur when a process tries to access a block page of the memory and that page is not stored in RAM (Read only memory) or memory. 11) Banker's algorithm is used? a. To prevent deadlock b. To deadlock recovery
  • 5. c. To solve the deadlock d. None of these Hide Answer Workspace Answer: (a) To prevent deadlock Explanation: Banker's algorithm is used to prevent the deadlock condition. The banker algorithm is sometimes called the detection algorithm. It is named the banker algorithm because it is used to determine whether a loan can be granted in the banking system or not. 12) When you delete a file in your computer, where does it go? a. Recycle bin b. Hard disk c. Taskbar d. None of these Hide Answer Workspace Answer: (a) Recycle bin Explanation: When you delete a file on your computer device, it is transferred to your computer system's recycle bin or trash. 13) Which is the Linux operating system? a. Private operating system b. Windows operating system c. Open-source operating system d. None of these Hide Answer Workspace Answer: (c) Open-source operating system
  • 6. Explanation: The Linux operating system is an open-source operating system made up of a kernel. It is a very safe operating system. 14) What is the full name of the DSM? a. Direct system module b. Direct system memory c. Demoralized system memory d. Distributed shared memory Hide Answer Workspace Answer: (d) Distributed shared memory Explanation: The DSM stands for Distributed Shared Memory. 15) What is the full name of the IDL? a. Interface definition language b. Interface direct language c. Interface data library d. None of these Hide Answer Workspace Answer: (a) Interface definition language Explanation: The IDL stands for Interface Definition Language. It is used to establish communications between clients and servers in RPC (Remote Procedure Call). 16) What is bootstrapping called? a. Cold boot b. Cold hot boot c. Cold hot strap d. Hot boot
  • 7. Hide Answer Workspace Answer: (a) Cold boot Explanation: Bootstrapping is also known as the cool boot. 17) What is the fence register used for? a. To disk protection b. To CPU protection c. To memory protection d. None of these Hide Answer Workspace Answer: (c) To memory protection Explanation: The fence register is used for memory protection on the computer. It is a way to access the memory in the computer. 18) If the page size increases, the internal fragmentation is also?..? a. Decreases b. Increases c. Remains constant d. None of these Hide Answer Workspace Answer: (b) Increases Explanation: None 19) Which of the following is a single-user operating system? a. Windows b. MAC
  • 8. c. Ms-Dos d. None of these Hide Answer Workspace Answer: (c) Ms-Dos Explanation: The single-user operating system is the operating system in which only one user can access the computer system at a time, and Ms-DOS is the best example of a single-user operating system. 20) The size of virtual memory is based on which of the following? a. CPU b. RAM c. Address bus d. Data bus Hide Answer Workspace Answer: (c) Address bus Explanation: The size of virtual memory is based on the address bus. 21) If a page number is not found in the translation lookaside buffer, then it is known as a? a. Translation Lookaside Buffer miss b. Buffer miss c. Translation Lookaside Buffer hit d. All of the mentioned Hide Answer Workspace Answer: (a) Translation Lookaside Buffer miss
  • 9. Explanation: A Translation Lookaside Buffer miss arises when the page table entry needed to translate a virtual address to a physical address is not available in the translation lookaside buffer. 22) Which of the following is not application software? a. Windows 7 b. WordPad c. Photoshop d. MS-excel Hide Answer Workspace Answer: (a) Windows 7 Explanation: Windows 7 is not an application software because it is a operating system. 23) Which of the following supports Windows 64 bit? a. Window XP b. Window 2000 c. Window 1998 d. None of these Hide Answer Workspace Answer: (a) Window XP Explanation: Windows XP supports the 64-bits. Windows XP is designed to expand the memory address space. Its original name is Microsoft Windows XP Professional x64 and it is based on the x86-64 architecture. 24) Which of the following windows does not have a start button? a. Windows 7 b. Windows 8
  • 10. c. Windows XP d. None of these Hide Answer Workspace Answer: (b) Windows 8 Explanation: Windows8 does not have a start button because it uses the tablet mode, but windows 8.1 has a start button. 25) Which of the following operating systems does not support more than one program at a time? a. Linux b. Windows c. MAC d. DOS Hide Answer Workspace Answer: (d) DOS Explanation: DOS stands for Disk operating system. Disk operating system is a single- user operating system that does not support more than one program at a time. 26) Which of the following is a condition that causes deadlock? a. Mutual exclusion b. Hold and wait c. Circular wait d. No preemption e. All of these Hide Answer Workspace Answer: (e) All of these Explanation: None
  • 11. 27) Who provides the interface to access the services of the operating system? a. API b. System call c. Library d. Assembly instruction Hide Answer Workspace Answer: (b) System call Explanation: The system call provides an interface for user programs to access the services of the operating system through the API (Application Program Interface). 28) Where are placed the list of processes that are prepared to be executed and waiting? a. Job queue b. Ready queue c. Execution queue d. Process queue Hide Answer Workspace Answer: (b) Ready queue Explanation: The ready queue is a set of all the processes that processes are ready to execute and wait. 29) Who among the following can block the running process? a. Fork b. Read c. Down d. All of these Hide Answer Workspace
  • 12. Answer: (d) All of these Explanation: None 30) Which of the following does not interrupt the running process? a. Timer interrupt b. Device c. Power failure d. Scheduler process Hide Answer Workspace Answer: (b) Scheduler process Explanation: Scheduler process does not interrupt in any running process. Its job is to select the processes for long-term, short-term, and short-term scheduler. 31) What is Microsoft window? a. Operating system b. Graphics program c. Word Processing d. Database program Hide Answer Workspace Answer: (a) Operating system Explanation: Microsoft Windows is an operating system that was developed by Microsoft company. The Microsoft Windows is available in 32-bits and 64-bits in the market. 32) Which of the following is group of programs? a. Accessories b. Paint
  • 13. c. Word d. All of above Hide Answer Workspace Answer: (a) Accessories Explanation: The windows accessories are a group of programs in the operating system. Windows XP offers many accessories or software that you can use to help with your work. The accessories are not full features programs, but it is useful for a specific task in the operating systems. It provides many programs such as a painting program, a calculator, a word processor, a notepad, and Internet software. 33) Which of the following is an example of a Real Time Operating System? a. MAC b. MS-DOS c. Windows 10 d. Process Control Hide Answer Workspace Answer: (d) Process Control Explanation: Process control is a best example of a Real time operating system. 34) Which of the following operating systems do you use for a client-server network? a. MAC b. Linux c. Windows XP d. Windows 2000 Hide Answer Workspace Answer: (d) Windows 2000
  • 14. Explanation: Windows 2002 operating systems were used to implement a client Server Network. It is a server OS that was developed by Microsoft in April 24, 2002. It includes some features of Windows XP. 35) Which windows was introduced to My Computer? a. Windows 10 b. Windows XP c. Windows 95 d. Windows 98 Hide Answer Workspace Answer: (c) Windows 95 Explanation: Windows 95 was first window to introduced the My Computer. 36) What type of commands are required to perform various tasks in DOS? a. Internal commands b. External commands c. Valuable commands d. Primary commands Hide Answer Workspace Answer: (b) External commands Explanation: External commands are required to perform various tasks in DOS. 37) What is the number of characters contained in the primary name of the file of MS- DOS? a. Up to 8 characters b. 3 characters c. Up to 10 characters
  • 15. d. None of the above Hide Answer Workspace Answer: (a) Up to 8 characters Explanation: MS-DOS operating system uses the file system that supports the 8.3 characters. The eight characters are used to the filename, and three characters are used to the extension. 38) Which command is used to fetch a group (.doc) of files that have just been deleted? a. Undelete b. Undelete/all c. Undelete *.doc d. All of above Hide Answer Workspace Answer: (c) Undelete *.doc Explanation: Undelete *.doc command is used to fetch a group (.doc) of files that have just been deleted. 39) Which of the following is system software? a. Operating system b. Compiler c. Utilities d. All of the above Hide Answer Workspace Answer: (d) All of the above Explanation: The system software is a type of computer program designed to run hardware and software programs on a computer.
  • 16. According to some definitions, system software also includes system utilities, system restore, development tools, compilers, and debuggers. 40) Which program runs first after booting the computer and loading the GUI? a. Desktop Manager b. File Manager c. Windows Explorer d. Authentication Hide Answer Workspace Answer: (d) Authentication Explanation: The authentication program is run first after booting the computer and loading the GUI. Authentication is a process of verifying the person or device. For example, when you log in to Facebook, you enter a username and password. 1) What is the use of directory structure in the operating system? a. The directory structure is used to solve the problem of the network connection in OS. b. It is used to store folders and files hierarchically. c. It is used to store the program in file format. d. All of the these Hide Answer Workspace Answer: (b) It is used to store folders and files hierarchically. Explanation: In the OS, a directory structure is a container that is used to store folders and files in a hierarchical manner. 2) What type of scheduling is round-robin scheduling? a. Linear data scheduling b. Non-linear data scheduling c. Preemptive scheduling
  • 17. d. Non-preemptive scheduling Hide Answer Workspace Answer: (c) Preemptive scheduling Explanation: Round-robin scheduling is a preemptive scheduling algorithm in which a specific time is provided to execute each process. This specific time is called time- slice. 3) Which conditions must be satisfied to solve a critical section problem? a. Bounded Waiting b. Progress c. Mutual Exclusion d. All of these. Hide Answer Workspace Answer: (d) All of the these Explanation: A critical-section is a code segment that can be accessed by a signal mechanism at a given point of time. The segment consists of shared data services that are need to be used by other systems. The critical section problem must satisfy the three conditions: Mutual Exclusion, Bounded Waiting, and Progress. 4) Which of the following options is correct about the windows operating system? AccessingElements of Union Keep Watching a. Windows is a CUI operating system. b. Windows is based on CUI. c. Windows is a GUI operating system. d. None of the these Hide Answer Workspace Answer: (c) Windows is a GUI operating system.
  • 18. Explanation: Windows is a GUI operating system. Windows OS does not require a command to run. Only one mouse is required to run the windows operating system. 5) Which of the following file systems is supported by the windows OS? a. NTFS b. FAT32 c. exFAT d. All of the these Hide Answer Workspace Answer: (d) All of the these Explanation: The following are the types of file systems that support the Windows operating system, such as NTFS, FAT, exFAT, HFS Plus, and EXT. 6) Which of the following keys does the user use to switch between applications running simultaneously in the Windows operating system? a. FN + TAB b. ALT + TAB c. CTRL + TAB d. SHIFT + TAB Hide Answer Workspace Answer: (b) ALT + TAB Explanation: The user uses the Alt + Tab button to switch from one window to another in the Windows operating system. Also, the user can use the Ctrl + Tab button to switch from tab to tab in internet explorer. 7) Which of the following commands creates an emergency repair disk for Windows NT 4.0? a. BAT
  • 19. b. EXE c. EXE/S d. ADD/REMOVE program Hide Answer Workspace Answer: (b) RDISK.EXE Explanation: There are the following steps to repair disk in windows NT 4.0: Step 1: Go to the search button in windows NT 4.0, then type Command Prompt. Step 2: Then type "RDISK.EXE" and press enter. Step 3: Then open a pop-up window. This pop-up window will update the emergency repair disk. 8) Which of the following scheduling algorithms is preemptive scheduling? a. FCFS Scheduling b. SJF Scheduling c. Network Scheduling d. SRTF Scheduling Hide Answer Workspace Answer: (d) SRTF Scheduling Explanation: Shortest Remaining Time First (SRTF) scheduling is preemptive scheduling. In this scheduling, the process that has the shortest processing time left is executed first. 9) How can you get a printout of the system configuration on windows 9x OS? a. Open the CMD window, type "MSDN", and press <printscrn> b. From the device manager, click the print button c. Open the CMD window, type "SYS", and press <printscrn> d. None of the these
  • 20. Hide Answer Workspace Answer: (c) From the device manager, click the print button Explanation: Windows9x is a generic term that refers to a series of Microsoft windows OS from 1995 to 2000. If you want to print out in Windows 9x, go to the device manager and click the printer option and then print the page. 10) Which of the following operating system runs on the server? a. Batch OS b. Distributed OS c. Real-time OS d. Network OS Hide Answer Workspace Answer: (d) Network OS Explanation: The network operating system runs on a server. This operating system has some functions that work to connect local area networks and computers. 11) What type of memory stores data in a swap file on a hard drive? a. Secondary memory b. Virtual memory c. Low memory d. RAM Hide Answer Workspace Answer: (b) Virtual memory Explanation: A swap file is a type of file that stores the data retrieved from Read-Only- Memory (RAM) or main memory. It is also a virtual memory because it is not stored in physical RAM.
  • 21. 12) Which of the following "semaphore" can take the non-negative integer values? a. Binary Semaphore b. Counting Semaphore c. Real Semaphore d. All of the these Hide Answer Workspace Answer: (b) Counting Semaphore Explanation: Counting semaphore takes only the non-negative integer value that is used to solve the critical section problem and process synchronization. 13) In which directory the local user profile settings are stored by default in windows 2000? a. C: USERS b. C: NETLOGON c. C: WIN NTUSER.DAT d. C: Documents and settings Hide Answer Workspace Answer: (d) C: Documents and settings Explanation: When a user logs in with an account for the first time, Windows 2000 automatically creates a user's profile in the "Documents and Settings" folder. 14) Which of the following operating system does not require a command to run? a. Kali Linux b. Windows c. Unix d. All of the these Hide Answer Workspace Answer: (b) Windows
  • 22. Explanation: Windows is a GUI operating system. This operating system does not require a command to run. Only one mouse is required to run this operating system. 15) Which method is the best among file allocation methods? a. Linked b. Contiguous c. Indexed d. None of the these Hide Answer Workspace Answer: (c) Indexed Explanation: The indexed allocation method is the best file allocation method because it removes the problem of contiguous and linked allocation. 16) The operating system work between a. User and Computer b. Network and User c. One user to another user d. All of the these Hide Answer Workspace Answer: (a) User and Computer Explanation: The OS is software that acts as an interface between a device and users and is also known as system software. 17) What is the paging in the operating system? a. Memory management scheme b. Network management scheme c. Internet management scheme
  • 23. d. None of the these Hide Answer Workspace Answer: (a) Memory management scheme Explanation: In the operating system, paging is a memory management scheme (MMS) in which memory is divided into pages of fixed size. 18) Which of the following programs is loaded first when starting a computer? a. Window desktop b. Network connection program c. Operating system d. CMD Hide Answer Workspace Answer: (c) Operating system Explanation: When the computer is powered on, the first operating system program is loaded into the computer. The OS's job is to control the computer's hardware and help other computer programs work. 19) Which of the following backup methods is quickest and requires the least amount of backup space? a. Complete backups b. Incremental c. Differential d. None of the these Hide Answer Workspace Answer: (b) Incremental Explanation: Incremental backups take less time and space than differential and complete backups.
  • 24. 20) Which of the following is not a type of directory structure? a. Acyclic-graph directory structure b. Single-level directory structure c. Tree directory structure d. Stack directory structure Hide Answer Workspace Answer: (d) Stack directory structure Explanation: Acyclic-graph, Single-level, and Tree directory structures are a type of directory structure in the operating system. But the stack is a linear data structure, so option (d) is correct answer. 21) Which of the following scheduling algorithm is non-preemptive scheduling? a. SJF scheduling b. Round-Robin scheduling c. SRTF scheduling d. None of these. Hide Answer Workspace Answer: (a) SJF scheduling Explanation: Shortest job first scheduling is non-preemptive scheduling. In this scheduling algorithm, the process which takes the least time to complete executes that process first. 22) Which of the following scheduling reduces process flow time? a. FCFS b. LIFO c. SJF d. All of the these
  • 25. Hide Answer Workspace Answer: (b) SJF Explanation: Shortest job first scheduling is non-preemptive scheduling. In this scheduling algorithm, the process which takes the least time to complete executes that process first. 23) Consider the following three processes in the FCFS. Process ID. Brust-time. Arrival-time P1 3 3 P2 6 6 P3 9 9 What is the average waiting time? a. 2 b. 3 c. 4 d. 5 Hide Answer Workspace Answer: (b) 3 Explanation: TA Time = CT - AT Waiting Time = TA - BT Process ID. Brust-time. Arrival- time Completion- Time (CT) Turnaround- Time (TA) Waiting- Time (WT) P1 3 3 3 3 0
  • 26. P2 6 6 9 8 2 P3 9 9 18 16 7 Average waiting time = (0 + 2 + 7) / 3 = 3 24) How many types of buffer overflow in the operating system? a. Two b. Six c. Seven d. Five Hide Answer Workspace Answer: (a) Two Explanation: There are two types of buffer-overflows: heap-based and stack-based. 25) In which allocation method does the user size the file before creating the file? a. Contiguous b. Linked c. Indexed d. None of the these Hide Answer Workspace Answer: (a) Contiguous Explanation: In the contiguous allocation method, the user has to give the size of the file before creating the file so that the operating system can give contiguous blocks in the disk-based on the size of that file. 26) Which of the following algorithms is used to avoid deadlock?
  • 27. a. Dynamic Programming algorithm b. Primality algorithms c. Banker's algorithm d. Deadlock algorithm Hide Answer Workspace Answer: (c) Banker's algorithm Explanation: Banker's algorithm is a deadlock avoidance and resource allocation algorithm. This algorithm was developed by Edger Dijkstra. It is also called a detection algorithm. 27) Which of the following component does not belong to PCB (Process Control Block)? a. CPU registers b. CPU scheduling information c. Operating System information d. Accounting information Hide Answer Workspace Answer: (c) Operating System information Explanation: The operating system information is not the component of the PCB, so option (d) is the correct answer. 28) Which of the following method is used to improve the main memory utilization? a. Swapping b. Operating system c. Memory stack d. None of these. Hide Answer Workspace Answer: (a) Swapping
  • 28. Explanation: Swapping is a technique in which the process is removed from the main memory and stored in secondary memory. It is used to improve the main memory utilization. 29) Buffer is a ___________. a. Permanent area b. Temporary area c. Small area d. Large area Hide Answer Workspace Answer: (b) Temporary area Explanation: Buffer is a temporary area where data is stored for some time before being transferred to the main memory. 30) Which of the following operating systems supports only real-time applications? a. Batch OS b. Distributed OS c. Real-time OS d. Network OS Hide Answer Workspace Answer: (c) Real-time OS Explanation: The real-time OS supports real-time applications. This OS is used for industrial and scientific work. It completes the tasks in a given time. 31) Which of the following binary formats support the Linux operating system? a. 0 and 1 b. Binary Number Format
  • 29. c. ELF Binary Format d. None of the these Hide Answer Workspace Answer: (c) ELF Binary Format Explanation: ELFstands for "Executable-and-Linkable-Format". The ELF format is used for libraries and executable files in Linux operating systems. 32) What is Kali Linux? a. Network device b. Operating system c. Server name d. Computer name Hide Answer Workspace Answer: (b) Operating system Explanation: Kali Linux is an operating system similar to Windows, Unix, and macOS. Kali operating system was designed for reverse engineering, security, computer forensics, etc. 33) Which of the following statement is correct about fragmentation? a. It is software that connects the OS. b. It is part of the software. c. Loss the memory d. All of the these Hide Answer Workspace Answer: (c) Loss the memory
  • 30. Explanation: A fragmentation is a state of a hard disk in which the most important parts of a single file are stored at different places in the disk. Due to which there is a loss of memory, and the working efficiency of the operating system is also affected. 34) SSTF stands for ________. a. Shortest Signal Time First b. Shortest Seek Time First c. System Seek Time First d. System Shortest Time First Hide Answer Workspace Answer: (b) Shortest Seek Time First Explanation: SSTF stands for Shortest-Seek-Time-First. In the SSTF algorithm, that request is executed first, whose seek time is the shortest. 35) The PCB is identified by ___________. a. Real-Number b. Binary Number c. Store block d. Integer Process ID Hide Answer Workspace Answer: (d) Integer Process ID Explanation: PCB is a data structure that is used to store the information of processes. It is identified by an integer process ID (PID). 36) Which of the following method is used to prevent threads or processes from accessing a single resource? a. PCB b. Semaphore
  • 31. c. Job Scheduler d. Non-Contiguous Memory Allocation Hide Answer Workspace Answer: (b) Semaphore Explanation: Semaphore is an integer variable that is used to prevent threads or processes from accessing a single resource. 37) Which of the following mechanisms is a locking mechanism? a. Semaphore b. PCB c. Mutex d. Binary Semaphore Hide Answer Workspace Answer: (c) Mutex Explanation: The mutex is a locking mechanism that ensures that only one thread can occupy the mutex at a time and enter the critical section. 38) Which of the following statements is correct about virtual memory? a. It is a combination of the logical-memory and physical-memory b. It is a separation of user logical memory and physical memory c. It is a virtual network memory d. None of the these Hide Answer Workspace Answer: (b) It is a separation of user logical memory and physical memory Explanation: Virtual memory is used to separate the user's logical memory and actual physical memory. Therefore, option (b) is the correct answer.
  • 32. 39) COW stands for __________ a. Compress of write memory b. Copy overwrite c. Compress overwrites d. Computer of world Hide Answer Workspace Answer: (b) Copy overwrite Explanation: COW stands for Copy-Overwrite. Initially, it allows both the parent and child systems to share the same page. 40) Who is responsible for keeping the process from the program? a. Operating system b. CPU c. Monitor d. All of the these Hide Answer Workspace Answer: (a) Operating system Explanation: A process is created from a program by the operating system. The OS is software that acts as an interface between a device and users and is also known as system software. 41) Which of the following operating systems require a command to run? a. Kali Linux b. Windows c. Mac OS d. Single-user operating system Hide Answer Workspace
  • 33. Answer: (a) Kali Linux Explanation: Kali Linux is a fast operating system as more work is done through the command line in it. This OS is a Debian-based Linux OS. This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on “RTOS”. 1. In real time operating system ____________ a) all processes have the same priority b) a task must be serviced by its deadline period c) process scheduling can be done only once d) kernel is not required View Answer Answer: b Explanation: None. 2. Hard real time operating system has ______________ jitter than a soft real time operating system. a) less b) more c) equal d) none of the mentioned View Answer Answer: a Explanation: Jitter is the undesired deviation from the true periodicity. 3. For real time operating systems, interrupt latency should be ____________ a) minimal b) maximum c) zero d) dependent on the scheduling View Answer Answer: a Explanation: Interrupt latency is the time duration between the generation of interrupt and execution of its service. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. In rate monotonic scheduling ____________ a) shorter duration job has higher priority b) longer duration job has higher priority c) priority does not depend on the duration of the job d) none of the mentioned View Answer Answer: a Explanation: None. 5. In which scheduling certain amount of CPU time is allocated to each process? a) earliest deadline first scheduling
  • 34. b) proportional share scheduling c) equal share scheduling d) none of the mentioned View Answer Answer: b Explanation: None. Check this: Computer Science MCQs | BCA MCQs 6. The problem of priority inversion can be solved by ____________ a) priority inheritance protocol b) priority inversion protocol c) both priority inheritance and inversion protocol d) none of the mentioned View Answer Answer: a Explanation: None. 7. Time duration required for scheduling dispatcher to stop one process and start another is known as ____________ a) process latency b) dispatch latency c) execution latency d) interrupt latency View Answer Answer: b Explanation: None. 8. Time required to synchronous switch from the context of one thread to the context of another thread is called? a) threads fly-back time b) jitter c) context switch time d) none of the mentioned View Answer Answer: c Explanation: None. 9. Which one of the following is a real time operating system? a) RTLinux b) VxWorks c) Windows CE d) All of the mentioned View Answer Answer: d Explanation: None. 10. VxWorks is centered around ____________ a) wind microkernel b) linux kernel c) unix kernel d) none of the mentioned View Answer
  • 35. Answer: a Explanation: None. This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on “Basics”. 1. What is an operating system? a) collection of programs that manages hardware resources b) system service provider to the application programs c) interface between the hardware and application programs d) all of the mentioned View Answer Answer: d Explanation: An Operating System acts as an intermediary between user/user applications/application programs and hardware. It is a program that manages hardware resources. It provides services to application programs. 2. To access the services of operating system, the interface is provided by the ___________ a) System calls b) API c) Library d) Assembly instructions View Answer Answer: a Explanation: To access services of the Operating System an interface is provided by the System Calls. Generally, these are functions written in C and C++. Open, Close, Read, Write are some of most prominently used system calls. 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 can not be loaded in running operating system d) kernel remains in the memory during the entire computer session View Answer Answer: c Explanation: Kernel is the first program which is loaded in memory when OS is loading as well as it remains in memory till OS is running. Kernel is the core part of the OS which is responsible for managing resources, allowing multiple processes to use the resources and provide services to various processes. Kernel modules can be loaded and unloaded in run-time i.e. in running OS. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 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 View Answer
  • 36. Answer: d Explanation: All the mentioned errors are handled by OS. The OS is continuously monitoring all of its resources. Also, the OS is constantly detecting and correcting errors. 5. What is the main function of the command interpreter? 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 View Answer Answer: a Explanation: The main function of command interpreter is to get and execute the next user-specified command. Command Interpreter checks for valid command and then runs that command else it will throw an error. Check this: BCA MCQs | Computer Science Books 6. In Operating Systems, which of the following is/are CPU scheduling algorithms? a) Round Robin b) Shortest Job First c) Priority d) All of the mentioned View Answer Answer: d Explanation: In Operating Systems, CPU scheduling algorithms are: i) First Come First Served scheduling ii) Shortest Job First scheduling iii) Priority scheduling iv) Round Robin scheduling v) Multilevel Queue scheduling vi) Multilevel Feedback Queue scheduling All of these scheduling algorithms have their own advantages and disadvantages. 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 View Answer Answer: a Explanation: If a process fails, most operating systems write the error information to a log file. Log file is examined by the debugger, to find out what is the actual cause of that particular problem. Log file is useful for system programmers for correcting errors. 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 View Answer Answer: a Explanation: A facility that dynamically adds probes to a running system, both in user
  • 37. process and in the kernel is called DTrace. This is very much useful in troubleshooting kernels in real-time. 9. Which one of the following is not a real time operating system? a) VxWorks b) QNX c) RTLinux d) Palm OS View Answer Answer: d Explanation: VxWorks, QNX & RTLinux are real-time operating systems. Palm OS is a mobile operating system. Palm OS is developed for Personal Digital Assistants (PDAs). 10. The OS X has ____________ a) monolithic kernel b) hybrid kernel c) microkernel d) monolithic kernel with modules View Answer Answer: b Explanation: OS X has a hybrid kernel. Hybrid kernel is a combination of two different kernels. OS X is developed by Apple and originally it is known as Mac OS X. 1. The systems which allow only one process execution at a time, are called __________ a) uniprogramming systems b) uniprocessing systems c) unitasking systems d) none of the mentioned View Answer Answer: b Explanation: Those systems which allow more than one process execution at a time, are called multiprocessing 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 View Answer Answer: d Explanation: In Operating Systems, each process has its own address space which contains code, data, stack and heap segments or sections. Each process also has a list of files which is opened by the process as well as all pending alarms, signals and various signal handlers. 3. In Unix, Which system call creates the new process? a) fork b) create c) new d) none of the mentioned View Answer
  • 38. Answer: a Explanation: In UNIX, a new process is created by fork() system call. fork() system call returns a process ID which is generally the process id of the child process created. Note: A process can be terminated due to __________ a) normal exit b) fatal error c) killed by another process d) all of the mentioned View Answer Answer: d Explanation: A process can be terminated normally by completing its task or because of fatal error or killed by another process or forcefully killed by a user. When the process completes its task without any error then it exits normally. The process may exit abnormally because of the occurrence of fatal error while it is running. The process can be killed or terminated forcefully by another process. 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 View Answer Answer: a Explanation: Ready state of the process means process has all necessary resources which are required for execution of that process when CPU is allocated. Process is ready for execution but waiting for the CPU to be allocated. Take Operating System Tests Now! 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 View Answer Answer: b Explanation: Interprocess Communication (IPC) is a communication mechanism that allows processes to communicate with each other and synchronise their actions without using the same address space. IPC can be achieved using shared memory and message passing. 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 View Answer Answer: a Explanation: Deadlock is a situation which occurs because process A is waiting for one resource and holds another resource (blocking resource). At the same time another process B demands blocking a resource as it is already held by a process A, process B is waiting state unless and until process A releases occupied resource.
  • 39. 8. A process stack does not contain __________ a) Function parameters b) Local variables c) Return addresses d) PID of child process View Answer Answer: d Explanation: Process stack contains Function parameters, Local variables and Return address. It does not contain the PID of child process. 9. Which system call can be used by a parent process to determine the termination of child process? a) wait b) exit c) fork d) get View Answer Answer: a Explanation: wait() system call is used by the parent process to determine termination of child process. The parent process uses wait() system call and gets the exit status of the child process as well as the pid of the child process which is terminated. 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 View Answer Answer: b Explanation: The address of the next instruction to be executed by the current process is provided by the Program Counter. After every instruction is executed, the Program Counter is incremented by 1 i.e. address of the next instruction to be executed. CPU fetches instruction from the address denoted by Program Counter and execute it. 1. A Process Control Block(PCB) does not contain which of the following? a) Code b) Stack c) Bootstrap program d) Data View Answer Answer: c Explanation: Process Control Block (PCB) contains information related to a process such as Process State, Program Counter, CPU Register, etc. Process Control Block is also known as Task Control Block. Bootstrap program is a program which runs initially when the system or computer is booted or rebooted. 2. The number of processes completed per unit time is known as __________ a) Output b) Throughput c) Efficiency
  • 40. d) Capacity View Answer Answer: b Explanation: The number of processes completed per unit time is known as Throughput. Suppose there are 4 processes A, B, C & D they are taking 1, 3, 4 & 7 units of time respectively for their executions. For 10 units of time, throughput is high if process A, B & C are running first as 3 processes can execute. If process C runs first then throughput is low as maximum only 2 processes can execute. Throughput is low for processes which take a long time for execution. Throughput is high for processes which take a short time for execution. 3. The state of a process is defined by __________ a) the final activity of the process b) the activity just executed by the process c) the activity to next be executed by the process d) the current activity of the process View Answer Answer: d Explanation: The state of a process is defined by the current activity of the process. A process state changes when the process executes. The process states are as New, Ready, Running, Wait, Terminated. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. Which of the following is not the state of a process? a) New b) Old c) Waiting d) Running View Answer Answer: b Explanation: There is no process state such as old. When a process is created then the process is in New state. When the process gets the CPU for its execution then the process is in Running state. When the process is waiting for an external event then the process is in a Waiting state. 5. What is a Process Control Block? a) Process type variable b) Data Structure c) A secondary storage section d) A Block in memory View Answer Answer: b Explanation: A Process Control Block (PCB) is a data structure. It contains information related to a process such as Process State, Program Counter, CPU Register, etc. Process Control Block is also known as Task Control Block. Check this: BCA MCQs | Operating System Books 6. The entry of all the PCBs of the current processes is in __________ a) Process Register b) Program Counter
  • 41. c) Process Table d) Process Unit View Answer Answer: c Explanation: The entry of all the PCBs of the current processes is in Process Table. The Process Table has the status of each and every process that is created in OS along with their PIDs. 7. What is the degree of multiprogramming? 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 View Answer Answer: d Explanation: Multiprogramming means the number of processes are in the ready states. To increase utilization of CPU, Multiprogramming is one of the most important abilities of OS. Generally, a single process cannot use CPU or I/O at all time, whenever CPU or I/O is available another process can use it. By doing this CPU utilization is increased. 8. A single thread of control allows the process to perform __________ a) only one task at a time b) multiple tasks at a time c) only two tasks at a time d) all of the mentioned View Answer Answer: a Explanation: A single thread of control allows the process to perform only one task at a time. In the case of multi-core, multiple threads can be run simultaneously and can perform multiple tasks at a time. 9. What is the objective of multiprogramming? a) Have a process running at all time b) Have multiple programs waiting in a queue ready to run c) To increase CPU utilization d) None of the mentioned View Answer Answer: c Explanation: The objective of multiprogramming is to increase CPU utilization. Generally, a single process cannot use CPU or I/O at all time, whenever CPU or I/O is available another process can use it. Multiprogramming offers this ability to OS by keeping multiple programs in a ready queue. 1. Which of the following do not belong to queues for processes? a) Job Queue b) PCB queue c) Device Queue d) Ready Queue View Answer Answer: b Explanation: PCB queue does not belong to queues for processes. PCB is a process
  • 42. control block which contains information related to process. Each process is represented by PCB. 2. When the process issues an I/O request __________ a) It is placed in an I/O queue b) It is placed in a waiting queue c) It is placed in the ready queue d) It is placed in the Job queue View Answer Answer: a Explanation: When the process issues an I/O request it is placed in an I/O queue. I/O is a resource and it should be used effectively and every process should get access to it. There might be multiple processes which requested for I/O. Depending on scheduling algorithm I/O is allocated to any particular process and after completing I/O operation, I/O access is returned to the OS. 3. What will happen 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 View Answer Answer: a Explanation: When a process terminates, it removes from all queues. All allocated resources to that particular process are deallocated and all those resources are returned back to OS. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 4. What is a long-term scheduler? a) It selects processes which have to be brought into the ready queue b) It selects processes which have to be executed next and allocates CPU c) It selects processes which heave to remove from memory by swapping d) None of the mentioned View Answer Answer: a Explanation: A long-term scheduler selects processes which have to be brought into the ready queue. When processes enter the system, they are put in the job queue. Long- term scheduler selects processes from the job queue and puts them in the ready queue. It is also known as Job Scheduler. 5. If all processes I/O bound, the ready queue will almost always be ______ and the Short term Scheduler will have a ______ to do. a) full, little b) full, lot c) empty, little d) empty, lot View Answer Answer: c Explanation: If all processes are I/O bound, the ready queue will almost empty and the short-term scheduler will have a little to do. I/O bound processes spend more time doing I/O than computation.
  • 43. Participate in Operating System Certification Contest of the Month Now! 6. What is a medium-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 View Answer Answer: c Explanation: A medium-term scheduler selects which process to remove from memory by swapping. The medium-term scheduler swapped out the process and later swapped in. Swapping helps to free up memory. 7. 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 View Answer Answer: b Explanation: A short-term scheduler selects a process which has to be executed next and allocates CPU. Short-term scheduler selects a process from the ready queue. It selects processes frequently. 8. The primary distinction between the short term scheduler and the long term scheduler is __________ a) The length of their queues b) The type of processes they schedule c) The frequency of their execution d) None of the mentioned View Answer Answer: c Explanation: The primary distinction between the short-term scheduler and the long-term scheduler is the frequency of their execution. The short-term scheduler executes frequently while the long-term scheduler executes much less frequently. 9. The only state transition that is initiated by the user process itself is __________ a) block b) wakeup c) dispatch d) none of the mentioned View Answer Answer: a Explanation: The only state transition that is initiated by the user process itself is block. Whenever a user process initiates an I/O request it goes into block state unless and until the I/O request is not completed. 10. 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 View Answer
  • 44. Answer: b Explanation: 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 Ready State. In a time- sharing operating system unit time is defined for sharing CPU, it is called a time quantum or time slice. If a process takes less than 1 time quantum, then the process itself releases the CPU. 11. In a multiprogramming environment __________ a) the processor executes more than one process at a time b) the programs are developed by more than one person c) more than one process resides in the memory d) a single user can execute many programs at the same time View Answer Answer: c Explanation: In a multiprogramming environment more than one process resides in the memory. Whenever a CPU is available, one process amongst all present in memory gets the CPU for execution. Multiprogramming increases CPU utilization. 12. Suppose that a process is in “Blocked” state waiting for some I/O service. When the service is completed, it goes to the __________ a) Running state b) Ready state c) Suspended state d) Terminated state View Answer Answer: b Explanation: Suppose that a process is in “Blocked” state waiting for some I/O service. When the service is completed, it goes to the ready state. Process never goes directly to the running state from the waiting state. Only processes which are in ready state go to the running state whenever CPU allocated by operating system. 13. 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 View Answer Answer: d Explanation: The context of a process in the PCB of a process does not contain context switch time. When switching CPU from one process to another, the current context of the process needs to be saved. It includes values of the CPU registers, process states, memory-management information. 14. Which of the following need not necessarily be saved on a context switch between processes? a) General purpose registers b) Translation lookaside buffer c) Program counter d) All of the mentioned View Answer Answer: b Explanation: Translation Look-aside Buffer (TLB) need not necessarily be saved on a
  • 45. context switch between processes. A special, small, fast-lookup hardware cache is called Translation Look-aside Buffer. TLB used to reduce memory access time. 15. Which of the following does not interrupt a running process? a) A device b) Timer c) Scheduler process d) Power failure View Answer Answer: c Explanation: Scheduler process does not interrupt a running process. Scheduler process selects an available process from a pool of available processes and allocates CPU to it. 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 View Answer Answer: a Explanation: A cooperating process can be affected by other processes executing in the system. Also it can affect other processes executing in the system. A process shares data with other processes, such a process is known as a cooperating process. 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 View Answer Answer: b Explanation: When several processes access the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called race condition. 3. If a process is executing in its critical section, then no other processes can be executing in their critical section. What is this condition called? a) mutual exclusion b) critical exclusion c) synchronous exclusion d) asynchronous exclusion View Answer Answer: a Explanation: If a process is executing in its critical section, then no other processes can be executed in their critical section. This condition is called Mutual Exclusion. Critical section of the process is shared between multiple processes. If this section is executed
  • 46. by more than one or all of them concurrently then the outcome of this is not as per desired outcome. For this reason the critical section of the process should not be executed concurrently. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. Which one of the following is a synchronization tool? a) thread b) pipe c) semaphore d) socket View Answer Answer: c Explanation: Semaphore is a synchronization tool. Semaphore is a mechanism which synchronizes or controls access of threads on critical resources. There are two types of semaphores i) Binary Semaphore ii) Counting Semaphore. 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 View Answer Answer: a Explanation: A semaphore is a shared integer variable that can not drop below zero. In binary semaphore, if the value of the semaphore variable is zero that means there is a process that uses a critical resource and no other process can access the same critical resource until it is released. In Counting semaphore, if the value of the semaphore variable is zero that means there is no resource available. Take Operating System Mock Tests - Chapterwise! Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 6. Mutual exclusion can be provided by the __________ a) mutex locks b) binary semaphores c) both mutex locks and binary semaphores d) none of the mentioned View Answer Answer: c Explanation: Mutual exclusion can be provided by both mutex locks and binary semaphore. Mutex is a short form of Mutual Exclusion. Binary semaphore also provides a mechanism for mutual exclusion. Binary semaphore behaves similar to 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 View Answer Answer: a Explanation: When a high priority task is indirectly preempted by a medium priority task
  • 47. effectively inverting the relative priority of the two tasks, the scenario is called priority inversion. 8. Process synchronization can be done on __________ a) hardware level b) software level c) both hardware and software level d) none of the mentioned View Answer Answer: c Explanation: Process synchronization can be done on both hardware and software level. Critical section problems can be resolved using hardware synchronisation. But this method is not simple for implementation so software synchronization is mostly used. 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 View Answer Answer: d Explanation: A monitor is a module that encapsulates shared data structures, procedures that operate on shared data structure, synchronization between concurrent procedure invocation. 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 View Answer Answer: a Explanation: To enable a process to wait within the monitor a condition variable must be declared as condition. 1. Restricting the child process to a subset of the parent’s resources prevents any process from __________ a) overloading the system by using a lot of secondary storage b) under-loading the system by very less CPU utilization c) overloading the system by creating a lot of sub-processes d) crashing the system by utilizing multiple resources View Answer Answer: c Explanation: Restricting the child process to a subset of the parent’s resources prevents any process from overloading the system by creating a lot of sub-processes. A process creates a child process, child process requires certain resources to complete its task. A child process can demand required resources directly from the system, but by doing this system will be overloaded. So to avoid overloading of the system, the parent process shares its resources among children. 2. A parent process calling _____ system call will be suspended until children processes terminate.
  • 48. a) wait b) fork c) exit d) exec View Answer Answer: a Explanation: A parent process calling wait system call will be suspended until children processes terminate. A parameter is passed to wait system call which will obtain exit status of child as well as wait system call returns PID of terminated process. 3. Cascading termination refers to termination of all child processes if the parent process terminates ______ a) Normally b) Abnormally c) Normally or abnormally d) None of the mentioned View Answer Answer: c Explanation: Cascading termination refers to termination of all child processes if the parent process terminates Normally or Abnormally. Some systems don’t allow child processes to exist if the parent process has terminated. Cascading termination is normally initiated by the operating system. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. With _____________ only one process can execute at a time; meanwhile all other process are waiting for the processor. With ______________ more than one process can be running simultaneously each on a different processor. a) Multiprocessing, Multiprogramming b) Multiprogramming, Uniprocessing c) Multiprogramming, Multiprocessing d) Uniprogramming, Multiprocessing View Answer Answer: d Explanation: With Uniprogramming only one process can execute at a time; meanwhile all other processes are waiting for the processor. With Multiprocessing more than one process can run simultaneously each on different processors. The Uniprogramming system has only one program inside the core while the Multiprocessing system has multiple processes inside multiple cores. The core is one which executes instructions and stores data locally into registers. 5. In UNIX, each process is identified by its __________ a) Process Control Block b) Device Queue c) Process Identifier d) None of the mentioned View Answer Answer: c Explanation: In Unix, each process is identified by its Process Identifier or PID. The PID provides unique value to each process in the system so that each process can be identified uniquely.
  • 49. Take Operating System Tests Now! 6. In UNIX, the return value for the fork system call is _____ for the child process and _____ for the parent process. a) A Negative integer, Zero b) Zero, A Negative integer c) Zero, A nonzero integer d) A nonzero integer, Zero View Answer Answer: c Explanation: In Unix, the return value of the fork system call is Zero for the child process and Non-zero value for parent process. A fork system call returns the PID of a newly created (child) process to the parent and returns Zero to that newly created (child) process. 7. The child process can __________ a) be a duplicate of the parent process b) never be a duplicate of the parent process c) cannot have another program loaded into it d) never have another program loaded into it View Answer Answer: a Explanation: The child process can be a duplicate of the parent process. The child process created by fork consists of a copy of the address space of the parent process. 8. The child process completes execution, but the parent keeps executing, then the child process is known as __________ a) Orphan b) Zombie c) Body d) Dead View Answer Answer: b Explanation: The child process completes execution, but the parent keeps executing, then the child process is known as Zombie. When a child process terminates, its resources get deallocated but its entry in the Process Control Block (PCB) remains there until its parent calls wait system call. 1. What is Interprocess communication? a) allows processes to communicate and synchronize their actions when using the same address space b) allows processes to communicate and synchronize their actions c) allows the processes to only synchronize their actions without communication d) none of the mentioned View Answer Answer: b Explanation: Interprocess Communication allows processes to communicate and synchronize their actions. Interprocess Communication (IPC) mechanism is used by cooperating processes to exchange data and information. There are two models of IPC:
  • 50. → Shared Memory → Message Passing 2. Message passing system allows processes to __________ a) communicate with each other without sharing the same address space b) communicate with one another by resorting to shared data c) share data d) name the recipient or sender of the message View Answer Answer: a Explanation: Message Passing system allows processes to communicate with each other without sharing the same address space. 3. Which of the following two operations are provided by the IPC facility? a) write & delete message b) delete & receive message c) send & delete message d) receive & send message View Answer Answer: d Explanation: Two operations provided by the IPC facility are receive and send messages. Exchange of data takes place in cooperating processes. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 4. Messages sent by a process __________ a) have to be of a fixed size b) have to be a variable size c) can be fixed or variable sized d) none of the mentioned View Answer Answer: c Explanation: Messages sent by a process can be fixed or variable size. If the message size of the process is fixed then system level implementation is straightforward but it makes the task of programming more difficult. If the message size of the process is variable then system level implementation is more complex but it makes the task of programming simpler. 5. The link between two processes P and Q to send and receive messages is called __________ a) communication link b) message-passing link c) synchronization link d) all of the mentioned View Answer Answer: a Explanation: The link between two processes P and Q to send and receive messages is called communication link. Two processes P and Q want to communicate with each other; there should be a communication link that must exist between these two processes so that both processes can able to send and receive messages using that link. Participate in Operating System Certification Contest of the Month Now!
  • 51. 6. Which of the following are TRUE for direct communication? a) A communication link can be associated with N number of process(N = max. number of processes supported by system) b) A communication link is associated with exactly two processes c) Exactly N/2 links exist between each pair of processes(N = max. number of processes supported by system) d) Exactly two link exists between each pair of processes View Answer Answer: b Explanation: For direct communication, a communication link is associated with exactly two processes. One communication link must exist between a pair of processes. 7. In indirect communication between processes P and Q __________ a) there is another process R to handle and pass on the messages between P and Q b) there is another machine between the two processes to help communication c) there is a mailbox to help communication between P and Q d) none of the mentioned View Answer Answer: c Explanation: In indirect communication between processes P and Q there is a mailbox to help communication between P and Q. A mailbox can be viewed abstractly as an object into which messages can be placed by processes and from which messages can be removed. 8. In the non blocking send __________ a) the sending process keeps sending until the message is received b) the sending process sends the message and resumes operation c) the sending process keeps sending until it receives a message d) none of the mentioned View Answer Answer: b Explanation: In the non blocking send, the sending process sends the message and resumes operation. Sending process doesn’t care about reception. It is also known as asynchronous send. 9. In the Zero capacity queue __________ a) the queue can store at least one message b) the sender blocks until the receiver receives the message c) the sender keeps sending and the messages don’t wait in the queue d) none of the mentioned View Answer Answer: b Explanation: In the Zero capacity queue the sender blocks until the receiver receives the message. Zero capacity queue has maximum capacity of Zero; thus message queue does not have any waiting message in it. 10. The Zero Capacity queue __________ a) is referred to as a message system with buffering b) is referred to as a message system with no buffering c) is referred to as a link d) none of the mentioned View Answer
  • 52. Answer: b Explanation: The Zero capacity queue is referred to as a message system with no buffering. Zero capacity queue has maximum capacity of Zero; thus message queue does not have any waiting message in it. 11. Bounded capacity and Unbounded capacity queues are referred to as __________ a) Programmed buffering b) Automatic buffering c) User defined buffering d) No buffering View Answer Answer: b Explanation: Bounded capacity and Unbounded capacity queues are referred to as Automatic buffering. Buffer capacity of the Bounded capacity queue is finite length and buffer capacity of the Unbounded queue is infinite. 1. Remote Procedure Calls are used ____________ a) for communication between two processes remotely different from each other on the same system b) for communication between two processes on the same system c) for communication between two processes on separate systems d) none of the mentioned View Answer Answer: c Explanation: None. 2. To differentiate the many network services a system supports ______ are used. a) Variables b) Sockets c) Ports d) Service names View Answer Answer: c Explanation: None. 3. RPC provides a(an) _____ on the client-side, a separate one for each remote procedure. a) stub b) identifier c) name d) process identifier View Answer Answer: a Explanation: None. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. What is stub? a) transmits the message to the server where the server side stub receives the message and invokes procedure on the server side b) packs the parameters into a form transmittable over the network c) locates the port on the server
  • 53. d) all of the mentioned View Answer Answer: d Explanation: None. 5. To resolve the problem of data representation on different systems RPCs define _____________ a) machine dependent representation of data b) machine representation of data c) machine-independent representation of data d) none of the mentioned View Answer Answer: c Explanation: None. Check this: BCA MCQs | Computer Science MCQs 6. What is the full form of RMI? a) Remote Memory Installation b) Remote Memory Invocation c) Remote Method Installation d) Remote Method Invocation View Answer Answer: d Explanation: None. 7. The remote method invocation __________ a) allows a process to invoke memory on a remote object b) allows a thread to invoke a method on a remote object c) allows a thread to invoke memory on a remote object d) allows a process to invoke a method on a remote object View Answer Answer: b Explanation: None. 8. A process that is based on IPC mechanism which executes on different systems and can communicate with other processes using message based communication, is called ________ a) Local Procedure Call b) Inter Process Communication c) Remote Procedure Call d) Remote Machine Invocation View Answer Answer: c Explanation: None. 1. The initial program that is run when the computer is powered up is called __________ a) boot program b) bootloader c) initializer d) bootstrap program View Answer
  • 54. Answer: d Explanation: None. 2. How does the software trigger an interrupt? a) Sending signals to CPU through bus b) Executing a special operation called system call c) Executing a special program called system program d) Executing a special program called interrupt trigger program View Answer Answer: b Explanation: None. 3. What is a trap/exception? a) hardware generated interrupt caused by an error b) software generated interrupt caused by an error c) user generated interrupt caused by an error d) none of the mentioned View Answer Answer: b Explanation: None. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 4. What is an ISR? a) Information Service Request b) Interrupt Service Request c) Interrupt Service Routine d) Information Service Routine View Answer Answer: c Explanation: None. 5. What is an interrupt vector? a) It is an address that is indexed to an interrupt handler b) It is a unique device number that is indexed by an address c) It is a unique identity given to an interrupt d) None of the mentioned View Answer Answer: a Explanation: None. Participate in Operating System Certification Contest of the Month Now! 6. DMA is used for __________ a) High speed devices(disks and communications network) b) Low speed devices c) Utilizing CPU cycles d) All of the mentioned View Answer Answer: a Explanation: None.
  • 55. 7. In a memory mapped input/output __________ a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready b) the CPU writes one data byte to the data register and sets a bit in control register to show that a byte is available c) the CPU receives an interrupt when the device is ready for the next byte d) the CPU runs a user written code and does accordingly View Answer Answer: b Explanation: None. 8. In a programmed input/output(PIO) __________ a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready b) the CPU writes one data byte to the data register and sets a bit in control register to show that a byte is available c) the CPU receives an interrupt when the device is ready for the next byte d) the CPU runs a user written code and does accordingly View Answer Answer: a Explanation: None. 9. In an interrupt driven input/output __________ a) the CPU uses polling to watch the control bit constantly, looping to see if a device is ready b) the CPU writes one data byte to the data register and sets a bit in control register to show that a byte is available c) the CPU receives an interrupt when the device is ready for the next byte d) the CPU runs a user written code and does accordingly View Answer Answer: c Explanation: None. 10. In the layered approach of Operating Systems __________ a) Bottom Layer(0) is the User interface b) Highest Layer(N) is the User interface c) Bottom Layer(N) is the hardware d) Highest Layer(N) is the hardware View Answer Answer: b Explanation: None. 11. How does the Hardware trigger an interrupt? a) Sending signals to CPU through a system bus b) Executing a special program called interrupt program c) Executing a special program called system program d) Executing a special operation called system call View Answer Answer: a Explanation: None. 12. Which operation is performed by an interrupt handler? a) Saving the current state of the system b) Loading the interrupt handling code and executing it
  • 56. c) Once done handling, bringing back the system to the original state it was before the interrupt occurred d) All of the mentioned View Answer Answer: d Explanation: None. 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 View Answer 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 View Answer 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 View Answer Answer: b Explanation: None. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 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 View Answer Answer: a Explanation: None.
  • 57. 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 View Answer Answer: a Explanation: None. Become Top Ranker in Operating System Now! 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 View Answer Answer: b Explanation: None. 7. Which algorithm is defined in Time quantum? a) shortest job scheduling algorithm b) round robin scheduling algorithm c) priority scheduling algorithm d) multilevel queue scheduling algorithm View Answer 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 View Answer 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 View Answer 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 View Answer
  • 58. Answer: b Explanation: User level threads are managed by thread library and the kernel is unaware of them. 1. CPU scheduling is the basis of ___________ a) multiprocessor systems b) multiprogramming operating systems c) larger memory sized systems d) none of the mentioned View Answer Answer: b Explanation: None. 2. With multiprogramming ______ is used productively. a) time b) space c) money d) all of the mentioned View Answer Answer: a Explanation: None. 3. What are the two steps of a process execution? a) I/O & OS Burst b) CPU & I/O Burst c) Memory & I/O Burst d) OS & Memory Burst View Answer Answer: b Explanation: None. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. An I/O bound program will typically have ____________ a) a few very short CPU bursts b) many very short I/O bursts c) many very short CPU bursts d) a few very short I/O bursts View Answer Answer: c Explanation: None. 5. A process is selected from the ______ queue by the ________ scheduler, to be executed. a) blocked, short term b) wait, long term c) ready, short term d) ready, long term View Answer
  • 59. Answer: c Explanation: None. Check this: Operating System Books | BCA MCQs 6. In the following cases non – preemptive scheduling occurs? a) When a process switches from the running state to the ready state b) When a process goes from the running state to the waiting state c) When a process switches from the waiting state to the ready state d) All of the mentioned View Answer Answer: b Explanation: There is no other choice. 7. The switching of the CPU from one process or thread to another is called ____________ a) process switch b) task switch c) context switch d) all of the mentioned View Answer Answer: d Explanation: None. 8. What is Dispatch latency? a) the speed of dispatching a process from running to the ready state b) the time of dispatching a process from running to ready state and keeping the CPU idle c) the time to stop one process and start running another one d) none of the mentioned View Answer Answer: c Explanation: None. 9. Scheduling is done so as to ____________ a) increase CPU utilization b) decrease CPU utilization c) keep the CPU more idle d) none of the mentioned View Answer Answer: a Explanation: None. 10. Scheduling is done so as to ____________ a) increase the throughput b) decrease the throughput c) increase the duration of a specific amount of work d) none of the mentioned View Answer Answer: a Explanation: None. 11. What is Turnaround time? a) the total waiting time for a process to finish execution
  • 60. b) the total time spent in the ready queue c) the total time spent in the running queue d) the total time from the completion till the submission of a process View Answer Answer: d Explanation: None. 12. Scheduling is done so as to ____________ a) increase the turnaround time b) decrease the turnaround time c) keep the turnaround time same d) there is no relation between scheduling and turnaround time View Answer Answer: b Explanation: None. 13. What is Waiting time? a) the total time in the blocked and waiting queues b) the total time spent in the ready queue c) the total time spent in the running queue d) the total time from the completion till the submission of a process View Answer Answer: b Explanation: None. 14. Scheduling is done so as to ____________ a) increase the waiting time b) keep the waiting time the same c) decrease the waiting time d) none of the mentioned View Answer Answer: c Explanation: None. 15. What is Response time? a) the total time taken from the submission time till the completion time b) the total time taken from the submission time till the first response is produced c) the total time taken from submission time till the response is output d) none of the mentioned View Answer Answer: b Explanation: None. 1. Round robin scheduling falls under the category of ____________ a) Non-preemptive scheduling b) Preemptive scheduling c) All of the mentioned d) None of the mentioned View Answer Answer: b Explanation: None.
  • 61. 2. With round robin scheduling algorithm in a time shared system ____________ a) using very large time slices converts it into First come First served scheduling algorithm b) using very small time slices converts it into First come First served scheduling algorithm c) using extremely small time slices increases performance d) using very small time slices converts it into Shortest Job First algorithm View Answer Answer: a Explanation: All the processes will be able to get completed. 3. The portion of the process scheduler in an operating system that dispatches processes is concerned with ____________ a) assigning ready processes to CPU b) assigning ready processes to waiting queue c) assigning running processes to blocked queue d) all of the mentioned View Answer Answer: a Explanation: None. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 4. Complex scheduling algorithms ____________ a) are very appropriate for very large computers b) use minimal resources c) use many resources d) all of the mentioned View Answer Answer: a Explanation: Large computers are overloaded with a greater number of processes. 5. What is FIFO algorithm? a) first executes the job that came in last in the queue b) first executes the job that came in first in the queue c) first executes the job that needs minimal processor d) first executes the job that has maximum processor needs View Answer Answer: b Explanation: None. Get Free Certificate of Merit in Operating System Now! 6. The strategy of making processes that are logically runnable to be temporarily suspended is called ____________ a) Non preemptive scheduling b) Preemptive scheduling c) Shortest job first d) First come First served View Answer Answer: b Explanation: None.
  • 62. 7. What is Scheduling? a) allowing a job to use the processor b) making proper use of processor c) all of the mentioned d) none of the mentioned View Answer Answer: a Explanation: None. 8. There are 10 different processes running on a workstation. Idle processes are waiting for an input event in the input queue. Busy processes are scheduled with the Round- Robin time sharing method. Which out of the following quantum times is the best value for small response times, if the processes have a short runtime, e.g. less than 10ms? a) tQ = 15ms b) tQ = 40ms c) tQ = 45ms d) tQ = 50ms View Answer Answer: a Explanation: None. 9. Orders are processed in the sequence they arrive if _______ rule sequences the jobs. a) earliest due date b) slack time remaining c) first come, first served d) critical ratio View Answer Answer: c Explanation: None. 10. Which of the following algorithms tends to minimize the process flow time? a) First come First served b) Shortest Job First c) Earliest Deadline First d) Longest Job First View Answer Answer: b Explanation: None. 11. Under multiprogramming, turnaround time for short jobs is usually ________ and that for long jobs is slightly ___________ a) Lengthened; Shortened b) Shortened; Lengthened c) Shortened; Shortened d) Shortened; Unchanged View Answer Answer: b Explanation: None. 12. Which of the following statements are true? (GATE 2010) I. Shortest remaining time first scheduling may cause starvation
  • 63. II. Preemptive scheduling may cause starvation III. Round robin is better than FCFS in terms of response time a) I only b) I and III only c) II and III only d) I, II and III View Answer Answer: d Explanation: I) Shortest remaining time first scheduling is a preemptive version of shortest job scheduling. It may cause starvation as shorter processes may keep coming and a long CPU burst process never gets CPU. II) Preemption may cause starvation. If priority based scheduling with preemption is used, then a low priority process may never get CPU. III) Round Robin Scheduling improves response time as all processes get CPU after a specified time. 1. Which is the most optimal scheduling algorithm? a) FCFS – First come First served b) SJF – Shortest Job First c) RR – Round Robin d) None of the mentioned View Answer Answer: b Explanation: None. 2. The real difficulty with SJF in short term scheduling is ____________ a) it is too good an algorithm b) knowing the length of the next CPU request c) it is too complex to understand d) none of the mentioned View Answer Answer: b Explanation: None. 3. The FCFS algorithm is particularly troublesome for ____________ a) time sharing systems b) multiprogramming systems c) multiprocessor systems d) operating systems View Answer Answer: b Explanation: In a time sharing system, each user needs to get a share of the CPU at regular intervals. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. Consider the following set of processes, the length of the CPU burst time given in milliseconds.
  • 64. Process Burst time P1 6 P2 8 P3 7 P4 3 Assuming the above process being scheduled with the SJF scheduling algorithm. a) The waiting time for process P1 is 3ms b) The waiting time for process P1 is 0ms c) The waiting time for process P1 is 16ms d) The waiting time for process P1 is 9ms View Answer Answer: a Explanation: None. Take Operating System Tests Now! 5. Preemptive Shortest Job First scheduling is sometimes called ____________ a) Fast SJF scheduling b) EDF scheduling – Earliest Deadline First c) HRRN scheduling – Highest Response Ratio Next d) SRTN scheduling – Shortest Remaining Time Next View Answer Answer: d Explanation: None. 6. An SJF algorithm is simply a priority algorithm where the priority is ____________ a) the predicted next CPU burst b) the inverse of the predicted next CPU burst c) the current CPU burst d) anything the user wants View Answer Answer: a Explanation: The larger the CPU burst, the lower the priority. 7. Choose one of the disadvantages of the priority scheduling algorithm? a) it schedules in a very complex manner b) its scheduling takes up a lot of time c) it can lead to some low priority process waiting indefinitely for the CPU d) none of the mentioned View Answer Answer: c Explanation: None. 8. What is ‘Aging’? a) keeping track of cache contents b) keeping track of what pages are currently residing in memory c) keeping track of how many times a given page is referenced d) increasing the priority of jobs to ensure termination in a finite time View Answer Answer: d Explanation: None.
  • 65. 9. A solution to the problem of indefinite blockage of low – priority processes is ____________ a) Starvation b) Wait queue c) Ready queue d) Aging View Answer Answer: d Explanation: None. 10. Which of the following statements are true? (GATE 2010) i) Shortest remaining time first scheduling may cause starvation ii) Preemptive scheduling may cause starvation iii) Round robin is better than FCFS in terms of response time a) i only b) i and iii only c) ii and iii only d) i, ii and iii View Answer Answer: d Explanation: None. 11. Which of the following scheduling algorithms gives minimum average waiting time? a) FCFS b) SJF c) Round – robin d) Priority View Answer Answer: b Explanation: None. 1. Concurrent access to shared data may result in ____________ a) data consistency b) data insecurity c) data inconsistency d) none of the mentioned View Answer Answer: c Explanation: None. 2. A situation where several processes access and manipulate the same data concurrently and the outcome of the execution depends on the particular order in which access takes place is called ____________ a) data consistency b) race condition c) aging d) starvation View Answer
  • 66. Answer: b Explanation: None. 3. 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 View Answer Answer: b Explanation: None. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. 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 View Answer Answer: d Explanation: None. 5. Mutual exclusion implies that ____________ a) if a process is executing in its critical section, then no other process must be executing in their critical sections b) if a process is executing in its critical section, then other processes must be executing in their critical sections c) if a process is executing in its critical section, then all the resources of the system must be blocked until it finishes execution d) none of the mentioned View Answer Answer: a Explanation: None. Take Operating System Mock Tests - Chapterwise! Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 6. Bounded waiting implies that there exists a bound on the number of times a process is allowed to enter its critical section ____________ a) after a process has made a request to enter its critical section and before the request is granted b) when another process is in its critical section c) before a process has made a request to enter its critical section d) none of the mentioned View Answer Answer: a Explanation: None. 7. A minimum of _____ variable(s) is/are required to be shared between processes to solve the critical section problem.
  • 67. a) one b) two c) three d) four View Answer Answer: b Explanation: None. 8. In the bakery algorithm to solve the critical section problem ____________ a) each process is put into a queue and picked up in an ordered manner b) each process receives a number (may or may not be unique) and the one with the lowest number is served next c) each process gets a unique number and the one with the highest number is served next d) each process gets a unique number and the one with the lowest number is served next View Answer Answer: b Explanation: None. 1. An un-interruptible unit is known as ____________ a) single b) atomic c) static d) none of the mentioned View Answer Answer: b Explanation: None. 2. TestAndSet instruction is executed ____________ a) after a particular process b) periodically c) atomically d) none of the mentioned View Answer Answer: c Explanation: None. 3. Semaphore is a/an _______ to solve the critical section problem. a) hardware for a system b) special program for a system c) integer variable d) none of the mentioned View Answer Answer: c Explanation: None. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement
  • 68. 4. What are the two atomic operations permissible on semaphores? a) wait b) stop c) hold d) none of the mentioned View Answer Answer: a Explanation: None. 5. What are Spinlocks? a) CPU cycles wasting locks over critical sections of programs b) Locks that avoid time wastage in context switches c) Locks that work better on multiprocessor systems d) All of the mentioned View Answer Answer: d Explanation: None. Check this: BCA MCQs | Operating System Books 6. What is the main disadvantage of spinlocks? a) they are not sufficient for many process b) they require busy waiting c) they are unreliable sometimes d) they are too complex for programmers View Answer Answer: b Explanation: None. 7. The wait operation of the semaphore basically works on the basic _______ system call. a) stop() b) block() c) hold() d) wait() View Answer Answer: b Explanation: None. 8. The signal operation of the semaphore basically works on the basic _______ system call. a) continue() b) wakeup() c) getup() d) start() View Answer Answer: b Explanation: None. 9. If the semaphore value is negative ____________ a) its magnitude is the number of processes waiting on that semaphore b) it is invalid c) no operation can be further performed on it until the signal operation is performed on it
  • 69. d) none of the mentioned View Answer Answer: a Explanation: None. 10. The code that changes the value of the semaphore is ____________ a) remainder section code b) non – critical section code c) critical section code d) none of the mentioned View Answer Answer: c Explanation: None. 11. The following program consists of 3 concurrent processes and 3 binary semaphores. The semaphores are initialized as S0 = 1, S1 = 0, S2 = 0. Process P0 while(true) { wait(S0); print '0'; release(S1); release(S2); } Process P1 wait(S1); release(S0); Process P2 wait(S2); release(S0); How many times will P0 print ‘0’? a) At least twice b) Exactly twice c) Exactly thrice d) Exactly once View Answer Answer: a Explanation: None. 12. Each process Pi, i = 0,1,2,3,……,9 is coded as follows. repeat P(mutex) {Critical Section} V(mutex) forever
  • 70. The code for P10 is identical except that it uses V(mutex) instead of P(mutex). What is the largest number of processes that can be inside the critical section at any moment (the mutex being initialized to 1)? a) 1 b) 2 c) 3 d) None of the mentioned View Answer Answer: c Explanation: Any one of the 9 processes can get into critical section after executing P(mutex) which decrements the mutex value to 0. At this time P10 can enter critical section by incrementing the value to 1. Now any of the 9 processes can enter the critical section by again decrementing the mutex value to 0. None of the remaining processes can get into their critical sections. 13. Two processes, P1 and P2, need to access a critical section of code. Consider the following synchronization construct used by the processes. Process P1 : while(true) { w1 = true; while(w2 == true); Critical section w1 = false; } Remainder Section Process P2 : while(true) { w2 = true; while(w1 == true); Critical section w2 = false; } Remainder Section Here, w1 and w2 have shared variables, which are initialized to false. Which one of the following statements is TRUE about the above construct? a) It does not ensure mutual exclusion b) It does not ensure bounded waiting c) It requires that processes enter the critical section in strict alternation d) It does not prevent deadlocks but ensures mutual exclusion View Answer Answer: d Explanation: None.
  • 71. 1. What will happen if a non-recursive mutex is locked more than once? a) Starvation b) Deadlock c) Aging d) Signaling View Answer Answer: b Explanation: If a thread which had already locked a mutex, tries to lock the mutex again, it will enter into the waiting list of that mutex, which results in a deadlock. It is because no other thread can unlock the mutex. 2. What is a semaphore? a) is a binary mutex b) must be accessed from only one process c) can be accessed from multiple processes d) none of the mentioned View Answer Answer: c Explanation: None. 3. What are the two kinds of semaphores? a) mutex & counting b) binary & counting c) counting & decimal d) decimal & binary View Answer Answer: b Explanation: None. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 4. What is a mutex? a) is a binary mutex b) must be accessed from only one process c) can be accessed from multiple processes d) none of the mentioned View Answer Answer: b Explanation: None. 5. At a particular time of computation the value of a counting semaphore is 7.Then 20 P operations and 15 V operations were completed on this semaphore. The resulting value of the semaphore is? (GATE 1987) a) 42 b) 2 c) 7 d) 12 View Answer
  • 72. Answer: b Explanation: P represents Wait and V represents Signal. P operation will decrease the value by 1 every time and V operation will increase the value by 1 every time. Get Free Certificate of Merit in Operating System Now! 6. A binary semaphore is a semaphore with integer values ____________ a) 1 b) -1 c) 0.8 d) 0.5 View Answer Answer: a Explanation: None. 7. The following pair of processes share a common variable X. Process A int Y; A1: Y = X*2; A2: X = Y; Process B int Z; B1: Z = X+1; B2: X = Z; X is set to 5 before either process begins execution. As usual, statements within a process are executed sequentially, but statements in process A may execute in any order with respect to statements in process B. How many different values of X are possible after both processes finish executing? a) two b) three c) four d) eight View Answer Answer: c Explanation: Here are the possible ways in which statements from A and B can be interleaved. A1 A2 B1 B2: X = 11 A1 B1 A2 B2: X = 6 A1 B1 B2 A2: X = 10 B1 A1 B2 A2: X = 10 B1 A1 A2 B2: X = 6 B1 B2 A1 A2: X = 12. 8. The program follows to use a shared binary semaphore T. Process A int Y; A1: Y = X*2; A2: X = Y;
  • 73. signal(T); Process B int Z; B1: wait(T); B2: Z = X+1; X = Z; T is set to 0 before either process begins execution and, as before, X is set to 5. Now, how many different values of X are possible after both processes finish executing? a) one b) two c) three d) four View Answer Answer: a Explanation: The semaphore T ensures that all the statements from A finish execution before B begins. So now there is only one way in which statements from A and B can be interleaved: A1 A2 B1 B2: X = 11. 9. Semaphores are mostly used to implement ____________ a) System calls b) IPC mechanisms c) System protection d) None of the mentioned View Answer Answer: b Explanation: None. 10. Spinlocks are intended to provide __________ only. a) Mutual Exclusion b) Bounded Waiting c) Aging d) Progress View Answer Answer: b Explanation: None. 1. The bounded buffer problem is also known as ____________ a) Readers – Writers problem b) Dining – Philosophers problem c) Producer – Consumer problem d) None of the mentioned View Answer
  • 74. Answer: c Explanation: None. 2. In the bounded buffer problem, there are the empty and full semaphores that ____________ a) count the number of empty and full buffers b) count the number of empty and full memory spaces c) count the number of empty and full queues d) none of the mentioned View Answer Answer: a Explanation: None. 3. In the bounded buffer problem ____________ a) there is only one buffer b) there are n buffers ( n being greater than one but finite) c) there are infinite buffers d) the buffer size is bounded View Answer Answer: b Explanation: None. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 4. To ensure difficulties do not arise in the readers – writers problem _______ are given exclusive access to the shared object. a) readers b) writers c) readers and writers d) none of the mentioned View Answer Answer: b Explanation: None. 5. The dining – philosophers problem will occur in case of ____________ a) 5 philosophers and 5 chopsticks b) 4 philosophers and 5 chopsticks c) 3 philosophers and 5 chopsticks d) 6 philosophers and 5 chopsticks View Answer Answer: a Explanation: None. Become Top Ranker in Operating System Now! 6. A deadlock free solution to the dining philosophers problem ____________ a) necessarily eliminates the possibility of starvation b) does not necessarily eliminate the possibility of starvation c) eliminates any possibility of any kind of problem further d) none of the mentioned View Answer Answer: b Explanation: None.
  • 75. 7. All processes share a semaphore variable mutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward. Suppose a process executes in the following manner. signal(mutex); ..... critical section ..... wait(mutex); In this situation : a) a deadlock will occur b) processes will starve to enter critical section c) several processes maybe executing in their critical section d) all of the mentioned View Answer Answer: c Explanation: None. 8. All processes share a semaphore variable mutex, initialized to 1. Each process must execute wait(mutex) before entering the critical section and signal(mutex) afterward. Suppose a process executes in the following manner. wait(mutex); ..... critical section ..... wait(mutex); a) a deadlock will occur b) processes will starve to enter critical section c) several processes maybe executing in their critical section d) all of the mentioned View Answer Answer: a Explanation: None. 9. Consider the methods used by processes P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared boolean variables S1 and S2 are randomly assigned. (GATE 2010) Method used by P1 : while(S1==S2); Critical section S1 = S2; Method used by P2 : while(S1!=S2); Critical section S2 = not(S1); Which of the following statements describes properties achieved? a) Mutual exclusion but not progress
  • 76. b) Progress but not mutual exclusion c) Neither mutual exclusion nor progress d) Both mutual exclusion and progress View Answer Answer: d Explanation: None. 1. A monitor is a type of ____________ a) semaphore b) low level synchronization construct c) high level synchronization construct d) none of the mentioned View Answer Answer: c Explanation: None. 2. 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 View Answer Answer: a Explanation: None. 3. 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 View Answer Answer: d Explanation: None. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. 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 View Answer
  • 77. Answer: a Explanation: None. 5. What are the operations that can be invoked on a condition variable? a) wait & signal b) hold & wait c) signal & hold d) continue & signal View Answer Answer: a Explanation: None. Take Operating System Practice Tests - Chapterwise! Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 6. 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 View Answer Answer: a Explanation: None. 7. 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 View Answer Answer: c Explanation: None. 1. A collection of instructions that performs a single logical function is called ____________ a) transaction b) operation c) function d) all of the mentioned View Answer Answer: a Explanation: None. 2. A terminated transaction that has completed its execution successfully is ____________ otherwise it is __________ a) committed, destroyed b) aborted, destroyed c) committed, aborted
  • 78. d) none of the mentioned View Answer Answer: c Explanation: None. 3. The state of the data accessed by an aborted transaction must be restored to what it was just before the transaction started executing. This restoration is known as ________ of transaction. a) safety b) protection c) roll – back d) revert – back View Answer Answer: c Explanation: None. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 4. Write ahead logging is a way ____________ a) to ensure atomicity b) to keep data consistent c) that records data on stable storage d) all of the mentioned View Answer Answer: d Explanation: None. 5. In the write ahead logging a _____________ is maintained. a) a memory b) a system c) a disk d) a log record View Answer Answer: d Explanation: None. Get Free Certificate of Merit in Operating System Now! 6. An actual update is not allowed to a data item ____________ a) before the corresponding log record is written out to stable storage b) after the corresponding log record is written out to stable storage c) until the whole log record has been checked for inconsistencies d) all of the mentioned View Answer Answer: a Explanation: None. 7. The undo and redo operations must be _________ to guarantee correct behaviour, even if a failure occurs during recovery process. a) idempotent b) easy c) protected
  • 79. d) all of the mentioned View Answer Answer: a Explanation: Idempotent – Multiple executions of an operation have the same result as does one execution. 8. The system periodically performs checkpoints that consists of the following operation(s) ____________ a) Putting all the log records currently in main memory onto stable storage b) putting all modified data residing in main memory onto stable storage c) putting a log record onto stable storage d) all of the mentioned View Answer Answer: d Explanation: None. 9. Consider a transaction T1 that committed prior to checkpoint. The <T1 commits> record appears in the log before the <checkpoint> record. Any modifications made by T1 must have been written to the stable storage either with the checkpoint or prior to it. Thus at recovery time ____________ a) There is a need to perform an undo operation on T1 b) There is a need to perform a redo operation on T1 c) There is no need to perform an undo and redo operation on T1 d) All of the mentioned View Answer Answer: c Explanation: None. 10. Serializable schedules are ones where ____________ a) concurrent execution of transactions is equivalent to the transactions executed serially b) the transactions can be carried out one after the other c) a valid result occurs after execution transactions d) none of the mentioned View Answer Answer: a Explanation: None. 11. A locking protocol is one that ____________ a) governs how locks are acquired b) governs how locks are released c) governs how locks are acquired and released d) none of the mentioned View Answer Answer: c Explanation: None. 12. The two phase locking protocol consists of ____________ a) growing & shrinking phase b) shrinking & creation phase c) creation & growing phase d) destruction & creation phase View Answer
  • 80. Answer: a Explanation: None. 13. The growing phase is a phase in which? a) A transaction may obtain locks, but does not release any b) A transaction may obtain locks, and releases a few or all of them c) A transaction may release locks, but does not obtain any new locks d) A transaction may release locks, and does obtain new locks View Answer Answer: a Explanation: None. 14. The shrinking phase is a phase in which? a) A transaction may obtain locks, but does not release any b) A transaction may obtain locks, and releases a few or all of them c) A transaction may release locks, but does not obtain any new locks d) A transaction may release locks, and does obtain new locks View Answer Answer: c Explanation: None. 15. Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock? I) 2-phase locking II) Timestamp ordering a) I only b) II only c) Both I and II d) Neither I nor II View Answer Answer: b Explanation: None. 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 View Answer Answer: a Explanation: None. 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 View Answer Answer: d Explanation: None.
  • 81. 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 View Answer Answer: a Explanation: None. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 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 View Answer 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 View Answer Answer: a Explanation: None. Take Operating System Mock Tests - Chapterwise! Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 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 View Answer Answer: d Explanation: None. 7. For an effective operating system, when to check for deadlock? a) every time a resource request is made b) at fixed time intervals c) every time a resource request is made at fixed time intervals d) none of the mentioned View Answer Answer: c Explanation: None. 8. A problem encountered in multitasking when a process is perpetually denied necessary resources is called ____________
  • 82. a) deadlock b) starvation c) inversion d) aging View Answer 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 View Answer 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 View Answer Answer: a Explanation: None. 1. The number of resources requested by a process ____________ a) must always be less than the total number of resources available in the system b) must always be equal to the total number of resources available in the system c) must not exceed the total number of resources available in the system d) must exceed the total number of resources available in the system View Answer Answer: c Explanation: None. 2. The request and release of resources are ___________ a) command line statements b) interrupts c) system calls d) special programs View Answer Answer: c Explanation: None. 3. What are Multithreaded programs? a) lesser prone to deadlocks b) more prone to deadlocks c) not at all prone to deadlocks
  • 83. d) none of the mentioned View Answer Answer: b Explanation: Multiple threads can compete for shared resources. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. 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 View Answer Answer: d Explanation: None. 5. 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 View Answer Answer: a Explanation: If another process requests that resource (non – shareable resource), the requesting process must be delayed until the resource has been released. Take Operating System Tests Now! 6. For a Hold and wait condition to prevail ____________ a) A process must be not be holding a resource, but waiting for one to be freed, and then request to acquire it b) A process must be holding at least one resource and waiting to acquire additional resources that are being held by other processes c) A process must hold at least one resource and not be waiting to acquire additional resources d) None of the mentioned View Answer Answer: b Explanation: None. 7. Deadlock prevention is a set of methods ____________ a) to ensure that at least one of the necessary conditions cannot hold b) to ensure that all of the necessary conditions do not hold c) to decide if the requested resources for a process have to be given or not d) to recover from a deadlock View Answer Answer: a Explanation: None. 8. For non sharable resources like a printer, mutual exclusion ____________ a) must exist b) must not exist c) may exist
  • 84. d) none of the mentioned View Answer Answer: a Explanation: A printer cannot be simultaneously shared by several processes. 9. For sharable resources, mutual exclusion ____________ a) is required b) is not required c) may be or may not be required d) none of the mentioned View Answer Answer: b Explanation: They do not require mutually exclusive access, and hence cannot be involved in a deadlock. 10. To ensure that the hold and wait condition never occurs in the system, it must be ensured that ____________ a) whenever a resource is requested by a process, it is not holding any other resources b) each process must request and be allocated all its resources before it begins its execution c) a process can request resources only when it has none d) all of the mentioned View Answer Answer: d Explanation: c – A process may request some resources and use them. Before it can can request any additional resources, however it must release all the resources that it is currently allocated. 11. The disadvantage of a process being allocated all its resources before beginning its execution is ____________ a) Low CPU utilization b) Low resource utilization c) Very high resource utilization d) None of the mentioned View Answer Answer: b Explanation: None. 12. To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it ____________ a) then the process waits for the resources be allocated to it b) the process keeps sending requests until the resource is allocated to it c) the process resumes execution without the resource being allocated to it d) then all resources currently being held are preempted View Answer Answer: d Explanation: None. 13. One way to ensure that the circular wait condition never holds is to ____________ a) impose a total ordering of all resource types and to determine whether one precedes another in the ordering b) to never let a process acquire resources that are held by other processes c) to let a process wait for only one resource at a time
  • 85. d) all of the mentioned View Answer Answer: a Explanation: None. 1. Each request requires that the system consider the _____________ to decide whether the current request can be satisfied or must wait to avoid a future possible deadlock. a) resources currently available b) processes that have previously been in the system c) resources currently allocated to each process d) future requests and releases of each process View Answer Answer: a Explanation: None. 2. Given a priori information about the ________ number of resources of each type that maybe requested for each process, it is possible to construct an algorithm that ensures that the system will never enter a deadlock state. a) minimum b) average c) maximum d) approximate View Answer Answer: c Explanation: None. 3. 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 View Answer Answer: a Explanation: Resource allocation states are used to maintain the availability of the already and current available resources. Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement 4. 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 View Answer
  • 86. Answer: b Explanation: None. 5. 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 View Answer Answer: c Explanation: None. Participate in Operating System Certification Contest of the Month Now! 6. All unsafe states are ____________ a) deadlocks b) not deadlocks c) fatal d) none of the mentioned View Answer Answer: b Explanation: None. 7. A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives. Process P0 P1 P2 Maximum needs (process-wise: P0 through P2 top to bottom) 10 4 9 Currently allocated (process-wise) 5 2 2 Which of the following sequence is a safe sequence? a) P0, P1, P2 b) P1, P2, P0 c) P2, P0, P1 d) P1, P0, P2 View Answer Answer: d Explanation: None. 8. If no cycle exists in the resource allocation graph ____________ a) then the system will not be in a safe state
  • 87. b) then the system will be in a safe state c) all of the mentioned d) none of the mentioned View Answer Answer: b Explanation: None. 9. The resource allocation graph is not applicable to a resource allocation system ____________ a) with multiple instances of each resource type b) with a single instance of each resource type c) single & multiple instances of each resource type d) none of the mentioned View Answer Answer: a Explanation: None. 10. The Banker’s algorithm is _____________ than the resource allocation graph algorithm. a) less efficient b) more efficient c) equal d) none of the mentioned View Answer Answer: a Explanation: None. 11. The data structures available in the Banker’s algorithm are ____________ a) Available b) Need c) Allocation d) All of the mentioned View Answer Answer: d Explanation: None. 12. The content of the matrix Need is ____________ a) Allocation – Available b) Max – Available c) Max – Allocation d) Allocation – Max View Answer Answer: c Explanation: None. 13. A system with 5 processes P0 through P4 and three resource types A, B, C have A with 10 instances, B with 5 instances, and C with 7 instances. At time t0, the following snapshot has been taken: Process P0 P1 P2
  • 88. P3 P4 Allocation (process-wise : P0 through P4 top TO bottom) A B C 0 1 0 2 0 0 3 0 2 2 1 1 0 0 2 MAX (process-wise: P0 through P4 top TO bottom) A B C 7 5 3 3 2 2 9 0 2 2 2 2 4 3 3 Available A B C 3 3 2 The sequence <P1, P3, P4, P2, P0> leads the system to ____________ a) an unsafe state b) a safe state c) a protected state d) a deadlock View Answer Answer: b Explanation: None. 1. The wait-for graph is a deadlock detection algorithm that is applicable when ____________ a) all resources have a single instance b) all resources have multiple instances c) all resources have a single 7 multiple instances d) all of the mentioned View Answer
  • 89. Answer: a Explanation: None. 2. An edge from process Pi to Pj in a wait for graph indicates that ____________ a) Pi is waiting for Pj to release a resource that Pi needs b) Pj is waiting for Pi to release a resource that Pj needs c) Pi is waiting for Pj to leave the system d) Pj is waiting for Pi to leave the system View Answer Answer: a Explanation: None. 3. If the wait for graph contains a cycle ____________ a) then a deadlock does not exist b) then a deadlock exists c) then the system is in a safe state d) either deadlock exists or system is in a safe state View Answer Answer: b Explanation: None. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. If deadlocks occur frequently, the detection algorithm must be invoked ________ a) rarely b) frequently c) rarely & frequently d) none of the mentioned View Answer Answer: b Explanation: None. 5. What is the disadvantage of invoking the detection algorithm for every request? a) overhead of the detection algorithm due to consumption of memory b) excessive time consumed in the request to be allocated memory c) considerable overhead in computation time d) all of the mentioned View Answer Answer: c Explanation: None. Take Operating System Practice Tests - Chapterwise! Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 6. A deadlock eventually cripples system throughput and will cause the CPU utilization to ______ a) increase b) drop c) stay still d) none of the mentioned View Answer Answer: b Explanation: None.
  • 90. 7. Every time a request for allocation cannot be granted immediately, the detection algorithm is invoked. This will help identify ____________ a) the set of processes that have been deadlocked b) the set of processes in the deadlock queue c) the specific process that caused the deadlock d) all of the mentioned View Answer Answer: a Explanation: None. 8. A computer system has 6 tape drives, with ‘n’ processes competing for them. Each process may need 3 tape drives. The maximum value of ‘n’ for which the system is guaranteed to be deadlock free is? a) 2 b) 3 c) 4 d) 1 View Answer Answer: a Explanation: None. 9. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock ____________ a) can never occur b) may occur c) has to occur d) none of the mentioned View Answer Answer: a Explanation: None. 10. ‘m’ processes share ‘n’ resources of the same type. The maximum need of each process doesn’t exceed ‘n’ and the sum of all their maximum needs is always less than m+n. In this setup, deadlock ____________ a) can never occur b) may occur c) has to occur d) none of the mentioned View Answer Answer: a Explanation: None. 1. A deadlock can be broken by ____________ a) abort one or more processes to break the circular wait b) abort all the process in the system c) preempt all resources from all processes d) none of the mentioned View Answer
  • 91. Answer: a Explanation: None. 2. The two ways of aborting processes and eliminating deadlocks are ____________ a) Abort all deadlocked processes b) Abort all processes c) Abort one process at a time until the deadlock cycle is eliminated d) All of the mentioned View Answer Answer: c Explanation: None. 3. Those processes should be aborted on occurrence of a deadlock, the termination of which? a) is more time consuming b) incurs minimum cost c) safety is not hampered d) all of the mentioned View Answer Answer: b Explanation: None. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. 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 View Answer Answer: d Explanation: None. 5. Cost factors for process termination include ____________ a) Number of resources the deadlock process is not holding b) CPU utilization at the time of deadlock c) Amount of time a deadlocked process has thus far consumed during its execution d) All of the mentioned View Answer Answer: c Explanation: None. Check this: Computer Science MCQs | Computer Science Books 6. 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 View Answer
  • 92. Answer: b Explanation: None. 7. To _______ to a safe state, the system needs to keep more information about the states of processes. a) abort the process b) roll back the process c) queue the process d) none of the mentioned View Answer Answer: b Explanation: None. 8. If the resources are always preempted from the same process __________ can occur. a) deadlock b) system crash c) aging d) starvation View Answer Answer: d Explanation: None. 9. What is the solution to starvation? a) the number of rollbacks must be included in the cost factor b) the number of resources must be included in resource preemption c) resource preemption be done instead d) all of the mentioned View Answer Answer: a Explanation: None. 1. If one or more devices use a common set of wires to communicate with the computer system, the connection is called ______ a) CPU b) Monitor c) Wirefull d) Bus View Answer Answer: d Explanation: None. 2. A ____ a set of wires and a rigidly defined protocol that specifies a set of messages that can be sent on the wires. a) port b) node c) bus d) none of the mentioned View Answer
  • 93. Answer: c Explanation: None. 3. When device A has a cable that plugs into device B, and device B has a cable that plugs into device C and device C plugs into a port on the computer, this arrangement is called a _________ a) port b) daisy chain c) bus d) cable View Answer Answer: b Explanation: None. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. The _________ present a uniform device-access interface to the I/O subsystem, much as system calls provide a standard interface between the application and the operating system. a) Devices b) Buses c) Device drivers d) I/O systems View Answer Answer: c Explanation: None. 5. A ________ is a collection of electronics that can operate a port, a bus, or a device. a) controller b) driver c) host d) bus View Answer Answer: a Explanation: None. Take Operating System Practice Tests - Chapterwise! Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 6. An I/O port typically consists of four registers status, control, ________ and ________ registers. a) system in, system out b) data in, data out c) flow in, flow out d) input, output View Answer Answer: b Explanation: None. 7. The ______ register is read by the host to get input. a) flow in b) flow out c) data in
  • 94. d) data out View Answer Answer: c Explanation: None. 8. The ______ register is written by the host to send output. a) status b) control c) data in d) data out View Answer Answer: d Explanation: None. 9. The hardware mechanism that allows a device to notify the CPU is called _______ a) polling b) interrupt c) driver d) controlling View Answer Answer: b Explanation: None. 10. The CPU hardware has a wire called __________ that the CPU senses after executing every instruction. a) interrupt request line b) interrupt bus c) interrupt receive line d) interrupt sense line View Answer Answer: a Explanation: None. 11. The _________ determines the cause of the interrupt, performs the necessary processing and executes a return from the interrupt instruction to return the CPU to the execution state prior to the interrupt. a) interrupt request line b) device driver c) interrupt handler d) all of the mentioned View Answer Answer: c Explanation: None. 12. In general the two interrupt request lines are ____________ a) maskable & non maskable interrupts b) blocked & non maskable interrupts c) maskable & blocked interrupts d) none of the mentioned View Answer Answer: a Explanation: None.
  • 95. 13. The _________ are reserved for events such as unrecoverable memory errors. a) non maskable interrupts b) blocked interrupts c) maskable interrupts d) none of the mentioned View Answer Answer: a Explanation: None. 1. The ________ can be turned off by the CPU before the execution of critical instruction sequences that must not be interrupted. a) nonmaskable interrupt b) blocked interrupt c) maskable interrupt d) none of the mentioned View Answer Answer: c Explanation: None. 2. The __________ is used by device controllers to request service. a) nonmaskable interrupt b) blocked interrupt c) maskable interrupt d) none of the mentioned View Answer Answer: c Explanation: None. 3. The interrupt vector contains ____________ a) the interrupts b) the memory addresses of specialized interrupt handlers c) the identifiers of interrupts d) the device addresses View Answer Answer: b Explanation: None. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. Division by zero, accessing a protected or non existent memory address, or attempting to execute a privileged instruction from user mode are all categorized as ________ a) errors b) exceptions c) interrupt handlers d) all of the mentioned View Answer
  • 96. Answer: b Explanation: None. 5. For large data transfers, _________ is used. a) dma b) programmed I/O c) controller register d) none of the mentioned View Answer Answer: a Explanation: None. Check this: BCA MCQs | Operating System Books 6. A character stream device transfers ____________ a) bytes one by one b) block of bytes as a unit c) with unpredictable response times d) none of the mentioned View Answer Answer: a Explanation: None. 7. A block device transfers ____________ a) bytes one by one b) block of bytes as a unit c) with unpredictable response times d) none of the mentioned View Answer Answer: b Explanation: None. 8. What is a dedicated device? a) opposite to a sharable device b) same as a sharable device c) can be used concurrently by several processes d) none of the mentioned View Answer Answer: a Explanation: None. 9. A keyboard is an example of a device that is accessed through a __________ interface. a) block stream b) set of blocks c) character stream d) none of the mentioned View Answer Answer: c Explanation: None. 10. In polling ____________ a) busy – wait cycles wait for I/O from device b) interrupt handler receives interrupts
  • 97. c) interrupt-request line is triggered by I/O device d) all of the mentioned View Answer Answer: a Explanation: None. 11. A non blocking system call _________________ a) halts the execution of the application for an extended time b) does not halt the execution of the application c) does not block the interrupts d) none of the mentioned View Answer Answer: b Explanation: None. 12. An asynchronous call ____________ a) returns immediately, without waiting for the I/O to complete b) does not return immediately and waits for the I/O to complete c) consumes a lot of time d) is too slow View Answer Answer: a Explanation: None. 1. Buffering is done to ____________ a) cope with device speed mismatch b) cope with device transfer size mismatch c) maintain copy semantics d) all of the mentioned View Answer Answer: d Explanation: None. 2. Caching is ________ spooling. a) same as b) not the same as c) all of the mentioned d) none of the mentioned View Answer Answer: b Explanation: None. 3. Caching ____________ a) holds a copy of the data b) is fast memory c) holds the only copy of the data d) holds output for a device View Answer Answer: a Explanation: None.
  • 98. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. Spooling ____________ a) holds a copy of the data b) is fast memory c) holds the only copy of the data d) holds output for a device View Answer Answer: c Explanation: None. 5. The ________ keeps state information about the use of I/O components. a) CPU b) OS c) kernel d) shell View Answer Answer: c Explanation: None. Check this: Computer Science MCQs | Operating System Books 6. The kernel data structures include ____________ a) process table b) open file table c) close file table d) all of the mentioned View Answer Answer: b Explanation: None. 7. Windows NT uses a __________ implementation for I/O. a) message – passing b) draft – passing c) secondary memory d) cache View Answer Answer: a Explanation: None. 8. A ________ is a full duplex connection between a device driver and a user level process. a) Bus b) I/O operation c) Stream d) Flow View Answer Answer: c Explanation: None. 9. I/O is a _________ in system performance. a) major factor
  • 99. b) minor factor c) does not matter d) none of the mentioned View Answer Answer: a Explanation: None. 10. If the number of cycles spent busy – waiting is not excessive, then ____________ a) interrupt driven I/O is more efficient than programmed I/O b) programmed I/O is more efficient than interrupt driven I/O c) both programmed and interrupt driven I/O are equally efficient d) none of the mentioned View Answer Answer: b Explanation: None. 1. In real time operating system ____________ a) all processes have the same priority b) a task must be serviced by its deadline period c) process scheduling can be done only once d) kernel is not required View Answer Answer: b Explanation: None. 2. Hard real time operating system has ______________ jitter than a soft real time operating system. a) less b) more c) equal d) none of the mentioned View Answer Answer: a Explanation: Jitter is the undesired deviation from the true periodicity. 3. For real time operating systems, interrupt latency should be ____________ a) minimal b) maximum c) zero d) dependent on the scheduling View Answer Answer: a Explanation: Interrupt latency is the time duration between the generation of interrupt and execution of its service. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. In rate monotonic scheduling ____________ a) shorter duration job has higher priority b) longer duration job has higher priority
  • 100. c) priority does not depend on the duration of the job d) none of the mentioned View Answer Answer: a Explanation: None. 5. In which scheduling certain amount of CPU time is allocated to each process? a) earliest deadline first scheduling b) proportional share scheduling c) equal share scheduling d) none of the mentioned View Answer Answer: b Explanation: None. Check this: Computer Science MCQs | BCA MCQs 6. The problem of priority inversion can be solved by ____________ a) priority inheritance protocol b) priority inversion protocol c) both priority inheritance and inversion protocol d) none of the mentioned View Answer Answer: a Explanation: None. 7. Time duration required for scheduling dispatcher to stop one process and start another is known as ____________ a) process latency b) dispatch latency c) execution latency d) interrupt latency View Answer Answer: b Explanation: None. 8. Time required to synchronous switch from the context of one thread to the context of another thread is called? a) threads fly-back time b) jitter c) context switch time d) none of the mentioned View Answer Answer: c Explanation: None. 9. Which one of the following is a real time operating system? a) RTLinux b) VxWorks c) Windows CE d) All of the mentioned View Answer Answer: d Explanation: None.
  • 101. 10. VxWorks is centered around ____________ a) wind microkernel b) linux kernel c) unix kernel d) none of the mentioned View Answer Answer: a Explanation: None. 1. What is the disadvantage of real addressing mode? a) there is a lot of cost involved b) time consumption overhead c) absence of memory protection between processes d) restricted access to memory locations by processes View Answer Answer: c Explanation: None. 2. Preemptive, priority based scheduling guarantees ____________ a) hard real time functionality b) soft real time functionality c) protection of memory d) none of the mentioned View Answer Answer: b Explanation: None. 3. Real time systems must have ____________ a) preemptive kernels b) non preemptive kernels c) preemptive kernels or non preemptive kernels d) neither preemptive nor non preemptive kernels View Answer Answer: a Explanation: None. Note: Join free Sanfoundry classes at Telegram or Youtube advertisement 4. What is Event latency? a) the amount of time an event takes to occur from when the system started b) the amount of time from the event occurrence till the system stops c) the amount of time from event occurrence till the event crashes d) the amount of time that elapses from when an event occurs to when it is serviced. View Answer Answer: d Explanation: None. 5. Interrupt latency refers to the period of time ____________ a) from the occurrence of an event to the arrival of an interrupt b) from the occurrence of an event to the servicing of an interrupt c) from arrival of an interrupt to the start of the interrupt service routine
  • 102. d) none of the mentioned View Answer Answer: c Explanation: None. Take Operating System Tests Now! 6. Real time systems need to __________ the interrupt latency. a) minimize b) maximize c) not bother about d) none of the mentioned View Answer Answer: a Explanation: None. 7. The amount of time required for the scheduling dispatcher to stop one process and start another is known as ______________ a) event latency b) interrupt latency c) dispatch latency d) context switch View Answer Answer: c Explanation: None. 8. The most effective technique to keep dispatch latency low is to ____________ a) provide non preemptive kernels b) provide preemptive kernels c) make it user programmed d) run less number of processes at a time View Answer Answer: b Explanation: None. 9. Priority inversion is solved by use of _____________ a) priority inheritance protocol b) two phase lock protocol c) time protocol d) all of the mentioned View Answer Answer: a Explanation: None. 1. In a real time system the computer results ____________ a) must be produced within a specific deadline period b) may be produced at any time c) may be correct d) all of the mentioned View Answer
  • 103. Answer: a Explanation: None. 2. In a safety critical system, incorrect operation ____________ a) does not affect much b) causes minor problems c) causes major and serious problems d) none of the mentioned View Answer Answer: c Explanation: None. 3. Antilock brake systems, flight management systems, pacemakers are examples of ____________ a) safety critical system b) hard real time system c) soft real time system d) safety critical system and hard real time system View Answer Answer: d Explanation: None. Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now! advertisement 4. In a ______ real time system, it is guaranteed that critical real time tasks will be completed within their deadlines. a) soft b) hard c) critical d) none of the mentioned View Answer Answer: b Explanation: None. 5. Some of the properties of real time systems include ____________ a) single purpose b) inexpensively mass produced c) small size d) all of the mentioned View Answer Answer: d Explanation: None. Check this: Computer Science Books | Computer Science MCQs 6. The amount of memory in a real time system is generally ____________ a) less compared to PCs b) high compared to PCs c) same as in PCs d) they do not have any memory View Answer
  • 104. Answer: a Explanation: None. 7. What is the priority of a real time task? a) must degrade over time b) must not degrade over time c) may degrade over time d) none of the mentioned View Answer Answer: b Explanation: None. 8. Memory management units ____________ a) increase the cost of the system b) increase the power consumption of the system c) increase the time required to complete an operation d) all of the mentioned View Answer Answer: d Explanation: None. 9. The technique in which the CPU generates physical addresses directly is known as ____________ a) relocation register method b) real addressing c) virtual addressing d) none of the mentioned View Answer Answer: b Explanation: None. 1. Earliest deadline first algorithm assigns priorities according to ____________ a) periods b) deadlines c) burst times d) none of the mentioned View Answer advertisement 2. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35. The total CPU utilization is ____________ a) 0.90 b) 0.74 c) 0.94 d) 0.80 View Answer
  • 105. 3. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35., the priorities of P1 and P2 are? a) remain the same throughout b) keep varying from time to time c) may or may not be change d) none of the mentioned View Answer Note: Join free Sanfoundry classes at Telegram or Youtube advertisement advertisement 4. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35., can the two processes be scheduled using the EDF algorithm without missing their respective deadlines? a) Yes b) No c) Maybe d) None of the mentioned View Answer 5. Using EDF algorithm practically, it is impossible to achieve 100 percent utilization due to __________ a) the cost of context switching b) interrupt handling c) power consumption d) all of the mentioned View Answer Take Operating System Practice Tests - Chapterwise! Start the Test Now: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 advertisement 6. T shares of time are allocated among all processes out of N shares in __________ scheduling algorithm. a) rate monotonic b) proportional share c) earliest deadline first d) none of the mentioned View Answer 7. If there are a total of T = 100 shares to be divided among three processes, A, B and C. A is assigned 50 shares, B is assigned 15 shares and C is assigned 20 shares. A will have ______ percent of the total processor time.
  • 106. a) 20 b) 15 c) 50 d) none of the mentioned View Answer advertisement 8. If there are a total of T = 100 shares to be divided among three processes, A, B and C. A is assigned 50 shares, B is assigned 15 shares and C is assigned 20 shares. B will have ______ percent of the total processor time. a) 20 b) 15 c) 50 d) none of the mentioned View Answer 9. If there are a total of T = 100 shares to be divided among three processes, A, B and C. A is assigned 50 shares, B is assigned 15 shares and C is assigned 20 shares. C will have ______ percent of the total processor time. a) 20 b) 15 c) 50 d) none of the mentioned View Answer advertisement 10. If there are a total of T = 100 shares to be divided among three processes, A, B and C. A is assigned 50 shares, B is assigned 15 shares and C is assigned 20 shares. If a new process D requested 30 shares, the admission controller would __________ a) allocate 30 shares to it b) deny entry to D in the system c) all of the mentioned d) none of the mentioned View Answer
  • 107. 1. To schedule the processes, they are considered _________ a) infinitely long b) periodic c) heavy weight d) light weight View Answer advertisement 2. If the period of a process is ‘p’, then what is the rate of the task? a) p2 b) 2*p c) 1/p d) p View Answer 3. The scheduler admits a process using __________ a) two phase locking protocol b) admission control algorithm c) busy wait polling d) none of the mentioned View Answer Subscribe Now: Operating System Newsletter | Important Subjects Newsletters advertisement advertisement 4. The ____________ scheduling algorithm schedules periodic tasks using a static priority policy with preemption. a) earliest deadline first b) rate monotonic c) first cum first served d) priority View Answer 5. Rate monotonic scheduling assumes that the __________ a) processing time of a periodic process is same for each CPU burst b) processing time of a periodic process is different for each CPU burst c) periods of all processes is the same d) none of the mentioned View Answer Become Top Ranker in Operating System Now! advertisement
  • 108. 6. In rate monotonic scheduling, a process with a shorter period is assigned __________ a) a higher priority b) a lower priority c) higher & lower priority d) none of the mentioned View Answer 7. There are two processes P1 and P2, whose periods are 50 and 100 respectively. P1 is assigned higher priority than P2. The processing times are t1 = 20 for P1 and t2 = 35 for P2. Is it possible to schedule these tasks so that each meets its deadline using Rate monotonic scheduling? a) yes b) no c) maybe d) none of the mentioned View Answer advertisement 8. If a set of processes cannot be scheduled by rate monotonic scheduling algorithm, then __________ a) they can be scheduled by EDF algorithm b) they cannot be scheduled by EDF algorithm c) they cannot be scheduled by any other algorithm d) none of the mentioned View Answer 9. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35. The total CPU utilization is? a) 0.90 b) 0.74 c) 0.94 d) 0.80 View Answer advertisement 10. A process P1 has a period of 50 and a CPU burst of t1 = 25, P2 has a period of 80 and a CPU burst of 35. Can the processes be scheduled without missing the deadlines? a) Yes b) No c) Maybe d) None of the mentioned View Answer