পরীক্ষা আর্কাইভ

৪৯তম বিসিএস ⎯ তথ্য ও যোগাযোগ প্রযুক্তি [২৮১]

পরীক্ষা৪৯তম বিসিএস ⎯ তথ্য ও যোগাযোগ প্রযুক্তি [২৮১]তারিখতারিখ অনির্ধারিতসময়30 minutes
মোট প্রশ্ন৪৮
সিলেবাস
Exam 6 Operating System: Operating System, Process, Memory management, Deadlock, File Systems. [Source: Class-6 and relevant books]
ঘনত্ব
উত্তর
উত্তরিতবর্তমানপুনরায় দেখুনঅসম্পূর্ণ

৪৯তম বিসিএস ⎯ তথ্য ও যোগাযোগ প্রযুক্তি [২৮১]

৪৯তম বিসিএস ⎯ তথ্য ও যোগাযোগ প্রযুক্তি [২৮১] · তারিখ অনির্ধারিত · ৪৮ প্রশ্ন

.
Which of the following is an example of a deadlock?
  1. Two processes sharing CPU time
  2. A process waiting for I/O to complete
  3. Two processes waiting for resources held by each other
  4. A process in the ready queue waiting for CPU
সঠিক উত্তর:
Two processes waiting for resources held by each other
উত্তর
সঠিক উত্তর:
Two processes waiting for resources held by each other
ব্যাখ্যা

Deadlock occurs when two or more processes are waiting for each other’s resources, and none of them can proceed.

Example:

Process P1 holds Printer and waits for Scanner.
Process P2 holds Scanner and waits for Printer → Deadlock.

Others option:

Sharing CPU → Normal, no deadlock.
Waiting for I/O → Normal waiting, not deadlock.
Mutual waiting for resources → Deadlock. 
Waiting for CPU → Just scheduling delay, not deadlock.

​Source: Operating System Concepts by Silberschatz

.
What is Virtual Memory?
  1. An extremely large main memory
  2. A type of secondary storage
  3. An illusion of large main memory created by the OS
  4. A memory management hardware
সঠিক উত্তর:
An illusion of large main memory created by the OS
উত্তর
সঠিক উত্তর:
An illusion of large main memory created by the OS
ব্যাখ্যা

Virtual Memory is a memory management technique that creates the illusion of a very large main memory, even if the physical RAM is limited.

It allows processes to use more memory than what is physically available in RAM by temporarily moving data between RAM and secondary storage (like a hard disk / SSD).

The OS manages this process through paging or segmentation.

Thus, Virtual Memory makes the system think it has a much larger main memory, while in reality it uses a combination of RAM + disk space.

​Example:

If RAM = 4GB, and program needs 6GB, OS uses disk (swap space) to provide the illusion of larger memory.

​Others option:

Extremely large main memory → Wrong, physical RAM is limited.
Type of secondary storage → Wrong, VM is a concept, not a device.
Illusion of large memory → Correct
Memory management hardware → Wrong, hardware (MMU) supports it, but not VM itself.

​Source: Computer System Architecture (3rd Edition) by M. Morris Mano.

.
Which of the following is not a valid operating system structure?
  1. Monolithic System
  2. Layered Approach
  3. Virtual Machine
  4. Compiler-based System
সঠিক উত্তর:
Compiler-based System
উত্তর
সঠিক উত্তর:
Compiler-based System
ব্যাখ্যা

Operating system structures are designed to organize system functionality. Common ones include monolithic, layered, microkernel, and virtual machine. A compiler-based system is not an OS structure — it’s part of application software.

Example:

Monolithic → UNIX
Layered → THE OS, Windows NT
Virtual Machine → JVM, VMware
Compiler → GCC (not OS structure)

Source: Operating System Concepts by Silberschatz.

.
Which of the following works with logical data structures in an operating system?
  1. Application Programs
  2. Kernel Layer
  3. Device Drivers
  4. File Management
সঠিক উত্তর:
File Management
উত্তর
সঠিক উত্তর:
File Management
ব্যাখ্যা

The File Management layer in an operating system works with logical data structures such as:

Files (documents, images, executables)

Directories/Folders (organization of files)

File metadata (name, size, permissions, timestamps)

This layer abstracts physical details of storage (sectors, blocks, tracks) and instead provides the user/programs with a logical view.

The actual hardware-level operations (reading/writing sectors on disk) are handled by device drivers and I/O management, not by the file system directly.

​So, File Management = Logical view of data.

Example:
​When you save a file as report.docx:

File Management handles the logical structure (filename, directory, extension).

I/O System & Device Drivers handle how the data is written in disk blocks.

Applications only request the operation but don’t manage structure.


​Source: Computer System Architecture by M. Morris Mano

.
Which OS structure provides complete protection and resource isolation?
  1. Monolithic OS
  2. Layered OS
  3. Virtual Machine
  4. Microkernel
