TOP asked 1000 MCQs on Operating System (Chapterwise).



What is an operating system?

a) interface between the hardware and application programs
b) collection of programs that manages hardware resources
c) system service provider to the application programs
d) all of the mentioned

Answer: d

(ads1)

What is the main function of the command interpreter?
a) to provide the interface between the API and application program
b) to handle the files in the operating system
c) to get and execute the next user-specified command
d) none of the mentioned

3. In Operating Systems, which of the following is/are CPU scheduling algorithms?

a) Priority
b) Round Robin
c) Shortest Job First
d) All of the mentioned


Answer: d


Known More About Solar panel

(ads1)




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

(ads1)


All of these scheduling algorithms have their own advantages and disadvantages.

4. To access the services of the operating system, the interface is provided by the ___________

a) Library b) System calls    c) Assembly instructions   d) API



Answer: b



CPU scheduling is the basis of ___________

a) multiprogramming operating systems 
b) larger memory-sized systems 
c) multiprocessor systems
d) none of the mentioned
Answer: a


(ads1)




Identify false Statements

(a) You can find deleted files in recycle bin
(b) You can restore any files in recycle bin if you ever need
(c) You can increase the free space of the disk by sending files to recycle bin.
(d) You can right-click and choose Empty Recycle Bin to clean it.
Answer: c


Which one of the following is not true?

a) kernel remains in the memory during the entire computer session
b) kernel is made of various modules which can not be loaded in running operating system
c) kernel is the first part of the operating system to load into memory during booting
d) kernel is the program that constitutes the central core of the operating system

Answer: b

Process management: This includes topics such as process scheduling, process synchronization, and inter-process communication.

Memory management: This includes topics such as virtual memory, paging, and segmentation.

File systems: This includes topics such as file organization, file access methods, and file sharing.

Input/output (I/O) management: This includes topics such as device drivers, buffering, and spooling.

Security and protection: This includes topics such as access control, authentication, and encryption.

Distributed systems: This includes topics such as network protocols, distributed file systems, and distributed databases.

Multiprocessor systems: This includes topics such as shared memory, distributed memory, and interprocessor communication.

Real-time systems: This includes topics such as real-time scheduling, real-time operating systems, and real-time databases.

Operating system design and implementation: This includes topics such as kernel design, system calls, and system-level programming.

I hope this general outline helps you in preparing for your MCQs on Operating Systems.

================================================

Which one of the following is a real-time operating system?

(a) RTLinux   (b) VxWorks  (c) Windows CE   (d) All of the mentioned


Answer: D


(ads1)

Which one of the following errors will be handled by the operating system?
a) lack of paper in printer   b) connection failure in the network
c) power failure   d) all of the mentioned

Answer: d




The operating system keeps a small table containing information about all open files called ____________
(a) system table  (b) open-file table
(c) file table   (d) directory table

Answer: B



Where is the operating system placed in the memory?

a) either low or high memory (depending on the location of interrupt vector)

b) in the low memory      c) in the high memory      d) none of the mentioned

Answer: a

(ads1)

Two operating modes of AT are__________
(a) Direct mode, indirect mode     (b) Virtual mode, dedicated mode
(c) Private mode, public mode    (d) Real mode, protected mode

Answer: D


If a process fails, most operating systems write the error information to a ______

a) new file         b) another running process
c) log file    d) none of the mentioned

Answer: c

ThrowCardsFastCardThrowing

For real time operating systems, interrupt latency should be____________

(a) minimal             (b) maximum            (c) zero        (d) dependent on the scheduling

Answer: A



Which one of the following is not a real-time operating system?

a) RTLinux      b) Palm OS     c) QNX  d) VxWorks
Answer: b

(ads1)


The operating system _______ the links when traversing 
directory trees, to preserve the acyclic structure of the system.
(a) considers        (b) ignores        (c) deletes      (d) none of the mentioned

Answer: B


What does OS X have?     
  a) monolithic kernel with modules        b) microkernel
c) monolithic kernel     d) hybrid kernel


Answer: d

Network operating system runs on___________
(a) server           (b) every system in the network
(c) both server and every system in the network        (d) none of the mentioned


Answer: A

In operating system, each process has its own __________

a) open files    b) pending alarms, signals, and signal handlers    c) address space and global variables    
d) all of the mentioned


Answer: d

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
Answer: D


In a timeshare operating system, when the time slot a
ssigned to a process is completed, the process    switches from the current state to?
a) Suspended state                      b) Terminated state
c) Ready state                                       d) Blocked state

Answer: c



The two steps the operating system takes 
 to use a disk to hold its files are _______ and ________
(a) partitioning & logical formatting                   (b) swap space creation & caching
(c) caching & logical formatting                                        (d) logical formatting & swap space creation


Answer: A


Cascading termination refers to the termination 
of all child processes if the parent process terminates ______
a) Normally or abnormally                  b) Abnormally
c) Normally                                                                                                                       d) None of the mentioned


(ads1)


Answer: a


New Ola S1 Gen Read More

. To access the services of the operating system, the interface is provided by the___________
(a) System calls
(b) API
(c) Library
(d) Assembly instructions


Answer: A


The main memory accommodates ____________

a) CPU

b) user processes

c) operating system

