Operating System MCQ
An operating system provides a platform on which other applications programs can be installed. It also provides the environment within which programs are executed. It can be termed as a program or system software that acts as an intermediary between user and hardware.
Resource Manager/Allocator - It manages the system resources in an unbiased fashion in both hardware(mainly CPU time, memory, system buses) and software(access, authorization, semaphores) and provides the functionality to application programs.
Operating System controls and coordinates the use of resources among various application programs.
Computer Hardware - CPU, Memory units, I/O devices, system bus, registers, etc, provides the basic computing resources.
System and Application Programs - Defines the way in which these resources are used to solve the computing problems of the user.
Functions of Operating System
- Process Management
- Memory Management
- I/O device management
- File Management
- Network Management
- Security and Protection
Types of Operating Systems
Batch Operating System
- To speed up the processing job with similar types, the tasks are batched together and were run through the processor as a group batch.
- In some operating systems, grouping is done by the operator while in some systems, it is performed by the Batch Monitor resisted in the low end of the main memory.
- The jobs are bundled into batches with similar requirements.
- Then the submitted jobs were grouped as FORTRAN jobs, COBOL jobs, etc.
Multiprogramming Operating System
- A single program cannot, in general, keep either the CPU or the I/O devices busy all times. The basic idea of a multiprogramming operating system is it keeps several jobs in the main memory simultaneously.
- The OS picks and begins to execute one of the jobs in memory. Eventually, the jobs may have to wait for some task, such as an I/O operation, to complete.
Multitasking Operating System
- In the modern OS, we are able to play MP3 music, edit documents, surf the web all running at the same time.
- For multitasking to take place, firstly there should be multiprogramming i.e. presence of multiple programs for execution. And secondly the concept of time-sharing.
Real-Time Operating System
- A real-time system is a time-bound system that has well-defined fixed time constraints. Processing must be done within the defined constraints or the system will fail.
- RTOS is intended to serve real-time applications that process data as it comes in, typically without buffer delays. It is used in an environment where a large number of events must be accepted and processed in a short time.
Resources
Practice Coding
OS Interview Questions
Features of Operating System
Components of Operating System
Operating System MCQ
When can the binding of instructions and data to memory addresses be done?
Load time
Compile time
Execution time
All of the above
The speed of writing data in magnetic tape disks is comparable to that of disk drives. State True/False
True
False
Both, depends on the data
None
The two types of semaphores are-
Counting and decimal semaphore
Counting and binary semaphore
Counting and mutex
None
Thread is a
Light weight process
Heavy weight process
Multi-process
I/0 process
Threads is not shared among which of the following?
stack
program counter
both program counter and stack
none
To access the services of operating system the interface is provided by the?
System Calls
API
Library
Assembly Instructions
UNIX is written in which language?
C#
C++
C
.NET
Unsafe states are?
Not deadlocks
Deadlocks
Livelock
None
What are the two types of operating modes of AT?
Virtual mode, dedicated mode
Private mode, public mode
Real mode, protected mode
Direct mode, indirect mode
What else is a command interpreter called?
prompt
kernel
command
shell
What is meant by ready state of a process?
When the process is scheduled to run after some execution
When the process is currently using the CPU
When the process is dependent of the execution time of some other process.
None of these
What of the following defines Thread cancellation?
The process of terminating a thread process before its execution
The process of removing a thread after its work is executed
The process of destroying the thread after its work is executed
none
When a thread terminates some target thread immediately, it is known as?
Immediate Termination
Asynchronous termination
Synchronous termination
Deferred cancellation
When are the register context and stack of thread deallocated?
when the thread terminates
when the thread blocks
when the thread unblocks
when the thread spawns
The size of virtual memory is based on which of the following?
CPU
Address Bus
RAM
Data Bus
Which of the following are CPU scheduling algorithms?
Priority scheduling
Round Robin
Shortest Job First
All of the above
Which of the following are two types of atomic operations performed by semaphores?
wait, signal
wait, stop
signal, stop
signal, wait
Which of the following commands in UNIX is used to send a signal?
send
kill
sigsend
none
Which of the following is a single user operating system?
Windows
Ms-DOS
MAC
None
Which of the following is also known as the base register?
Relocation register
Regular register
Delocation register
Basic register
Which of the following is an example of a real-time operating system?
Process Control
MS DOS
WIndows XP
Lynx
Which of the following is known as uninterruptible unit?
single
static
atomic
none of the mentioned
Which of the following is not an operating system?
Linux
DOS
Oracle
Windows
Which of the following is the only state transition that is initiated by the user process itself?
dispatch
wakeup
block
none
Which of the following schedules threads?
Virtual memory
Operating system
CPU
Input
Which of the type of OS reads and reacts in terms of actual time?
Quick sharing OS
Time Sharing OS
Real time OS
Batch OS
Why is CPU scheduling done?
decrease CPU utilisation
decrease cost
increase CPU utilisation
None
Identify the system calls that on termination does not return control to the calling point.
exec
fork
longjmp
ioctl
A process which is copied from main memory to secondary memory on the basis of
requirement is known as -
Demand paging
Paging
Threads
Segmentation
A systematic procedure for moving the CPU to new process is known as-
Synchronization
Deadlock
Starvation
Context Switching
Among the following CPU scheduling algorithms, which of these allocated the CPU first to the process that requests the CPU first?
FCFS
SJF
Priority scheduling
None
Among the following, which is an example of a spooled device?
A line printer that prints the output of a number of jobs.
A terminal that inputs user data
A I/O device to display graphics.
None
Consider the following program:
main()
{
if(fork()>0)
sleep(100);
}
infinite process
orphan process
zombie process
none
Device driver required in?
Register
Main memory
Disk
Cache
FIFO scheduling is a type of:
Pre-emptive scheduling
Non-pre-emptive scheduling.
Deadline scheduling
None of the above
For which of the following is resource sharing used?
an application having several threads of activity all within the same address space.
share the memory and resources of the process to which the threads belong
Compress the address space a process can use
all of the mentioned
For which of the following is the jacketing technique used?
to construct a new thread
to communicate between threads
convert a blocking system call into non blocking system call
None
For which of the following purposes in Banker’s algorithm is used?
Preventing deadlock
Solving deadlock
Recover from deadlock
None
How many minimum variables is/are required to share between processes, so as to solve the critical section problem?
one
two
three
four
Identify the call which never returns an error?
fork
getpid
ioctl
open
A binary semaphore has a value of
0
1
-1
2
Identify the two steps of a process execution.
CPU & I/O Burst
I/O & OS Burst
Memory & I/O Burst
CPU and Memory burst
Is mutual exclusion required for shareable resources?
Yes
No
Maybe
None
Main memory of a computer system is?
Non-volatile
Volatile
Restricted
Unrestricted
Many to One model is at an advantage in which of the following conditions?
When the program needs to be multi-threaded
When there is a single processor present
When the program does not need multithreading
None
Operating systems
Provides a layer so as to act as a user-friendly interface that enables the programmer to draw a flow chart
Links the program with subroutines
Helps to create a flow chart of the programs
All of these
OS classifies the threads as-
Mainframe and motherboard level
Kernel and User level
Security and Memory level
OS and CPU level
Select the correct definition of spooling.
Spooling is a type of fast memory
Spooling holds a single copy of data
Spooling holds copy of all data in the system
none
Semaphore is a __ and it helps to solve the problem of ___?
atomic, critical section
integer variable, memory error
integer variable, critical section
atomic, memory error
Signals of some given type are
sent together
queued
stacked
none
The most optimal CPU scheduling algorithm is ________
Shortest Job First
First Come First Serve
Round robin
None
The output of the following C program is?
int main(){
fork();
fork();
printf("code ");
}
code code code code
code code code
code code
code
The release and request of resources are a type of which of the following?
system calls
I/O interrupts
command lines
None