সঠিক উত্তর:
Virtual Machine
উত্তর
সঠিক উত্তর:
Virtual Machine
ব্যাখ্যা

Virtual Machines (VMs) provide complete system isolation by abstracting hardware into independent environments.

Each VM runs its own OS, which means processes inside one VM are fully isolated from another.

Example:

VMware, VirtualBox, KVM → run multiple OSes (Windows, Linux) independently.

Options:

 Monolithic OS → Not isolated.

 Layered OS → Some abstraction, not full isolation.

Virtual Machine → Full isolation 

Microkernel → Provides modularity, not full isolation.

​Source: Operating System Concepts by Silberschatz, 

.
What is the main disadvantage of a monolithic operating system structure?
  1. Poor performance
  2. Lack of modularity
  3. Slow system calls
  4. No system calls available
সঠিক উত্তর:
Lack of modularity
উত্তর
সঠিক উত্তর:
Lack of modularity
ব্যাখ্যা

In monolithic systems, the entire OS runs as one large program in kernel mode. It is fast (good performance) but hard to maintain and debug since any change requires recompiling the whole OS.

Example:

UNIX is monolithic → efficient but less modular.

Options:

Poor performance → Wrong, monolithic is fast.

Lack of modularity → Correct 

Slow system calls → Wrong, system calls are fast here.

No system calls → Wrong, monolithic has system calls.


​Source: Operating System Concepts by Silberschatz

.
In the process model, a process is best described as:
  1. A program in execution
  2. A software library
  3. A function inside the program
  4. A data structure
সঠিক উত্তর:
A program in execution
উত্তর
সঠিক উত্তর:
A program in execution
ব্যাখ্যা

A program is a passive entity (just instructions on disk).

A process is an active entity → a running instance of a program with its own program counter, registers, and variables.

Example:

File chrome.exe on disk = Program

Running Chrome window = Process

 

Options:

Program in execution → Correct 

Software library → Just code, not a process.

Function → Part of a program, not a process.

Data structure → Processes are represented using PCB, but process ≠ data structure.


​Source: Operating System Concepts by Abraham Silberschatz

.
Which of the following is not a process state in the process model?
  1. Running
  2. Ready
  3. Blocked (Waiting)
  4. Compiling
সঠিক উত্তর:
Compiling
উত্তর
সঠিক উত্তর:
Compiling
ব্যাখ্যা

Process states include New, Ready, Running, Waiting (Blocked), and Terminated.

Compiling” is an activity, not a standard OS-level process state.

Example:

If process is waiting for I/O → Blocked.

If CPU is executing → Running.

Options:

Running → Valid state.
Ready → Valid state.
Blocked → Valid state.
Compiling → Not a standard process state.

​Source: Operating System Concepts by Abraham Silberschatz

.
Which component of the OS is responsible for selecting which process should run next?
  1. Scheduler
  2. Dispatcher
  3. Process Control Block
  4. Interrupt Handler
সঠিক উত্তর:
Scheduler
উত্তর
সঠিক উত্তর:
Scheduler
ব্যাখ্যা

The Scheduler is the OS component that decides which process from the ready queue will run on the CPU next.

Since multiple processes may be waiting, the scheduler uses an algorithm (e.g., First-Come First-Served, Shortest Job Next, Round Robin, Priority Scheduling) to make the decision.

Important: After the scheduler selects the process, the Dispatcher is responsible for switching context and handing control of the CPU to that process.

Thus, the actual selection is the job of the Scheduler.
​Example:
​Suppose there are three processes in the ready queue:

P1 (needs 3 ms)
​P2 (needs 6 ms)
P3 (needs 4 ms)

If the scheduling policy is Shortest Job Next, the Scheduler selects P1 first, then P3, then P2.

The Dispatcher then loads P1’s context into the CPU.


​Source: Operating System Concepts by Abraham Silberschatz

১০.
Which of the following is not a method of Inter-Process Communication (IPC)?
  1. Message Passing
  2. Shared Memory
  3. Remote Procedure Call (RPC)
  4. Compiler Linking
সঠিক উত্তর:
Compiler Linking
উত্তর
সঠিক উত্তর:
Compiler Linking
ব্যাখ্যা

IPC allows processes to exchange data and synchronize.

Major methods: Message Passing, Shared Memory, and advanced techniques like RPC, Pipes, Sockets.

Compiler Linking is a program development activity, not IPC.

Example:

In UNIX, processes can communicate via pipes (|).

In client-server, RPC allows a client to invoke server functions remotely.

​Options:

Message Passing → IPC method.
Shared Memory → IPC method.
RPC → IPC method.
Compiler Linking → Not IPC

​Source: Operating System Concepts by Abraham Silberschatz

১১.
What is a common memory region in operating systems?
  1. A special area of memory shared between processes for communication
  2. A private memory allocated only to one process
  3. A section of cache memory used by the CPU only
  4. A read-only memory area for storing instructions