d) all of the mentioned



Answer: c
(ads1)

 Oprating system  imp set 


Which one of the following errors will be handled by the operating system?

(a) power failure
(b) lack of paper in the printer
(c) connection failure in the network
(d) all of the mentioned

Answer: D

It is a set of instructions that controls the data, data storage and information.

(a) CPU

(b) Operating System

(c) Monitor

(d) Both A and B

Answer: B





The operating system is responsible for?

a) bad-block recovery

b) booting from disk

c) disk initialization

d) all of the mentioned



Answer: d

What is the name of the operating system that reads and reacts in terms of actual time?

(a) Real-time system
(b) Time sharing system
(c) Quick response system
(d) Batch system


Answer: A



The systems which allows only one process execution at a time, are called__________

(a) uni-programming systems

(b) uni-processing systems

(c) uni-tasking systems

(d) none of the mentioned 

Answer: A 



Ivi Rein Biography Age  read more 

. The operating system and the other processes are protected from being modified by an already running process because ____________

a) every address generated by the CPU is being checked against the relocation and limit registers

b) they have a protection algorithm

c) they are in different memory spaces

d) they are in different logical addresses


Answer: a

(ads1)
Which of the following Operating systems does not implement multitasking truly?

(a) Windows 98

(b) Windows NT

(c) Windows XP

(d) MS-DOS

Answer: D 


. 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

Answer: D


Who is called a supervisor of computer activity?

(a) Memory

(b) Operating System

(c) I/O Devices

(d) Control Unit

Answer: B 


(ads1)

Using transient code, _______ the size of the operating system during program execution.

a) maintains

b) changes

c) increases

d) decreases

Answer: b


A multiprocessing operating system cannot be implemented on hardware that does not support

(a) Address Translation

(b) DAM for disk transfer

(c) Demand paging

(d) All of the above

Answer: A 



Operating system is a collection of_____________
(a) Software routines
(b) Input-output devices
(c) Hardware components
d) All of these
Answer: A

(ads1)
Which is not the function of the Operating System?

(a) Memory management

(c) Disk management

(c) Application management

(d) Virus Protection

Answer: D 



Where is the operating system placed in the memory?
(a) in the low memory
(b) in the high memory
c) either low or high memory (depending on the location of the interrupt vector)
(d) none of the mentioned


Answer: C


Command Interpreter is also known as___________

(a) Prompt

(b) Shell

(c) Command

(d) DOS Prompt

Answer: B .

(ads1)


 The operating system maintains a ______ table that keeps track of how many frames have been allocated, how many are there, and how many are available.

a) memory

b) mapping

c) page

d) frame




Answer: d



 In a resident- OS computer, which of the following system software must reside in the main memory under all situations?

(a) Assembler

(b) Linker

(c) Loader

(d) Compiler

Answer: C 


(ads1)
Which of the following Is not a part of the operating system?
(a) Input/output control program
(b) Job control program
(c) Supervisor
(d) Performance monitor
Answer: D


Which one of the following is not true?

(a) the kernel is the program that constitutes the central core of the operating system

(b) the kernel is the first part of the operating system to load into memory during booting

(c) the 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 

Answer: C 

Backlink:= If you have a neck bin then I will give a best solution read more 

Which one of the following is not a real-time operating system?

(a) VxWorks

(b) Windows CE

(c) RTLinux

(d) Palm OS

Answer : D 

 To obtain better memory utilization, dynamic loading is used. With dynamic loading, a routine is not loaded until it is called. For implementing dynamic loading ____________

a) special support from the operating system is essential

b) special support from hardware is required
c) user programs can implement dynamic loading without any special support from hardware or operating system
d) special support from both hardware and operating system is essential

Answer: c




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

Answer: D



By operating system, the resource management can be done via_________

(a) time division multiplexing

(b) space division multiplexing

(c) both (a) and (b)

(d) none of the mentioned

Answer: C 


+The _________ presents 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) Device drivers

b) I/O systems

c) Devices

d) Buses


Answer: a



Selection of an operating system is known as___________

(a) Site selection

(b) Product selection

(c) Process selection

(d) Equipment selection 

Answer: C 



+. In real time operating system ____________

a) process scheduling can be done only once

b) all processes have the same priority

c) kernel is not required

d) a task must be serviced by its deadline period


Answer: d



Booting means___________

(a) Restarting the computer

(b) Installing the program

(c) Removing errors

(d) Switch off

Answer: A 

Which of the following is a single-user operating system?

(a) MAC
(b) Ms-Dos
(c) Windows
(d) None of the above

Answer: B 



Hard real time operating system has ______________ jitter than a soft real time operating system.
a) equal
b) more
c) less
d) none of the mentioned

Answer: c



Example of open source operating system is____________

(a) Linux

(b) Windows

(c) Android

(d) DOS

Answer: A 




When was the first operating system developed?
(a) 1948
b 1949
c) 1950
(d) 1951
Answer: C


MS DOS is an example of___________

(a) GUI

(b) CUI

(c) GIF

(d) TIFF

Answer: B



 For real time operating systems, interrupt latency should be ____________

a) zero

b) minimal

c) maximum

d) dependent on the scheduling

 
Answer: b



Linux, Windows, etc are the examples__________

