Operating System:
2. 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
View Answer
Answer: c
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
View Answer
Answer: b
Explanation: To access services of the Operating System an interface is provided by the System
Calls
5. CPU scheduling is the basis of ___________
a) multiprogramming operating systems
Explanation: Kernel is the first program that is loaded in memory when OS is loading as well
as it remains in memory till OS is running. Kernel is the core part of the OS which is
responsible for managing resources, allowing multiple processes to use the resources and
provide services to various processes. Kernel modules can be loaded and unloaded in run-
time i.e. in running OS.
9. If a process fails, most operating system write the error information to a ______
a) new file
b) another running process
c) log file
d) none of the mentioned
View Answer
Answer: c
Explanation: If a process fails, most operating systems write the error information to a log file.
Log file is examined by the debugger, to find out what is the actual cause of that particular
problem. Log file is useful for system programmers for correcting errors.
10. Which one of the following is not a real time operating system?
a) RTLinux
b) Palm OS
c) QNX
d) VxWorks
View Answer
Answer: b
Explanation: VxWorks, QNX & RTLinux are real-time operating systems. Palm OS is a mobile
operating system. Palm OS is developed for Personal Digital Assistants (PDAs).
A real-time operating system (RTOS) is a specialized operating system designed to handle
tasks with strict timing constraints, ensuring that time-sensitive operations are completed
within predictable timeframes. Unlike general-purpose operating systems, an RTOS prioritizes
tasks based on their deadlines, making it suitable for applications where timing is critical,
such as industrial automation, automotive systems, and aerospace
11. What does OS X has?
a) monolithic kernel with modules
b) microkernel
c) monolithic kernel
d) hybrid kernel
View Answer
Answer: d
Hybrid kernel is a combination of two different kernels. A hybrid kernel is indeed a combination
of both monolithic and microkernel architectures.
Monolithic Kernel:
A monolithic kernel is an operating system architecture where all services like device drivers,
file systems, and memory management run in kernel mode.
It offers high performance but is less secure and harder to maintain due to its large codebase.
Examples: Linux, Unix, MS-DOS.
Microkernel:
A microkernel is an operating system architecture where only core functions (CPU scheduling,
memory, IPC) run in kernel mode, while other services run in user mode.
It is more secure, modular, and stable, but slightly slower due to more context switching.
Examples: Minix, QNX, Mach (used in macOS).
13. In a timeshare operating system, when the time slot assigned 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
View Answer
Answer: c
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.
14. 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
View Answer
Answer: a
Explanation: Cascading termination refers to the 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.
15. 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
View Answer
Answer: d
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.
16. 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
View Answer
Answer: c
17. The portion of the process scheduler in an operating system that dispatches processes is
concerned with ____________
a) assigning ready processes to waiting queue
b) assigning running processes to blocked queue
c) assigning ready processes to CPU
d) all of the mentioned
View Answer
Answer: c
the dispatcher’s role is specifically:
Assigning ready processes to the CPU
Waiting queue is for processes waiting for I/O, not for CPU.
19. 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
View Answer
Answer: a
Explanation: In an effective operating system, we must verify the deadlock each time a request
for resources is made at fixed time intervals.
Deadlock is a situation in an operating system where two or more processes are waiting for
each other to release resources, and none of them can proceed, resulting in a standstill.
Conditions for Deadlock (Coffman’s Conditions):
All four must be true simultaneously:
1. Mutual Exclusion – Only one process can use a resource at a time.
2. Hold and Wait – A process is holding a resource and waiting for another.
3. No Preemption – Resources can't be forcibly taken from a process.
4. Circular Wait – A circular chain of processes exists, each waiting for a resource held by
the next.
📌 Deadlock Example:
Imagine two processes, P1 and P2, and two resources, R1 and R2.
Scenario:
P1 holds R1 and requests R2
P2 holds R2 and requests R1
Neither process can proceed because each is waiting for a resource held by the other.
20. 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
View Answer
Answer: d
21. 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
View Answer
Answer: a
Swapping is the process of moving a process from main memory to the disk (backing store)
and bringing it back later for execution.
Swapping must never be done when a process has pending I/O operations, because:
The I/O operation might be using physical memory addresses, and swapping the
process out could lead to inconsistent or corrupted data.
The process needs to complete its I/O before being swapped out to ensure correctness.
22. The main memory accommodates ____________
a) cpu
b) user processes
c) operating system
d) all of the mentioned
View Answer
Answer: d
24. 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
View Answer
Answer: a
Relocation Register:
Stores the starting physical address (base address) where the process can access
memory.
Limit Register:
Specifies the range or size of the memory a process is allowed to access.
🔁 How Protection Works:
Every time the CPU generates a memory address:
1. The address is added to the relocation register (to get the actual physical address).
2. The result is compared with the limit register.
3. If the address is within the allowed range, the access is allowed.
4. If the address is outside the range, a trap/exception occurs → OS stops the illegal
access.
26. 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
View Answer
Answer: d
In a system that uses paging for memory management, physical memory is divided into fixed-
size blocks called frames, and logical memory (used by processes) is divided into pages.
To manage physical memory efficiently, the Operating System (OS) maintains a:
📋 Frame Table
This table keeps track of:
How many frames are in total
Which frames are allocated to which processes
Which frames are free (available)
How many frames are in use
Each process has its own page table. Page table manages Virtual memory (per process)
Page Table: "Where should this virtual page go in RAM?"
Frame Table: "Who is using this part of RAM and is it free?"
27. 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 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
View Answer
Answer: c
28. 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
View Answer
Answer: a
System calls are the interface between user programs and the operating system (OS).
They allow user-level programs to request services from the OS kernel, such as:
Accessing files
Communicating with devices
Creating or managing processes
Allocating memory
Since user programs are not allowed to directly access hardware or critical resources (for
security and stability), they must ask the OS to do it for them through system calls.
🔧 Example:
Let’s say your C program wants to read a file. It might use:
CopyEdit
Read (file_descriptor, buffer, size);
But behind the scenes, this is a system call handled by the OS!
29. 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
View Answer
Answer: d
Explanation:
A Real-Time Operating System (RTOS) is designed to ensure that tasks are completed
within a specific time constraint (deadline).
In real-time systems, missing a deadline can lead to critical failures (e.g., in medical
devices or aircraft control systems).
RTOS uses priority-based scheduling (e.g., Rate Monotonic Scheduling or Earliest
Deadline First) to ensure tasks meet deadlines.
30. 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
View Answer
Answer: c
In real-time operating systems (RTOS), jitter refers to the variation in response time (i.e., delay
or inconsistency in task execution timing).
31. For real time operating systems, interrupt latency should be ____________
a) zero
b) minimal
c) maximum
d) dependent on the scheduling
View Answer
Answer: b
Explanation: Interrupt latency is the time duration between the generation of interrupt and
execution of its service.
32. Which one of the following is a real time operating system?
a) Windows CE
b) RTLinux
c) VxWorks
d) All of the mentioned
View Answer
Answer: d
33. 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
View Answer
Answer: c
Static Priority means the priority of a process is fixed at creation time and does not change
during execution.
This is in contrast to dynamic priority, where the OS can adjust the priority based on factors
like aging or resource requirements.
34. 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 includes logins, file opens, and program executions
d) All of the mentioned
View Answer
Answer: d
Host-based Intrusion Detection System (HIDS) monitors and analyzes the internals of a
computing system rather than network traffic. It focuses on activities on a specific host
(computer/server).
35. 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
View Answer
Answer: c
36. 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
View Answer
Answer: a
Explanation:
The Working Set Model in memory management keeps track of the set of pages a
process is actively using (its working set).
The OS needs to ensure that the sum of all working set sizes across processes does not
exceed the total available physical frames.
If the total demand exceeds available memory, the system faces thrashing (constant
paging with very low CPU utilization).
🔍 To prevent thrashing:
The OS suspends one or more processes.
This frees frames so that the remaining processes can run efficiently.
Suspended processes are moved to disk (swap space) until memory pressure decreases.
37. 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
38. 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
View Answer
Answer: c
39. 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
View Answer
Answer: a
40. 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
View Answer
Answer: c
When traversing directory trees, OS ignores certain links (or uses checks) to
keep the structure acyclic and prevent loops. (acylic means never goes to its
original position
41. To recover from failures in the network operations _____________ information
may be maintained.
a) operating system
b) ip address
c) stateless
d) state
View Answer
Answer: d
In network operations, when there is a failure (e.g., a dropped
connection, server crash), the system needs a way to resume or recover
the communication without starting completely over.
This is possible by maintaining state information, which includes:
o Session details
o Data about what has been sent/acknowledged
o Connection status
o User authentication info
🔍 Stateful vs Stateless:
Stateful systems keep track of the state of communication between
client and server.
o Example: TCP (Transmission Control Protocol) – maintains
connection state.
Stateless systems do not keep session information.
o Example: HTTP (by default) – each request is independent.
✅ Why “State” Helps Recovery:
If a network failure occurs, the system can use the stored state to:
o Resume file transfer
o Continue the session without re-authentication
o Avoid data duplication or loss
42. On systems where there are multiple operating system, the decision to load
a particular one is done by _____________
a) process control block
b) file control block
c) boot loader
d) bootstrap
View Answer
Answer: c
When a computer is powered on, the bootstrap program (stored in
ROM) runs first.
The bootstrap program loads the boot loader into memory.
The boot loader is responsible for:
o Loading the selected operating system kernel into memory.
o Starting its execution.
🔍 In systems with multiple operating systems (dual-boot or multi-boot):
The boot loader (e.g., GRUB, LILO) presents a menu to the user to
choose which OS to load.
Once the user selects, the boot loader loads that OS kernel and hands
over control.
✅ Difference Between Bootstrap & Boot Loader:
Bootstrap: A small program in ROM that initializes the system and loads
the boot loader.
Boot Loader: A program that loads the OS kernel into memory.
44. 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
View Answer
Answer: d
When an Operating System uses a disk to store files, it performs two major steps:
✅ 1. Partitioning
The disk is divided into partitions (sections).
Each partition can:
o Contain a separate file system.
o Be treated as an independent logical disk.
Partition information is stored in the partition table.
✅ 2. Logical Formatting (File System Creation)
After partitioning, each partition is logically formatted.
This involves:
o Creating a file system structure on the partition.
o Setting up data structures like:
Superblock (metadata about file system)
Free space list
Inodes or FAT entries
45. The _______ program initializes all aspects of the system, from CPU registers to device
controllers and the contents of main memory, and then starts the operating system.
a) bootstrap
b) main
c) bootloader
d) rom
(A)
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
SCSI disks (used in high-end PCs and servers) have built-in controllers that manage bad
blocks.
Bad blocks are disk sectors that are damaged and unusable.
The controller keeps a list of these bad blocks to prevent the OS from using them.
✅ Low-Level Formatting (Physical Formatting):
Happens before the disk is used by the OS.
Performed by the disk manufacturer (or using special tools).
Creates the physical structure of the disk:
o Tracks
o Sectors
o Identifies and sets aside bad sectors (spare sectors are reserved as
replacements).
The OS never sees these spare sectors because they are managed by the disk controller.
48. 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
A Network Operating System (NOS) is designed to manage and provide network services like
file sharing, printer access, user authentication, and network security.
NOS runs primarily on a server that:
o Controls access to network resources.
o Manages users, permissions, and data.
o Provides centralized administration.
✅ Examples of NOS:
Windows Server (by Microsoft)
Linux Server distributions (like Ubuntu Server, Red Hat Enterprise)
Novell NetWare (historical)
49. 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
View Answer
Answer: c
50. In Unix, which system call creates the new process?
a) create
b) fork
c) new
d) none of the mentioned
View Answer
Answer: b
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.
fork() is the primary system call for process creation in UNIX.
The newly created process (child) then often uses exec() to load a new program.
1. Round robin scheduling falls under the category of ____________
a) Non-preemptive scheduling
b) Preemptive scheduling
c) All of the mentioned
d) None of the mentioned
View Answer
Answer: b
Round Robin (RR) Scheduling is a CPU scheduling algorithm that assigns a fixed time slice
(quantum) to each process in the ready queue in a circular order.
If a process does not finish within its time quantum, it is preempted and placed at the end of
the queue.
This means preemption is allowed, so Round Robin is a preemptive scheduling algorithm.
Non-Preemptive Scheduling
Definition:
Once a process starts executing on the CPU, it cannot be interrupted until it finishes or
voluntarily gives up the CPU (e.g., for I/O).
2. With round robin scheduling algorithm in a time shared system ____________
a) using very large time slices converts it into First come First served scheduling algorithm
3. The portion of the process scheduler in an operating system that dispatches processes is
concerned with ____________
a) assigning ready processes to CPU
b) assigning ready processes to waiting queue
c) assigning running processes to blocked queue
d) all of the mentioned
View Answer
Answer: a
7. What is Scheduling?
a) allowing a job to use the processor
b) making proper use of processor
c) all of the mentioned
d) none of the mentioned
View Answer
Answer: a
10. Which of the following algorithms tends to minimize the process flow time?
a) First come First served
b) Shortest Job First
c) Earliest Deadline First
d) Longest Job First
View Answer
Answer: b
11. Under multiprogramming, turnaround time for short jobs is usually ________ and that for
long jobs is slightly ___________
a) Lengthened; Shortened
b) Shortened; Lengthened
c) Shortened; Shortened
d) Shortened; Unchanged
View Answer
Answer: b
Multiprogramming allows multiple processes to be in memory at the same time, utilizing CPU
and I/O efficiently.
When the CPU is waiting for I/O from one process, it can execute another process.
✅ Effect on Turnaround Time:
Short jobs:
o Benefit because they can get CPU time quickly (less idle time).
o Turnaround time is shortened.
Long jobs:
o Have to share CPU with other processes.
o Their completion is slightly delayed compared to a single-task environment.
o So turnaround time is lengthened slightly.
12. Which of the following statements are true? (GATE 2010)
I. Shortest remaining time first scheduling may cause starvation
II. Preemptive scheduling may cause starvation
III. Round robin is better than FCFS in terms of response time
a) I only
b) I and III only
c) II and III only
d) I, II and III
View Answer
Answer: d
Explanation: I) Shortest remaining time first scheduling is a preemptive version of shortest job
scheduling. It may cause starvation as shorter processes may keep coming and a long CPU burst
process never gets CPU.
II) Preemption may cause starvation. If priority based scheduling with preemption is used, then
a low priority process may never get CPU.
III) Round Robin Scheduling improves response time as all processes get CPU after a specified
time.
Explanation:
Let's analyze each statement:
1. Shortest remaining time first scheduling may cause starvation – True
o In SRTF (preemptive version of SJF), longer processes can be postponed
indefinitely if shorter processes keep arriving.
2. Preemptive scheduling may cause starvation – True
o Preemptive scheduling (like Priority Scheduling) can starve low-priority processes
if high-priority processes keep coming.
3. Round robin is better than FCFS in terms of response time – True
o Round Robin ensures that each process gets CPU time in turns, improving the
response time for all processes compared to FCFS, where long jobs can delay
short jobs.
1. What is a reusable resource?
a) that can be used by one process at a time and is not depleted by that use
b) that can be used by more than one process at a time
c) that can be shared between various threads
d) none of the mentioned
View Answer
Answer: a
A reusable resource is a resource that:
Can be used by only one process at a time (for consistency and correctness).
After the process releases it, the resource is available for reuse by other processes.
It is not consumed or depleted after use.
2. Which of the following condition is required for a deadlock to be possible?
a) mutual exclusion
b) a process may hold allocated resources while awaiting assignment of other resources
c) no resource can be forcibly removed from a process holding it
d) all of the mentioned
View Answer
Answer: d
3. A system is in the safe state if ____________
a) the system can allocate resources to each process in some order and still avoid a deadlock
b) there exist a safe sequence
c) all of the mentioned
d) none of the mentioned
View Answer
Answer: c
4. The circular wait condition can be prevented by ____________
a) defining a linear ordering of resource types
b) using thread
c) using pipes
d) all of the mentioned
View Answer
Answer: a
Circular Wait is one of the four necessary conditions for deadlock (others: mutual exclusion,
hold & wait, no preemption).
5. Which one of the following is the deadlock avoidance algorithm?
a) banker’s algorithm
b) round-robin algorithm
c) elevator algorithm
d) karn’s algorithm
View Answer
Answer: a
The most popular deadlock avoidance algorithm is the Banker’s Algorithm, developed by
Edsger Dijkstra.
b) Round-Robin algorithm → CPU scheduling algorithm, unrelated to deadlock.
c) Elevator algorithm → Disk scheduling algorithm.
d) Karn’s algorithm → Used in TCP RTT estimation, not OS resource allocation.
6. What is the drawback of banker’s algorithm?
a) in advance processes rarely know how much resource they will need
b) the number of processes changes as time progresses
c) resource once available can disappear
d) all of the mentioned
View Answer
Answer: d
10. To avoid deadlock ____________
a) there must be a fixed number of resources to allocate
b) resource allocation must be done only once
c) all deadlocked processes must be aborted
d) inversion technique can be used
View Answer
Answer: a
1. If one or more devices use a common set of wires to communicate with the computer
system, the connection is called ______
a) CPU
b) Monitor
c) Wirefull
d) Bus
View Answer
Answer: d
5. A ________ is a collection of electronics that can operate a port, a bus, or a device.
a) controller
b) driver
c) host
d) bus
View Answer
Answer: a
6. An I/O port typically consists of four registers status, control, ________ and ________
registers.
a) system in, system out
b) data in, data out
c) flow in, flow out
d) input, output
View Answer
Answer: b
An I/O port is an interface between the CPU and a device that allows data exchange. It typically
consists of four types of registers:
1. Status Register
o Holds status information of the device (e.g., ready, busy, error).
2. Control Register
o Used by CPU to control device operations (e.g., enable interrupts).
3. Data-In Register
o Holds data coming from the device to the CPU.
4. Data-Out Register
o Holds data going to the device from the CPU.
5. 7. The ______ register is read by the host to get input.
a) flow in
b) flow out
c) data in
d) data out
View Answer
Answer: c
10. The CPU hardware has a wire called __________ that the CPU senses after
executing every instruction.
a) interrupt request line
b) interrupt bus
c) interrupt receive line
d) interrupt sense line
View Answer
Answer: a
The CPU uses a special hardware signal line called the Interrupt Request
Line (IRQ) to detect whether an I/O device or other component is
requesting its attention.
After executing every instruction, the CPU checks this line to see if any
interrupt has occurred.