সঠিক উত্তর:
A special area of memory shared between processes for communication
উত্তর
সঠিক উত্তর:
A special area of memory shared between processes for communication
ব্যাখ্যা

A common memory region (often called shared memory) is a portion of memory that multiple processes can access simultaneously.

It is one of the fastest Inter-Process Communication (IPC) mechanisms, because data does not need to be copied between processes.

The operating system ensures that processes safely access this memory without conflicts (using synchronization tools like semaphores or mutexes).

​Example:

Two processes, Process A and Process B, want to exchange data. Instead of sending data through messages, the OS provides a common memory region where both can read/write.

This improves efficiency compared to message passing.

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

১২.
Which of the following IPC mechanisms is most suitable for communication between processes on different machines?
  1. Shared Memory
  2. Message Passing
  3. Threads
  4. Local Variables
সঠিক উত্তর:
Message Passing
উত্তর
সঠিক উত্তর:
Message Passing
ব্যাখ্যা

Shared memory only works on the same machine.

For communication across a network, message passing (e.g., sockets, RPC) is the correct method.

Example:

Client-server applications use TCP sockets for message-based communication.

​Options:

Shared Memory → Local only.
Message Passing → Works across machines
Threads → Within a process, not IPC across systems.
Local Variables → Not IPC at all.


​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum.

১৩.
Which of the following is an example of IPC in UNIX/Linux?
  1. Pipes
  2. Signals
  3. Message Queues
  4. All of the above
সঠিক উত্তর:
All of the above
উত্তর
সঠিক উত্তর:
All of the above
ব্যাখ্যা

UNIX/Linux supports multiple IPC mechanisms:

Pipes =data stream communication.
Signals = asynchronous notifications (e.g., kill -9).
Message Queues = structured message passing.

Example:

ls | grep txt → pipe
kill -9 PID → signal
msgsnd() → message queue

​​Source: Operating System Concepts by Abraham Silberschatz

১৪.
The Producer–Consumer problem is also known as:
  1. Bounded Buffer Problem
  2. Semaphore Problem
  3. Deadlock Problem
  4. File Sharing Problem
সঠিক উত্তর:
Bounded Buffer Problem
উত্তর
সঠিক উত্তর:
Bounded Buffer Problem
ব্যাখ্যা

The Producer–Consumer Problem is often called the Bounded Buffer Problem.
Producer generates data and puts it into a buffer; consumer removes data.
Synchronization needed to prevent overwriting (if buffer full) and underflow (if buffer empty).

Example:

Producer: YouTube uploader
Consumer: Viewer streaming video

​Source: Operating System Concepts by Abraham Silberschatz.

১৫.
The Readers–Writers problem mainly deals with:
  1. Race condition in file access
  2. Memory allocation among processes
  3. CPU scheduling fairness
  4. Deadlock in I/O
সঠিক উত্তর:
Race condition in file access
উত্তর
সঠিক উত্তর:
Race condition in file access
ব্যাখ্যা

Readers–Writers problem is about multiple processes accessing a shared database/file.
Many readers can read simultaneously, but a writer needs exclusive access.

Example:
Library system: Many can read a book record, but only one librarian can update it.

​Source: Operating System Concepts by Abraham Silberschatz.

১৬.
Which synchronization tool is not used to solve classical Inter-Process Communication (IPC) problems?
  1. Semaphore
  2. Monitors 
  3. Mutex locks
  4. Virtual memory 
সঠিক উত্তর:
Virtual memory 
উত্তর
সঠিক উত্তর:
Virtual memory 
ব্যাখ্যা

Classical IPC problems (like Producer–Consumer, Readers–Writers, Dining Philosophers) require synchronization mechanisms to avoid issues such as race conditions, deadlock, and starvation.
Semaphores, Mutex Locks, and Monitors are well-known synchronization tools used to solve these problems.
Virtual Memory, on the other hand, is not a synchronization tool. It is a memory management technique that gives an illusion of a large, continuous memory space by using secondary storage (like disk).

Thus, Virtual Memory does not directly solve IPC synchronization problems.

​Example:
Producer–Consumer Problem
Can be solved using Semaphores or Monitors.

Readers–Writers Problem
Solved using Mutex Locks or Semaphores.
Dining Philosophers Problem
Solved using Monitors, Semaphores, or Mutexes.
But Virtual Memory plays no role in these synchronization solutions.


Source: Operating System Concepts by Abraham Silberschatz

১৭.
What is used to protect critical sections in IPC problems?
  1. Semaphore
  2. Monitors
  3. Mutex locks
  4. Virtual Memory
সঠিক উত্তর:
Mutex locks
উত্তর
সঠিক উত্তর:
Mutex locks
ব্যাখ্যা

A critical section is a part of the code where a process accesses shared resources (e.g., variables, files, memory). If multiple processes enter their critical sections simultaneously, race conditions may occur.