(a) CUI

(b) GUI

(c) GIF

(d) None of these

Answer : B



International men's Day do you know about



. Which one of the following is a real-time operating system?

a) Windows CE

b) RTLinux

c) VxWorks

d) All of the mentioned

Answer: d


In …………….. the graphic objects help the user to communicate with the computer.

(a) URL

(b) GIF

(c) CUI

(d) GUI

Answer: D



Which of the following is not an operating system?
(a) Windows
(b) Linux
(c) Oracle
(d) DOS

Answer: C


The abbreviation of CUI____________

(a) Chat Uniformly Interchange

(b) Character User Interface

(c) Consider Unlisted Information

(d) Checking Unlimited Information

Answer: B





The priority of a process will ______________ if the scheduler assigns it a static priority.

a) depends on the operating system

b) change

c) remain unchanged

d) none of the mentioned

Answer: c



GUI stands for____________

(a) Graphics User Interface

(b) Graphical User Interchange

(c) Graphics User Interchange

(d) Graphical User Interface

Answer: A




In real time operating system is__________
(a) the kernel is not required
(b) process scheduling can be done only once the task
(c) must be serviced by its deadline period
(d) all processes have the same priority

Answer : C


Linux and Windows are the two types of_______________

(a) Input/output devices

(b) Protocols

(c) Sequential access memory

(d) Operating systems

Answer: D

.


What are the characteristics of Host-based IDS?

a) Logs are analysed to detect tails of intrusion
b) The host operating system logs in the audit information
c) Logs include logins, the file opens, and program executions
d) All of the mentioned

Answer: d


DOS stands for__________________

(a) Disk Operating System

(b) Direct Operating System

(c) Deleted Operating System

(d) Both A and B

Answer: A


This operating system was developed by an American company Microsoft_____________

(a) MS Office

(b) Windows

(c) Linux

(d) Unix

Answer: B

In Real-time Operating systems are________
(a) Primarily used on mainframe computers
(b) Used for monitoring events as they occur
(c) Used for program development
(d) Used for real-time interactive users
Answer : B



Linux Operating System was developed by________

(a) Charles Babbage

(b) Bill Gates

(c) Tim Berners Lee

(d) Linus Torvalds.

Answer: D


What are the characteristics of stack-based IDS?

a) It is programmed to interpret a certain series of packets
b) It models the normal usage of the network as a noise characterization

c) They are integrated closely with the TCP/IP stack and watch packets

d) The host operating system logs in the audit information



Answer: c




When the System processes data instructions without any delay is called as________________





(a) online system
(b) real-time system
(c) instruction system
(d) offline system

Answer: B



The abbreviation of OS is_____________

(a) Our Solution

(b) One’s Safety

(c) Operating System

(d) Other’s Security


Answer: C




 If the sum of the working–set sizes increases, exceeding the total number of available frames ____________

a) the operating system selects a process to suspend

b) the system crashes

c) then the process crashes

d) the memory overflows

Answer: a


The operating system is resident in memory of which part?
(a) Middle
(B) Lower
(C) Upper
(D) All of these

Answer: C

Understanding student loans and Loans.com: Exploring the Way to Instruction



The function of Operating System is_____________

(a) To get the information as input

(b) To display the result as output

(c) To manage and control all the parts of the computer

(d) All of these

Answer: D 


 New basic heroin tricks about Iphone  

When a process is in a “Blocked” state waiting for some I/O service. When the service is completed, it goes to the __________

a) Terminated state
b) Suspended state
c) Running state
d) Ready state

 Answer: d


There is a need to remember the commands and the grammar of these commands thoroughly in_____________

(a) CUI
(b) GUI) GIF
(d) Both A and C
Answer: A

UNIX operating system__________
(a) can run on PCs and larger system
(b) is multitasking
(c) is multiuser
(d) all of these

Answer: D



Transient operating system code is a code that ____________

a) stays in the memory always
b) never enters the memory space
c) comes and goes as needed
d) is not easily accessible

answer: c


2\77. Example of open source operating system is__________

(a) Linux
(b) Windows
(c) Android
(d) DOS
Answer: A

GUI and CUI are the two types of____________
(a) Operating System
(b) Hardware
(c) Text
(d) Interface

Answer: D

*7. The information about all files is kept in ____________

a) operating system

b) separate directory structure

c) swap space

d) none of the mentioned

Answer: b



Which of the following is a database of information about the windows operating system including customized settings and software installations?

(a) Registry
(b) Changelog
(c) Performance Monitor
(d) None of the above

Answer: A


The operating system keeps a small table containing information about all open files called ____________

a) file table

b) directory table

c) open-file table

d) system table

Answer: c


An operating system that can do multitasking means that__________
(a) The OS can divide up work between several CPUs.
(b) Several programs can be operated concurrently
(c) Multiple people can use the computer concurrently
(d) All of the above


Answer: B

=====================================================

. What will happen in the single-level directory?
a) All files are contained in the same directory
b) All files are contained in different directories all at the same level
c) Depends on the operating system
d) None of the mentioned
Answer: a

=====================================================

The desktop operating system is also called a___________
(a) Single-user operating system
(b) Client operating system
(c) Multi-user operating system
(d) Embedded operating system

Answer: B



=====================================================