To prevent this, synchronization tools are used.

The most common direct tool for protecting critical sections is the Mutex lock (Mutual Exclusion Lock).

A Mutex allows only one process/thread to enter the critical section at a time.

Other synchronization mechanisms like Semaphores and Monitors also help, but Mutexes are specifically designed for critical section protection.

​Virtual Memory is unrelated — it is a memory management technique.

​Example:
Bank Account Update Problem:
Two processes (P1 and P2) want to update a balance. Without a Mutex, both might withdraw at the same time and cause inconsistency.

​pthread_mutex_t lock;

pthread_mutex_lock(&lock); // Enter critical section

balance = balance - 100; // Update shared resource

pthread_mutex_unlock(&lock); // Exit critical section

​Here, the Mutex lock ensures only one process at a time updates the balance.

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

১৮.
Which scheduling algorithm gives the minimum average waiting time for a set of processes?
  1. FCFS
  2. Shortest Job First (SJF)
  3. Round Robin
  4. Priority Scheduling
সঠিক উত্তর:
Shortest Job First (SJF)
উত্তর
সঠিক উত্তর:
Shortest Job First (SJF)
ব্যাখ্যা

SJF is optimal for minimizing average waiting time, because it executes the shortest processes first, reducing overall delay.

Example:

Processes with burst times: {2, 4, 8} → Running shortest (2) first minimizes waiting.


Source: Operating System Concepts by Abraham Silberschatz

১৯.
In Round Robin (RR) scheduling, what does the performance mainly depend on?
  1. Number of processes
  2. Time quantum
  3. Process priority
  4. Arrival time
সঠিক উত্তর:
Time quantum
উত্তর
সঠিক উত্তর:
Time quantum
ব্যাখ্যা

Round Robin (RR) Scheduling is designed for time-sharing systems.

Each process gets CPU for a fixed time slice (time quantum) in a cyclic order.

The performance of RR (response time, turnaround time, and waiting time) depends mostly on the time quantum chosen:

If time quantum is too large → RR behaves like First-Come, First-Served (FCFS).

If time quantum is too small → Too many context switches occur → system overhead increases → performance degrades.

Optimal Time Quantum: Should be large compared to context switch time, but small enough for responsiveness.

​Example:

Suppose time quantum = 5 ms, context switch = 1 ms.

Each process runs for 5 ms per turn.

If quantum = 1 ms → too many switches (inefficient).

If quantum = 20 ms → behaves like FCFS (not fair).

 

So, the choice of time quantum directly affects system performance.


​Source: Operating System Concepts by Abraham Silberschatz

২০.
What is the main goal of CPU scheduling?
  1. To maximize CPU utilization
  2. To increase throughput and minimize waiting time
  3. To ensure fairness among processes
  4. All of the above
সঠিক উত্তর:
All of the above
উত্তর
সঠিক উত্তর:
All of the above
ব্যাখ্যা

CPU scheduling is one of the most important functions of the operating system.

The main goal is to decide which process in the ready queue gets the CPU next.

Key objectives are:

1. Maximize CPU utilization
Keep the CPU as busy as possible.
No idle CPU time unless necessary.

2. Increase throughput
Maximize the number of processes completed per unit of time.

​3. Minimize waiting time, turnaround time, and response time
Reduce average waiting time in the ready queue.
Provide faster response for interactive processes.

4. Fairness among processes
Ensure that no process suffers from starvation.
Every process gets a fair share of CPU.
Since CPU scheduling tries to balance all these goals together, the correct option is All of the above.


​Source: Operating System Concepts by Abraham Silberschatz

২১.
Which scheduling algorithm may lead to the convoy effect?
  1. FCFS
  2. SJF
  3. RR
  4. Priority
সঠিক উত্তর:
FCFS
উত্তর
সঠিক উত্তর:
FCFS
ব্যাখ্যা

In FCFS, if a long process is at the front of the queue, all shorter processes wait behind it → convoy effect.

Example:

If P1 = 20 ms, P2 = 2 ms, P3 = 2 ms → P2 and P3 suffer because P1 runs first.

Options:
FCFS → Causes convoy effect 

SJF → Avoids convoy effect.

RR → Fair, no convoy.

Priority → Starvation possible, not convoy.


​Source: Operating System Concepts by Abraham Silberschatz

২২.
Which performance criterion is most important in real-time systems?
  1. Throughput
  2. CPU utilization
  3. Response time
  4. Turnaround time
সঠিক উত্তর:
Response time
উত্তর
সঠিক উত্তর:
Response time
ব্যাখ্যা

In real-time systems, correctness depends not only on the logical result of computation but also on when the result is produced.

That means:

It is not enough to finish tasks eventually (turnaround time).

The system must respond within a strict deadline.

Therefore, response time is the most critical performance measure.