The systems which allow only one process execution at a time, are called as____________
(a) Uniprogramming systems
(b) Uniprocessing systems
(c) Unitasking systems
(d) None of the mentioned


Answer: B


=====================================================

The operating system _______ the links when traversing directory trees, to preserve the acyclic structure of the system.

a) deletes
b) considers
c) ignores
d) none of the mentioned


Answer: c

=====================================================

46. In SCSI disks used in high-end PCs, the controller maintains a list of _________ on the disk. The disk is initialized during ________ formatting which sets aside spare sectors not visible to the operating system.

a) destroyed blocks, partitioning

b) bad blocks, low-level formatting

c) destroyed blocks, high-level formatting

d) bad blocks, partitioning

View Answer




Answer: b

47. Which principle states that programs, users, and even the systems be given just enough privileges to perform their task?

a) principle of least privilege

b) principle of process scheduling

c) principle of operating system

d) none of the mentioned



Answer: a



OS stands for______________




(a) Operating system
(b) Open Source
(c) Open System
(d) Operating Styling


Answer: A


. Network operating system runs on ___________

a) every system in the network

b) server

c) both server and every system in the network

d) none of the mentioned





Answer: b




What are the types of distributed operating systems?

a) Zone-based Operating system

b) Level-based Operating system

c) Network Operating system

d) All of the mentioned

Answer: c







Operating systems__________




(a) enables the programmer to draw a flow chart




(b) provides a layer, user-friendly interface




(c) links a program with subroutine it references




(d) all of these




Answer: B







. In Unix, which system called creates the new process?

a) create

b) fork

c) new

d) none of the mentioned

Answer: b

Explanation: In UNIX, a new process is created by a fork() system call. fork() system call returns a process ID which is generally the process id of the child process created.


Scheduling of tasks is a critical consideration in RTOS. Which of the following best described the scheduling policy design: Select one____________


(a) The scheduler must follow a pre-emptive policy


(b) The scheduler must not use pre-emptive policy options (c) The scheduler must not only use pre-emptive policy options with the priority considerations.


(d) The scheduler must not use the pre-emptive policy option but must employ priority consideration


Answer : D










The basic types of OS are__________




(a) batch and time-sharing




(b) sequential and real-time




(c) direct and interactive




(d) batch and interactive




Answer : D







In ______ OS, the response time is very critical.




(a) Multitasking




(b) Batch




Related: Matter in our surroundings class 9 MCQ with answers

(c) Online




(d) Real-time




Answer : D










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) the kernel is not required




Answer : B










To recover from failures in the network operations _____________ information may be maintained.

a) operating system

b) IP address

c) stateless

d) state



Answer: d







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




Answer: A






  operating system?

collection of programs that manages hardware resources,   system service provider to the application programs    link to interface the hardware and application programs

 

1. Which system call returns the process identifier of a terminated child?

wait

exit

fork

get




 2. To access the services of the operating system, the interface is provided by the

system calls


assembly instructions


6. When the process issues an I/O request :

It is placed in an I/O queue

It is placed in a waiting queueIt is placed in the ready queue, It is placed in the Job queue


 Which one of the following errors will be handled by the operating system?

power failure,  lack of paper in the printer, connection failure in the network


4. The primary function of the command interpreter is?

to get and execute the next user-specified command




What is a short-term scheduler?

  

It selects which process has to be executed next and allocates the CPU



5. By operating system, the resource management can be done via?

time division multiplexing  &   space division multiplexing


6. If a process fails, most operating systems write the error information to a

log file


What is interprocess communication?

 

 communication between two process


The primary distinction between the short-term scheduler and the long-term scheduler is :

 


  The frequency of their execution


 . Operating System maintains the page table for


A. each process



2. Because of virtual memory, the memory can be shared among


A. processes



3. _____ is the concept in which a process is copied into the main memory from the secondary memory according to the requirement.


B. Demand paging



4. The pager concerned with the

i


A. individual page of a process



5. Swap space exists in

B. secondary memory



6. A memory buffer used to accommodate a speed differential is called

B. cache


7. Which one of the following is the address generated by the CPU?

C. logical address


8. Run time mapping from virtual to physical address is done by

A. memory management unit


9. Memory management technique in which the system stores and retrieves data from secondary storage for use in main memory is called

B. paging


10. Program always deals with

A. logical address




The ______ register is read by the host to get input.

C. data in


2. The ______ register is written by the host to send output.

D. data out



3. The hardware mechanism that allows a device to notify the CPU is _______.


B. interrupt




 What does Belady’s Anomaly relate to?


A. Page Replacement Algorithm



2. What are the two types of Semaphore?

C. Counting Semaphores and Binary Semaphores



3. What are the requirements for the solution to the critical section problem?

Mutual Exclusion

Progress

Bounded Waiting

All of Above

D. All of the Above


4. Which of the following memory unit processor can access more rapidly

C. Cache memory


5. Which of the following is the system tool?

Backup

Disk defragmenter

Both of above

C. Both of above



6. When a computer is first turned on or restarted, a special type of absolute loader called ____ is executed


C.  Bootstrap loader



7. In which type of the following OS, the response time is very crucial.


B. Real-Time Operating System


8. Virtual Memory is