Other measures like throughput and CPU utilization are important for general-purpose systems, but in real-time computing, a fast and predictable response is the priority.

​Example:

In an airbag control system in cars:
If a crash is detected, the airbag must deploy within milliseconds.
Even if CPU utilization is low or throughput is high, if the response is delayed, the system fails.
In medical devices (e.g., pacemakers), late response can be fatal.
Thus, response time is more important than throughput or utilization.

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

২৩.
What is the main advantage of multiprocessing ?
  1. Reduced cost
  2. Improved throughput and reliability
  3. Simplified scheduling
  4. Reduced power consumption
সঠিক উত্তর:
Improved throughput and reliability
উত্তর
সঠিক উত্তর:
Improved throughput and reliability
ব্যাখ্যা

Multiprocessing increases throughput (more jobs completed per unit time).
Provides fault tolerance (if one CPU fails, others can continue).

Example:
Google servers use multiprocessing to handle millions of requests.

Options:

ক) Cost increases, not decreases.
গ) Scheduling becomes more complex.
ঘ) More CPUs consume more power.

​​Source: Operating System Concepts by Abraham Silberschatz.

২৪.
Which of the following years was Linux created by Linus Torvalds?
  1. 1989
  2. 1991
  3. 1993
  4. 1995
সঠিক উত্তর:
1991
উত্তর
সঠিক উত্তর:
1991
ব্যাখ্যা

Linux was created by Linus Torvalds in 1991 while he was a student at the University of Helsinki, Finland.

He initially developed it as a free and open-source operating system kernel, inspired by MINIX (a small UNIX-like system by Andrew S. Tanenbaum).

The first version (0.01) was released in September 1991.

Over time, it evolved into one of the most widely used operating systems, especially in servers, supercomputers, Android devices, and embedded systems.
​Example:

Linux 0.01 released in 1991 (only a few thousand lines of code).

Linux 1.0 officially released in 1994.


​Source:  Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

২৫.
Which of the following is a file type extension used for executable files in Windows?
  1. .exe
  2. .txt
  3. . jpg 
  4. .docx
সঠিক উত্তর:
.exe
উত্তর
সঠিক উত্তর:
.exe
ব্যাখ্যা

In Windows operating systems, an executable file is a program that can be directly run by the computer.

Such files usually contain binary code instructions that the operating system loads into memory and executes.

The standard extension for executable files in Windows is .exe (short for executable).

Other extensions are not executable by default:

.txt → Plain text document

.jpg → Image file (JPEG format)

.docx → Microsoft Word document

​Example:

notepad.exe → opens Windows Notepad program.

chrome.exe → runs Google Chrome browser.

If you rename a .txt or .jpg file to .exe, it will not become executable, because the file content is not valid machine code.


​Source: Operating Systems: Internals and Design Principles (8th Edition) by William Stallings

২৬.
Which mechanism reduces the need for swapping in modern operating systems?
  1. Contiguous memory allocation
  2. Paging and segmentation
  3. Single-user systems
  4. CPU scheduling
সঠিক উত্তর:
Paging and segmentation
উত্তর
সঠিক উত্তর:
Paging and segmentation
ব্যাখ্যা

Paging/segmentation allow only parts of a process to be in memory, reducing the need to swap entire processes.

Modern virtual memory uses this technique to avoid excessive swapping.

Example:

Linux and Windows use paging → load only required pages instead of full process.
​Options:

ক) Contiguous allocation may require full swapping.
গ) Single-user → no multiprogramming benefit.
ঘ) CPU scheduling unrelated.

​Source: Operating System Concepts by Abraham Silberschatz.

২৭.
Which I/O software layer is responsible for buffering, caching, and spooling?
  1. Device drivers
  2. Interrupt handlers
  3. I/O subsystem
  4. User-level I/O library
সঠিক উত্তর:
I/O subsystem
উত্তর
সঠিক উত্তর:
I/O subsystem
ব্যাখ্যা

I/O subsystem manages data transfer, buffering, caching, and spooling.
Ensures efficiency and prevents CPU from idling during slow I/O.

Example: 
​Print spooling allows multiple print jobs to queue while CPU continues other work.

Other Options:

ক) Device drivers =Interface with hardware, not full management
খ) Interrupt handlers =Handle device signals
ঘ) User-level library =Provides API, not hardware control

​Source: Operating System Concepts by Abraham Silberschatz

২৮.
Which type of disk organization stores data in concentric circles on platters?
  1. Magnetic tapes
  2. SSD (Solid-State Disk)
  3. Hard Disk Drive (HDD)
  4. Optical disks
সঠিক উত্তর:
Hard Disk Drive (HDD)
উত্তর
সঠিক উত্তর:
Hard Disk Drive (HDD)
ব্যাখ্যা

HDD stores data in tracks and sectors on rotating platters.

Data is accessed via read/write heads.

Example:
 C:\ drive on PCs is usually an HDD or SSD; HDD uses platters.