C. An illusion of huge main memory


9. Swapping

C. Allows each program in turn to use the memory


10. A program in execution is called


B. A Process

 

What is thrashing?


A. A high paging activity is called thrashing.


2. Symptoms of swap-file problems include extremely slow system speed and a disk that is constantly being accessed, which is referred to as ______________.


B. Thrashing



3. What hole will allocate in the “Worst-Fit” algorithm of memory management?


C. It allocates the largest hole from the available memory holes



4. Which of the following is the allocation method of disk space?

Contiguous allocation

Linked allocation

Indexed allocation

All of the Above

D. All of the Above



5. Which of the following concept is best for preventing page faults?

B. The working set



6. Poor response times are usually caused by

Process busy

High I/O rates

High paging rate

Any of the above

D. Any of the above


7. Virtual memory is typically located on


D. Hard drive


8. What is contained in the page table?


A. Base address of each frame and corresponding page number



9. Tree structure displays the


C. File and directory name



10. Multiprogramming systems:

C. Execute more jobs in the same period


Bringing a page into memory only when it is needed, this mechanism is called

Deadlock

Page Fault

Dormant Paging

Demand Paging

D. Demand Paging





2. What do you mean by Memory Compaction?

Combine multiple equal memory holes into one big hole

Combine multiple small memory holes into one big hole

Divide big memory holes into small holes

Divide the memory hole by 2

B. Combine multiple small memory holes into one big hole



3. Copying a process from memory to disk to allow space for other processes is Called

Swapping

Deadlock

Demand Paging

Page Fault

A. Swapping





4. Page stealing

Is a sign of an efficient system

Is taking page frames from other working sets

Should be the turning goal

Is taking layer disk space for the page in page out

B. Is taking page frames from other working sets




5. A spooler is a

Location in memory that maintains the contents of documents until it prints out

The queue of a print jobs that is waiting to print

A program that coordinates the print job that is waiting to process

Message sent from the printer to the operating system when a print job is completed

C. Program that coordinates the print job that is waiting to process



6. What is the method of handling deadlocks?

Use a protocol to ensure that the system will never enter a deadlock state.

Allow the system to enter the deadlock state and then recover.

Pretend that deadlocks never occur in the system

All of the Above

D. All of the Above



7. The Banker’s algorithm is used

to rectify deadlock

 to detect deadlock

to prevent deadlock

to solve deadlock

C. to prevent deadlock



8. All of the following are TRUE regarding virtual memory EXCEPT

Any amount of RAM can be allocated to virtual memory

The setting for the amount of hard disk drive space to allocate virtual memory can be manually changed

This temporary storage is called the swap file or page file

Virtual memory is the physical space of the hard drive

B. The setting for the amount of hard disk drive space to allocate virtual memory can be manually changed





9. What is dispatch latency?

The time is taken by the dispatcher to stop one process and start another

The time is taken by the processor to write a file into the disk

The whole time is taken by all processor

None of Above

A. The time is taken by the dispatcher to stop one process and start another




10. A page fault occurs when

the Deadlock happens

the Segmentation starts

the page is found in the memory

the page is not found in the memory

D. the page is not found in the memory



 The systems which allow only one process execution at a time, are called?

unit programming systems


8. In an operating system, each process has its own

address space and global variablesopen files     pending alarms, signals and signal handlers

7. What is a long-term scheduler?

It selects which process has to be brought into the ready queue

A process can be terminated due to?

normal exit,   fatal error,    killed by another process


 A set of processes is deadlock if

each process is blocked and will remain so forever

each process is terminated

all processes are trying to kill each other

none of the mentioned


The address of the next instruction to be executed by the current process is provided by the

 program counter

 

What is the ready state of a process?


Ans. when the process is scheduled to run after some execution


What is a medium-term scheduler?

 

 It selects which process to remove from memory by swapping




A process stack does not contain

function parameters

local variables

return addresses

PID of the child process




. On systems where there are multiple operating systems, the decision to load a particular one is done by _____________

a) process control block

b) file control block

c) boot loader

d) bootstrap



Answer: c










What are the Real-time systems?




(a) Used for monitoring events as they occur




(b) Primarily used on mainframe computers




(c) Used for real-time interactive users




(d) Used for program development




Answer : A







. Whenever a process needs I/O to or from a disk it issues a ______________

a) system call to the operating system

b) a special procedure

c) system call to the CPU

d) all of the mentioned




Answer: a







Type of processor in which single task of a particular application is process is termed as Select one_______________




(a) real-time processor




(b) dedicated processor




(c) applicant processor




(d) one task processor




Answer : B







For real time operating systems, interrupt latency should be_________




(a) minimal




(b) maximum




(c) zero




(d) dependent on the scheduling




Answer : A







. The two steps the operating system takes to use a disk to hold its files are _______ and ________

a) caching & logical formatting

b) logical formatting & swap space creation

c) swap space creation & caching

d) partitioning & logical formatting

Answer: d







VxWorks is centered around ____________




(a) wind microkernel




(b) Linux kernel




(c) Unix kernel




(d) none of the mentioned




Answer: a







In 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




Answer : A













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




Answer: B




The _______ program initializes all aspects of the system, from CPU registers to devise controllers and the contents of main memory, and then starts the operating system.