​Source: Operating System Concepts by Abraham Silberschatz

২৯.
Which terminal type is intelligent and can process data locally?
  1. Dumb
  2. Smart 
  3. Virtual
  4. Printer 
সঠিক উত্তর:
Smart 
উত্তর
সঠিক উত্তর:
Smart 
ব্যাখ্যা

Terminals are devices used to interact with a computer system.
They can be classified as:

Dumb Terminal

Has no processing capability.

Only sends keystrokes to the central computer and displays output.

Example: Classic VT100.

Smart Terminal

Has local processing power.

Can perform simple operations without relying entirely on the main computer.

Reduces communication load with the host.

Examples: IBM 3270 terminals.

​Virtual Terminal

A software-based terminal emulation running on a network.

Not a hardware type, cannot process data independently.

Printer Terminal

Outputs data in printed form only.

Does not process data locally.


​Source: Data Communications and Networking (5th Edition) by Behrouz A. Forouzan

৩০.
Which of the following is an example of sequential access storage device?
  1. Hard disk
  2. Magnetic tape
  3. SSD
  4. CD-ROM
সঠিক উত্তর:
Magnetic tape
উত্তর
সঠিক উত্তর:
Magnetic tape
ব্যাখ্যা

Sequential access means data must be read in order.

Magnetic tapes store data sequentially, making random access very slow.

Example: 
​Backup archives often use magnetic tapes.

Other Options:

Hard disk = Random access

SSD =Random access

CD=ROM → Random access


​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

৩১.
Which I/O scheduling algorithm is most commonly used in disk management to minimize seek time?
  1. FIFO
  2. Round Robin
  3. SCAN (Elevator algorithm)
  4. Priority scheduling
সঠিক উত্তর:
SCAN (Elevator algorithm)
উত্তর
সঠিক উত্তর:
SCAN (Elevator algorithm)
ব্যাখ্যা

SCAN moves the disk arm back and forth like an elevator, servicing requests along the way.

Reduces average seek time compared to FIFO.

Example: 
​Hard disk servicing read/write requests efficiently.

Options:

FIFO = First request first, may cause long delays

Round Robin =CPU scheduling, not disk

Priority=Causes starvation in disk requests


​Source: Operating System Concepts by Abraham Silberschatz

৩২.
Which I/O technique requires CPU intervention for each byte/word transferred?
  1. Programmed I/O
  2. Interrupt-driven I/O
  3. DMA
  4. Memory-mapped I/O
সঠিক উত্তর:
Programmed I/O
উত্তর
সঠিক উত্তর:
Programmed I/O
ব্যাখ্যা

CPU directly manages I/O by repeatedly checking device status.

Very inefficient compared to interrupt-driven or DMA.

Example:
​Early PCs used programmed I/O for floppy drives.

 

Interrupt-driven = CPU only when device signals

DMA = No CPU involvement

Memory-mapped I/O= Technique for accessing device registers

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

৩৩.
Which I/O software component responds immediately to device signals?
  1. Device driver
  2. Interrupt handler
  3. Spooler
  4. User library
সঠিক উত্তর:
Interrupt handler
উত্তর
সঠিক উত্তর:
Interrupt handler
ব্যাখ্যা

Interrupt handler (ISR) is invoked when an I/O device raises an interrupt.

Ensures fast response to device events.

Example: 
​Keyboard interrupt when a key is pressed.

Options:

Device driver =Controls device operations

Spooler = Manages print queues

User library = Provides API

​Source: Operating System Concepts by Abraham Silberschatz

৩৪.
Which of the following is a block device?
  1. Mouse
  2. Keyboard
  3. Hard disk
  4. Printer
সঠিক উত্তর:
Hard disk
উত্তর
সঠিক উত্তর:
Hard disk
ব্যাখ্যা

Block devices store data in blocks (e.g., disk drives).
Character devices transmit data as a stream (e.g., keyboard, mouse).

Example: 
​Hard disk transfers data in 512B or 4KB blocks.

Mouse = Character device

Keyboard = Character device

Printer = Character device

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

৩৫.
Which of the following is the fastest access storage device?
  1. Magnetic tape
  2. Hard disk
  3. SSD
  4. Optical disk
সঠিক উত্তর:
SSD
উত্তর
সঠিক উত্তর:
SSD
ব্যাখ্যা

SSD (Solid State Drive) is the fastest storage device among the given options.

It uses flash memory chips with no moving parts, so data can be accessed directly and very quickly.

Access time is in microseconds, much faster than mechanical storage.

​Example:
​NVMe SSD provides microsecond access times.

SSD Read speed: 500 MB/s – 7000 MB/s (NVMe SSDs)

HDD Read speed: 80 – 160 MB/s

Optical Disk (DVD): ~1.3 MB/s (single speed)

Magnetic Tape: Sequential only, very slow in retrieval.

​Source: Operating System Concepts by Abraham Silberschatz

৩৬.
In which year was MS-DOS introduced, allowing only one program to run at a time with single-user support?
  1. 1979
  2. 1981
  3. 1985
  4. 1990
সঠিক উত্তর:
1981
উত্তর
সঠিক উত্তর:
1981
ব্যাখ্যা

MS-DOS (Microsoft Disk Operating System) was first released in 1981 by Microsoft for the IBM PC.

It was a single-user, single-tasking operating system, meaning:

Only one user could operate it at a time.

It could run only one program at a time (no multitasking support).

Later improvements came with Windows (built on top of DOS) that introduced multitasking and GUI support.

​Example:

In MS-DOS, if a user opened a text editor, they could not simultaneously run another program (e.g., calculator). They had to close one to open another.

​​Source: Operating System Concepts by Abraham Silberschatz

৩৭.
Which of the following is the main purpose of a system clock in an operating system?
  1. To manage memory allocation
  2. To synchronize process execution
  3. To control file access permissions
  4. To increase CPU speed
সঠিক উত্তর:
To synchronize process execution
উত্তর
সঠিক উত্তর:
To synchronize process execution
ব্যাখ্যা

The OS uses a system clock (timer) to maintain time slices for process scheduling.
Without clocks, preemptive multitasking would not be possible.
Example:
​In Round Robin scheduling, each process gets a fixed time slice (quantum) based on the system clock.

Memory = Memory management, not clocks
File access = Managed by file system
CPU speed = Hardware dependent, not clock

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

৩৮.
Which clock keeps running even when the computer is turned off?
  1. System Clock
  2. CMOS Clock
  3. CPU Clock
  4. Timer Clock
সঠিক উত্তর:
CMOS Clock
উত্তর
সঠিক উত্তর:
CMOS Clock
ব্যাখ্যা

A computer uses a Real-Time Clock (RTC) chip, commonly referred to as the CMOS clock, which is powered by a small battery (CMOS battery).
This clock continues to run even when the computer is powered off, maintaining time, date, and system configuration data.
When the system boots, the operating system reads the CMOS clock and synchronizes the system clock.


System Clock 
Active only when the computer is running; it synchronizes processor operations.

CMOS Clock 
A battery-powered clock that runs continuously, even when the PC is off.

CPU Clock 
Generated by an oscillator, works only when the CPU is powered.

Timer Clock 
Used by the OS for scheduling tasks; not active when the machine is off.

​Source: Operating System Concepts by Abraham Silberschatz.

৩৯.
What is the function of a timer interrupt in an OS?
  1. To stop processes when they exceed their time slice
  2. To check file system errors
  3. To allocate memory
  4. To boot the operating system
সঠিক উত্তর:
To stop processes when they exceed their time slice
উত্তর
সঠিক উত্তর:
To stop processes when they exceed their time slice
ব্যাখ্যা

A timer interrupt ensures no process runs longer than its allocated time.
It enforces preemptive scheduling.

Example: 
​In time-sharing systems, processes are forced to yield when the timer expires.

File system errors → Checked by fsck tools
Memory allocation → Done by memory manager
Boot process → BIOS/UEFI task

Source: ​Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum.

৪০.
Which of the following is used to count the actual CPU time consumed by a process?
  1. Wall clock
  2. Process clock
  3. Real-time clock
  4. Calendar clock
সঠিক উত্তর:
Process clock
উত্তর
সঠিক উত্তর:
Process clock
ব্যাখ্যা

Process clock tracks CPU time (user + system) consumed by a process.

Different from wall clock time (real elapsed time).

Example:
​A process may take 5 seconds CPU time but 10 seconds wall clock time due to waiting.

Options:
ক) Wall clock → Total elapsed time
গ) RTC → Date/time
ঘ) Calendar clock → Same as RTC

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

৪১.
Which of the following data structures is commonly used for deadlock detection in operating systems?
  1. Binary Tree
  2. Process Table
  3. Wait-for Graph
  4. Resource Allocation Table
সঠিক উত্তর:
Wait-for Graph
উত্তর
সঠিক উত্তর:
Wait-for Graph
ব্যাখ্যা

A Wait-for Graph (WFG) is used for deadlock detection in a system with single instances of resources.
A cycle in the WFG → deadlock exists.

Example: 
​If P1 → P2 → P3 → P1 forms a cycle, the system is in deadlock.

Options:

Binary Tree → Not used in deadlock detection
Process Table → Stores process info, not detection
Resource Table → Used in resource management, not detection


​Source: Operating System Concepts by Abraham Silberschatz.

৪২.
Which of the following conditions is NOT necessary for deadlock to occur?
  1. Mutual Exclusion
  2. Hold and Wait
  3. Preemption
  4. Circular Wait
সঠিক উত্তর:
Preemption
উত্তর
সঠিক উত্তর:
Preemption
ব্যাখ্যা