a) bootstrap

b) main

c) bootloader

d) rom

View Answer




Answer: a

Explanation: None.

Answer: c

Explanation: None.

18. The FCFS algorithm is particularly troublesome for ____________

a) operating systems

b) multiprocessor systems

c) time-sharing systems

d) multiprogramming systems



Answer: c

Explanation: In a time-sharing system, each user needs to get a share of the CPU at regular intervals.




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




Answer : A




Which of the following is correct in real-time?




(a) non-preemptive kernels




(b) preemptive kernels




(c) neither preemptive nor non-preemptive kernels




(d) preemptive kernels or non-preemptive kernels




Answer : B







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

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

b) at fixed time intervals

c) every time a resource request is made

d) none of the mentioned



Answer: a







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




Answer : A










A deadlock avoidance algorithm dynamically examines the __________ to ensure that a circular wait condition can never exist.

a) operating system

b) resources

c) system storage state

d) resource allocation state



Answer: d










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




Answer: c




Swapping _______ be done when a process has pending I/O, or has to execute I/O operations only into operating system buffers.

a) must never

b) maybe

c) can

d) must



Answer: a










The interrupt latency should be_________ for real time operating systems.




(a) maximum




(b) minimal




(c) dependent on the scheduling




(d) zero




Answer : B




Which one of the following is a real time operating system?
(a) RTLinux
(b) VxWorks
(c) Windows CE
(d) All of the mentioned

Answer: D




1.Timer is used to prevent a single
a)Job
b)Time
c)Computer
d)Information
Answer : a

2. To run a program this Setup involves an amount of
a)Money
b)Resources
c)Users
d)Time
Answer :d

3. Time sharing technique handles
a)Single Interactive Job
b)Multiple Interactive Job
c)Recent Interactive Job
d)Old Interactive Job
Answer:b

4.Interrupts make an operating system more
a)Rigid
b)Expensive
c)Reliable
d)Flexible
Answer:d

5. With the use of multiprogramming batch processing work can be

a)Efficient
b)Rigid
c)Expensive
d)Flexible
Answer : a

6. The initial program that is run when the computer is powered up is called __________
a) boot program
b) bootloader
c) initializer
d) bootstrap program
Answer: d
Explanation: None.

7. 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
Answer: b
Explanation: None.

8. 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
Answer: b
Explanation: None.

9. What is an ISR?
a) Information Service Request
b) Interrupt Service Request
c) Interrupt Service Routine
d) Information Service Routine
Answer: c
Explanation: None.

10. 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
Answer: a
Explanation: None.


11. 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
Answer: a
Explanation: None.
12. 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
Answer: b
Explanation: None.

13. 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
Answer: a
Explanation: None.

14. 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
Answer: c
Explanation: None.

15. 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
Answer: b
Explanation: None.

16. 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
Answer: a
Explanation: None.

17. 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
Answer: d
Explanation: None.

18. A system call is a routine built into the kernel and performs a basic function.
a) True
b) False
Answer: a
Explanation: All UNIX systems offer around 200 special functions known as system calls. A system call is a routine built into the kernel and performs a very basic function that requires communication with the CPU, memory and devices.

19. When we execute a C program, CPU runs in ____ mode.
a) user
b) kernel
c) supervisory
d) system
Answer: a
Explanation: When we execute a C program, the CPU runs in user mode. It remains it this particular mode until a system call is invoked.

20. In ____ mode, the kernel runs on behalf of the user.
a) user
b) kernel
c) real
d) all
Answer: b
Explanation: Whenever a process invokes a system call, the CPU switches from user mode to kernel mode which is a more privileged mode. The kernel mode is also called as supervisor mode. In this mode, the kernel runs on behalf of the user and has access to any memory location and can execute any machine instruction.


21. All UNIX and LINUX systems have one thing in common which is ____
a) set of system calls
b) set of commands
c) set of instructions
d) set of text editors
Answer: a
Explanation: As we know that, all UNIX and LINUX systems have one thing in common; they use the same set of system calls.
22. The chmod command invokes the ____ system call.
a) chmod
b) ch
c) read
d) change
Answer: a
Explanation: Many commands and system calls share the same names. For example, the chmod command invokes the chmod system call.

23. For reading input, which of the following system call is used?
a) write
b) rd
c) read
d) change
Answer: c
Explanation: The standard C library offers a set of separate functions to read a block of data. For example, to read a block of data fread is used, for reading a line fgets is used and for reading a character fgetc is used. All these functions invoke the system call -read, which is available for reading input.

24. Which of the following system call is used for opening or creating a file?
a) read
b) write
c) open
d) close
Answer: c
Explanation: To read or write to a file, we first need to open it. For this purpose, open system call is used. Open has two forms ; the first forms assumes that the file already exists and the second form creates the file if it doesn’t.

25. There are ___ modes of opening a file.
a) 4
b) 3
c) 2
d) 1
Answer: b
Explanation: There are three modes of opening a file, out of which only one mode is required to be specified while opening the file. The three modes are, O_RDONLY, O_WRONLY, O_RDWR.

26. Which of the following mode is used for opening a file in both reading and writing?
a) O_RDONLY
b) O_WRONLY
c) O_RDWR
d) O_WDR
Answer: c
Explanation: There are three modes of opening a file namely:

 O_RDONLY    -    opens files for reading
 O_WRONLY    -    opens file for writing 
 O_RDWR      -   opens file for reading and writing
27. open system call returns the file descriptor as ___
a) int
b) float
c) char
d) double
Answer: c
Explanation: open returns the file descriptor as an int. This is the lowest number available for allocation and is used as an argument by the other four calls (read, write, close, lseek).

28. Which of the following system call is used for closing a file?
a) open
b) lseek
c) close
d) write
Answer: c
Explanation: A program automatically closes all open files before termination, but it’s a good practice to close them explicitly. The close system call is used for closing a file.
int close (int fd)

29. close system call returns ____
a) 0
b) -1
c) 1
d) 0 and -1
Answer: d
Explanation: The return type of close system call is an integer. It either returns 0 if the file is closed successfully or -1 otherwise.

30. ____ system call is used for writing to a file.
a) read
b) write
c) close
d) seek
Answer: b
Explanation: write system call is required for writing to a file which has previously been opened with the open system call. write system call returns the number of characters written.

31. write system call returns -1 when ___________
a) if disk fills up while write is in progress
b) when file doesn’t exist
c) if the file size exceeds the system’s limit
d) if disk fills up while write is in progress and if the file size exceeds
Answer: d
Explanation: write system call returns the number of characters written. However, it will return -1 if if disk fills up while write is in progress or if the file size exceeds the system’s limit.
32. ____ system call is used for positioning the offset pointer.
a) read
b) write
c) open
d) lseek
Answer: d
Explanation: The lseek system call moves the file offset pointer to a specified point. It doesn’t do any physical I/O rather it determines the position in the file where the next I/O operation will take place.

33. Which of the following offset is used with lseek system call to set the offset pointer to the end of the file?
a) SEEK_SET
b) SEEK_END
c) SEEK_CUR
d) SEEK_CR
Answer: b
Explanation: The offset signifies the position of the offset pointer which can take one of these three values:

 SEEK_SET    -    offset pointer set to the beginning of file
 SEEK_END    -    offset pointer set to the end of file
 SEEK_CUR    -    offset pointer remains at current location
34. Which of the following system call is used for truncating a file?
a) truncate
b) ftruncate
c) trunk
d) truncate and ftruncate
Answer: d
Explanation: The truncate and ftruncate calls can truncate a file to any length. These calls are often used in combination with lseek to overwrite a certain segment of a file.

35. truncate needs the ___ of the file as an argument but ftruncate works with _______
a) pathname, file descriptor
b) file descriptor, pathname
c) pathname, pathname
d) file descriptor, file descriptor
Answer: a
Explanation: The truncate and ftruncate calls can truncate a file to any length. truncate needs the pathname of the file as an argument but ftruncate works with the file descriptor.



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
Answer: b
Explanation: Those systems which allows more than one process execution at a time, are called multiprogramming systems. Uniprocessing means only one processor.

2. In operating system, each process has its own __________
a) address space and global variables
b) open files
c) pending alarms, signals and signal handlers
d) all of the mentioned
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
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.

4. A process can be terminated due to __________
a) normal exit
b) fatal error
c) killed by another process
d) all of the mentioned
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
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.

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
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
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
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
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
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.
Learn Operating Systems from Scratch
 
11. A Process Control Block(PCB) does not contain which of the following?
a) Code
b) Stack
c) Bootstrap program
d) Data
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.
12. The number of processes completed per unit time is known as __________
a) Output
b) Throughput
c) Efficiency
d) Capacity
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.

13. 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
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.

14. Which of the following is not the state of a process?
a) New
b) Old
c) Waiting
d) Running
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.

15. What is a Process Control Block?
a) Process type variable
b) Data Structure
c) A secondary storage section
d) A Block in memory
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.

16. The entry of all the PCBs of the current processes is in __________
a) Process Register
b) Program Counter
c) Process Table
d) Process Unit
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.

17. 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
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.

18. 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
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.

19. 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
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.

20. Which of the following do not belong to queues for processes?
a) Job Queue
b) PCB queue
c) Device Queue
d) Ready Queue
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.


21. 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
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.
22. 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
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.

23. 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
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.

24. 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
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.

25. 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
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.

26. 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
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.

27. 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
Answer: c
Explanation: The primary distinction between the short-term scheduler and long-term scheduler is the frequency of their execution. Short-term scheduler executes frequently while long-term scheduler executes much less frequently.

28. The only state transition that is initiated by the user process itself is __________
a) block
b) wakeup
c) dispatch
d) none of the mentioned
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.

29. 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
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.

30. 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
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.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
31. 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
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.
32. 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
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.

33. 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
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.

34. Which of the following does not interrupt a running process?
a) A device
b) Timer
c) Scheduler process
d) Power failure
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.

35. Which process can be affected by other processes executing in the system?
a) cooperating process
b) child process
c) parent process
d) init process
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.

36. 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
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.

37. 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
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.

38. Which one of the following is a synchronization tool?
a) thread
b) pipe
c) semaphore
d) socket
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.

39. 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
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.

40. 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
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.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
41. 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
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.
42. Process synchronization can be done on __________
a) hardware level
b) software level
c) both hardware and software level
d) none of the mentioned
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.