The four necessary conditions for deadlock (Coffman’s conditions) are:
1. Mutual Exclusion – At least one resource must be non-shareable.
2. Hold and Wait – A process holding resources is waiting for others.
3. No Preemption – Resources cannot be forcibly taken away.
4. Circular Wait – Circular chain of processes waiting.
So, Preemption is NOT required, rather No Preemption is required.


​Source: Operating System Concepts by Abraham Silberschatz.

৪৩.
Which algorithm is used for deadlock avoidance by examining resource allocation state?
  1. Banker’s  Algorithm
  2. Peterson’s Algorithm
  3. Dijkstra’s Algorithm
  4. Round Robin Scheduling
সঠিক উত্তর:
Banker’s  Algorithm
উত্তর
সঠিক উত্তর:
Banker’s  Algorithm
ব্যাখ্যা

Banker’s algorithm simulates allocation and ensures system is always in a safe state.

Avoids deadlock before it happens.

Example:
​ If granting a request may cause unsafe state → deny request.

​Peterson’s → Mutual exclusion
Dijkstra’s → Shortest path, unrelated
Round Robin → Scheduling

​Source: Operating System Concepts by Abraham Silberschatz

৪৪.
Which deadlock condition is eliminated by resource ordering?
  1. Mutual Exclusion
  2. Hold and Wait
  3. Circular Wait
  4. No Preemption
সঠিক উত্তর:
Circular Wait
উত্তর
সঠিক উত্তর:
Circular Wait
ব্যাখ্যা

If processes request resources in ascending order → cycle cannot form.

Example:

Resources R1 < R2 < R3.

A process holding R1 must request R2 next, never R3 first → breaks cycle.


​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum.

৪৫.
In deadlock recovery, which of the following is not a method?
  1. Process Termination
  2. Resource Preemption
  3. Ignore the problem
  4. Rollback of processes
সঠিক উত্তর:
Ignore the problem
উত্তর
সঠিক উত্তর:
Ignore the problem
ব্যাখ্যা

Deadlock recovery deals with removing a deadlock after it has occurred.
Common recovery methods include:

(i) Process Termination → Killing one or more processes to break the deadlock.
(ii) Resource Preemption → Forcibly taking resources away from processes.
(iii) Rollback → Rolling back processes to a previous safe state.

However, “Ignore the problem” (also called the Ostrich Algorithm) is NOT a recovery method.

It is used in some systems (like UNIX) as a deadlock handling strategy, not recovery.

The system simply pretends deadlocks don’t happen.

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum

৪৬.
Which type of directory structure allows the same file to be accessed from multiple directories?
  1. Single-level directory
  2. Two-level directory
  3. Acyclic graph directory
  4. Tree-structured directory
সঠিক উত্তর:
Acyclic graph directory
উত্তর
সঠিক উত্তর:
Acyclic graph directory
ব্যাখ্যা

Acyclic graph directory allows shared subdirectories or files using links.
Single-level and two-level → no sharing.
Tree-structured → hierarchical but no shared files.

Single-level → all files in one folder → no sharing
Two-level → separate user directories → no sharing
Tree-structured → no multiple parents

Example:
In UNIX → hard/soft links create acyclic graph directories.

Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum.

৪৭.
Which problem is segmentation most vulnerable to?
  1. Internal fragmentation
  2. External fragmentation
  3. Thrashing
  4. Deadlock
সঠিক উত্তর:
External fragmentation
উত্তর
সঠিক উত্তর:
External fragmentation
ব্যাখ্যা

Segmentation divides a program into variable-sized segments (e.g., code, data, stack).
Since segments are variable in size, they are placed in memory wherever free space is available.
Over time, free memory becomes scattered into small holes → External Fragmentation.

​Example:

Suppose memory has holes of 5 KB, 10 KB, and 15 KB free.
A 12 KB segment cannot fit into any hole, even though total free memory (30 KB) is enough.
This is External Fragmentation, common in segmentation.

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum.

৪৮.
If the page size is 4 KB and a logical address is 18,432, the page number is:
  1. 4
  2. 5
  3. 6
  4. 7
সঠিক উত্তর:
5
উত্তর
সঠিক উত্তর:
5
ব্যাখ্যা

Following here please,
​Page number = Logical Address ÷ Page Size

Page offset = Logical Address % Page Size

Step-by-step:
​Given that,

Logical Address = 18,432 bytes

Page Size = 4 KB = 4096 bytes

∴ Page Number = 18,432 ÷ 4096 = 4.5 →integer part = 4 (0-based indexing → 0,1,2,3,4 → Page 4)

 

Careful: 
​BCS often uses 1-based indexing, so answer could be 5.

Now,

Offset = 18,432 % 4096 = 4096 × 4 = 18,432 → Offset = 0 (start of page).

​Source: Modern Operating Systems (4th Edition) by Andrew S. Tanenbaum.