(ads1)


43. 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
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.

44. 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
Answer: a
Explanation: To enable a process to wait within the monitor a condition variable must be declared as condition.

45. 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
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.

46. A parent process calling _____ system call will be suspended until children processes terminate.
a) wait
b) fork
c) exit
d) exec
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.

47. 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
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.

47. 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
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.

48. In UNIX, each process is identified by its __________
a) Process Control Block
b) Device Queue
c) Process Identifier
d) None of the mentioned
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.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
49. 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
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.
50. 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
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.

51. 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
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. Concurrent access to shared data may result in ____________
a) data consistency
b) data insecurity
c) data inconsistency
d) none of the mentioned
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
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
Answer: b
Explanation: None.

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
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
Answer: a
Explanation: None.

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
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
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
Answer: b
Explanation: None.

9. An un-interruptible unit is known as ____________
a) single
b) atomic
c) static
d) none of the mentioned
Answer: b
Explanation: None.

10. TestAndSet instruction is executed ____________
a) after a particular process
b) periodically
c) atomically
d) none of the mentioned
Answer: c
Explanation: None.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
11. 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
Answer: c
Explanation: None.
12. What are the two atomic operations permissible on semaphores?
a) wait
b) stop
c) hold
d) none of the mentioned
Answer: a
Explanation: None.

13. 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
Answer: d
Explanation: None.

14. 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
Answer: b
Explanation: None.

15. The wait operation of the semaphore basically works on the basic _______ system call.
a) stop()
b) block()
c) hold()
d) wait()
Answer: b
Explanation: None.

16. The signal operation of the semaphore basically works on the basic _______ system call.
a) continue()
b) wakeup()
c) getup()
d) start()
Answer: b
Explanation: None.

17. 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
Answer: a
Explanation: None.

18. 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
Answer: c
Explanation: None.

19. 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
Answer: a
Explanation: None.

20. 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
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.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
21. 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
Answer: d
Explanation: None.

22. What will happen if a non-recursive mutex is locked more than once?
a) Starvation
b) Deadlock
c) Aging
d) Signaling
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.

23. 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
Answer: c
Explanation: None.

24. What are the two kinds of semaphores?
a) mutex & counting
b) binary & counting
c) counting & decimal
d) decimal & binary
Answer: b
Explanation: None.

25. 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
Answer: b
Explanation: None.

26. 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
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

27. A binary semaphore is a semaphore with integer values ____________
a) 1
b) -1
c) 0.8
d) 0.5
Answer: a
Explanation: None.

28. 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
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.

29. 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
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.

30. Semaphores are mostly used to implement ____________
a) System calls
b) IPC mechanisms
c) System protection
d) None of the mentioned
Answer: b
Explanation: None.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
31. Spinlocks are intended to provide __________ only.
a) Mutual Exclusion
b) Bounded Waiting
c) Aging
d) Progress
Answer: b
Explanation: None.
32. 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
Answer: c
Explanation: None.

33. 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
Answer: a
Explanation: None.

34. 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
Answer: b
Explanation: None.

35. 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
Answer: b
Explanation: None.

36. 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
Answer: a
Explanation: None.

37. 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
Answer: b
Explanation: None.

38. 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
Answer: c
Explanation: None.

39. 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
Answer: a
Explanation: None.

40. 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
Answer: d
Explanation: None.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
41. A monitor is a type of ____________
a) semaphore
b) low level synchronization construct
c) high level synchronization construct
d) none of the mentioned
Answer: c
Explanation: None.
42. 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
Answer: a
Explanation: None.

43. 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
Answer: d
Explanation: None.

44. 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
Answer: a
Explanation: None.

45. What are the operations that can be invoked on a condition variable?
a) wait & signal
b) hold & wait
c) signal & hold
d) continue & signal
Answer: a
Explanation: None.

46. 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
Answer: a
Explanation: None.

47. 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
Answer: c
Explanation: None.

48. A collection of instructions that performs a single logical function is called ____________
a) transaction
b) operation
c) function
d) all of the mentioned
Answer: a
Explanation: None.

49. 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
Answer: c
Explanation: None.

50. 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
Answer: c
Explanation: None.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
51. 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
Answer: d
Explanation: None.
52. In the write ahead logging a _____________ is maintained.
a) a memory
b) a system
c) a disk
d) a log record
Answer: d
Explanation: None.

53. 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
Answer: a
Explanation: None.

54. 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
Answer: a
Explanation: Idempotent – Multiple executions of an operation have the same result as does one execution.

55. 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
Answer: d
Explanation: None.

56. 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
Answer: c
Explanation: None.

57. 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
Answer: a
Explanation: None.

58. 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
Answer: c
Explanation: None.

59. The two-phase locking protocol consists of ____________
a) growing & shrinking phase
b) shrinking & creation phase
c) creation & growing phase
d) destruction & creation phase
Answer: a
Explanation: None.

60. 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
Answer: a
Explanation: None.
Learn Operating Systems from Scratch
Understand the Concept of Operating Systems in Detail [Videos + Notes]
Click Here!
61. 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
Answer: c
Explanation: None.
62. 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
Answer: b
Explanation: None.

Post a Comment

0 Comments