Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
59 views8 pages

Practice Fullmcqs

The document contains a series of questions and answer choices related to operating systems, covering topics such as process management, memory management, scheduling algorithms, and system calls. Each question is followed by multiple-choice answers, with the correct answer indicated. The document serves as a quiz or study guide for understanding key concepts in operating systems.

Uploaded by

Dikshit Singla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views8 pages

Practice Fullmcqs

The document contains a series of questions and answer choices related to operating systems, covering topics such as process management, memory management, scheduling algorithms, and system calls. Each question is followed by multiple-choice answers, with the correct answer indicated. The document serves as a quiz or study guide for understanding key concepts in operating systems.

Uploaded by

Dikshit Singla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Question Description Answer Choice 1 Answer Choice 2 Answer Choice 3 Answer Choice 4 Correct Answer Choice

In a time-sharing system, if 5 processes are sharing the CPU and each


1000 ms 800 ms 1200 ms 600 ms 1
process gets 200 ms time slice, what is the response time for any process?
A system has 1 GB of RAM and uses virtual memory. If each page is 4 KB
and the page table size is 1 MB, how many entries does the page table 256,000 262,144 64,000 128,000 2
have?
Which of the following techniques minimizes thrashing in a virtual memory
Increasing the CPU scheduling priority Increasing the page size Reducing the degree of multiprogramming Decreasing the time slice 3
system? When a process accesses a page that is currently
In which condition does a page fault occur? When a page is corrupted When the operating system crashes When a page is modified 1
not in memory To allow processes to be temporarily
What is the primary purpose of swapping in operating systems? To reduce fragmentation To increase memory size To allocate continuous memory blocks 3
When a process enters the critical Whenremoved from
a process main memory
exceeds the allocated When a process releases an I/O device
What is a race condition in operating systems? When two processes wait for each other indefinitely 2
Which of the following mechanisms does a system use to enforce mutual section without proper synchronization time prematurely
Semaphore Priority queue Process scheduling Deadlock detection 1
exclusion?
Consider a system with a 64-bit address bus and a page size of 8 KB. How
2^51 2^48 2^46 2^49 1
many
A disk with page
10,000 frames
tracks hascan be addressed
a seek time of 10 inmsphysical
for 100 memory?
tracks. What is the
50 ms 25 ms 40 ms 60 ms 1
If a process takes 50average seek time
ms to complete forthe
and 500I/Otracks?
wait time is 20 ms, what is
60% 50% 80% 70% 3
the CPU utilization during this process? the number of processes in the ready
What is the degree of multiprogramming? the number of processes executed per unit time the number of processes in the I/O queue the number of processes in memory 4
state
The number of processes completed per unit time is known as __________ Output Throughput Efficiency Capacity 2
In Unix, which system call creates a new process? fork() exec() open() close() 1
What is the primary function of an operating system? To manage hardware resources to manage softwares To interact with users All of the above 4
A process is a heavy-weight entity, while a thread is a process runs in RAM while thread runs in
What is the difference between a process and a thread? both are same All of the above 1
a lightweight entity Secondry device
The address of a page table in memory is pointed by ____________ stack pointer page table base register register program counter 2
Memory management technique in which system stores and retrieves data
fragmentation paging mapping none of the mentioned 2
from secondary storage for use in main memory is called?
——- is contained by the page table accumulator size base address of every page ram size logical address 2
The address generated by CPU is: absolute address logical address physical address mac address 2
Which of the following is responsible for process scheduling in an operating
mouse process scheduler Hard Disk Keyboard 2
Which of the following scheduling system?
algorithms uses time slices or time quanta
First-Come-First-Serve (FCFS) Shortest Job Next (SJN) Round Robin (RR) Priority Scheduling 3
for each process? To hold processes that are waiting for To hold processes that have completed
What is the purpose of the Ready Queue in process scheduling? To hold processes that are waiting for I/O To hold processes that are waiting for memory 2
Which scheduling algorithm selects the process with the shortest total burst CPU to execute execution
First-Come-First-Serve (FCFS) Shortest Job Next (SJN) Priority Scheduling Round Robin (RR) 2
time first?
What is the main disadvantage of the Round Robin scheduling algorithm? Poor throughput High turnaround time Inefficient use of CPU Low response time 1
To swap processes in and out of main
What is the purpose of context switching? To select processes from the Ready Queue To allocate CPU to processes To handle I/O operations 2
Which scheduling algorithm allows processes to hold the CPU for an memory
Round Robin (RR) Shortest Job Next (SJN) weighted round robin Priority Scheduling 1
extended time?
What is the goal of process synchronization in operating systems? To improve process communication To prevent deadlocks To allocate memory efficiently To manage disk space 2
Which of the following is a characteristic of a distributed file system? Centralized storage Limited scalability redundant data File distribution across multiple servers 2
Which scheduler Speed is fastest? LTS MTS STS NOT 2
A_________ is the mechanism to store and restore the state\ PCB program counter scheduling queue context switching 4
In which type of system is deadlock most likely to occur? Single-user system Batch processing system Multi-programming system Real-time system 3
It is a part of the program where the process It ensures mutual exclusion without any
Which of the following is true about a critical section? It cannot cause a deadlock It is not part of the concurrency problem 1
updates shared resources issues
What does the Banker’s Algorithm avoid in an operating system? Starvation Deadlock Fragmentation Thrashing 2
It requires the whole program to be It allows processes to exceed the physical
Which of the following statements about virtual memory is true? It uses physical memory more efficiently It removes the need for memory management 3
A system uses 32-bit virtual addresses and 4 KB page size. How many loaded into memory memory size
In a Round Robin scheduling 2^22 2^20 2^18 2^12 2
entries will algorithm,
be there inifthe
thepage
time slice
table?is 100 ms and there
are 5 processes, what will be the turnaround time for a process that needs 500 ms 300 ms 400 ms 600 ms 4
If a disk rotates at 5400 RPM300 andmshas
of an
CPU average
time? seek time of 12 ms, what is
If a CPU scheduling algorithm 18 ms 20 ms 24 ms 30 ms 3
the average timeallocates
to read a10%blockoffrom
the CPU time to I/O-bound
the disk?
processes, and there are 4 such processes, what is the total time allocated to 25% of CPU time 10% of CPU time 40% of CPU time 50% of CPU time 3
A system has a page size all of 1 KB andprocesses?
I/O-bound supports 64-bit virtual addresses.
1 TB 512 GB 64 PB 4 TB 3
What is
A virtual memory the size
system hasofathe virtual
page sizememory
of 4 KB space?
and the page table
16,384 32,768 64,000 8,192 1
occupies 128 KB of memory. How many entries does the page table have? Have multiple programs waiting in a
What is the objective of multiprogramming? Have a process running at all time To increase CPU utilization None of the mentioned 3
queue ready to run the activity to next be executed by the
The state of a process is defined by __________ the final activity of the process the activity just executed by the process the current activity of the process 4
To translate virtual memory addresses to physical To manage the allocation and to Store process process
related data in a data
What is the purpose of a PCB? All of the above 3
memory addresses deallocation of memory structure
Program always deals with ____________ logical address absolute address physical address relative address 1
Run time mapping from virtual to physical address is done by ____________ Memory management unit CPU PCI None of the mentioned 1
Which one of the following is the address generated by CPU? physical address absolute address logical address none of the mentioned 3
With limit registers and relocation, each logical address must be _______ the
Not equal to equal to greater than less than 4
limit register.
wihich is worst algorithm for hole finding? worst fit first fit best fit good fit 1
To load and store the system data from memory ——- is used register RAM ROM BUSES 2
For ——– the page table is maintained by the Operating System each instruction each process each thread each address 2
providing less address space to
CPU register are used to to store data to protect the address spaces of processes providing more address space to processes 1
processes
Which of the following stores process data in a dataStructure? CPU Operating system memory management unit PCB 4
—— is used to point the address of a page table in memory register program counter stack pointer page table base register 4
To swap processes in and out of main To prevent two or more processes from completing
What is the purpose of swapping in process management? To increase system speed To improve process communication 2
memory and put another process their execution
Which of the following is NOT a state of a process in the process life cycle? Ready Running Standby Terminated 3
Wastage of storage space due to small
What is fragmentation in the context of file systems? Efficient organization of files Fast file access Compression of files 1
While executing a program, if the program references a page which is not free spaces
demand paging frame fault page fault process fault 3
available in the main memory then it is known as?
To store information about files, such as their name, To organize files into a hierarchical
What is the purpose of a file directory? To make it easier for users to find files All of the above 2
size,
To prevent multiple and location
processes from accessing a file structure To ensure that data is stored in a reliable
What is the purpose of a file lock? To prevent data corruption All of the above 4
simultaneously and consistent manner
How many state are there in Process Life Cycle? 4 5 6 7 2
What is the initial state of a process when it is created? Running Ready Waiting New New
In which state is a process waiting for an event like I/O or a signal? Running Ready Waiting New Waiting
A process that is ready to execute but has not been assigned a CPU is in
Running Ready Waiting New Ready
which state?
A process that is currently executing on a CPU is in which state? Running Ready Waiting New Running
A process that is waiting for a resource that is currently unavailable is in
Blocked Ready Running Terminated Blocked
whichastate?
What is the process of transferring process from the ready state to the
Context switching Dispatching Scheduling Preemption Dispatching
running state called? A data structure that contains information about a A data structure that contains information about a
What is a process control block (PCB)? A scheduling algorithm A memory management technique A synchronization mechanism
Process ID, program counter, registers, process Process ID, programprocess
counter, registers, memory
What information is typically stored in a PCB? File system information Network connection details Device driver information
memory allocation A condition where 2 or mor process are wait for A condition where 2allocation
or mor process are wait for
What is a deadlock? A memory management technique A scheduling algorithm A synchronization mechanism
each othr to rlase resourse each othr to rlase resourse
What is a process? A data structure A sequence of instructions A hardware component A program in execution A program in execution
To manage the flow of data between the CPU and To manage the flow of data between the CPU and
What is the primary function of an input/output (I/O) system? To execute instructions To store data To control the system clock
external devices external devices
Which of the following is NOT a type of I/O device? Keyboard Monitor CPU Printer CPU
What is the basic unit of data transfer between the CPU and I/O devices? Byte Word Block Sector Byte
To control the flow of data between the CPU and I/O To control the flow of data between the CPU and I/O
What is the purpose of I/O controllers? To execute instructions To store data To control the system clock
Which I/O technique transfers data directly between the I/O device and main devices devices
Programmed I/O (PIO) Interrupt-driven I/O Direct Memory Access (DMA) Memory-mapped I/O Direct Memory Access (DMA)
memory, without involving the CPU?
What is the main advantage of DMA over programmed I/O? Higher data transfer rates Lower CPU overhead Simpler implementation All of the above All of the above
In memory-mapped I/O, I/O devices are treated as memory locations. How By using regular memory access
By using special I/O instructions By using interrupts By using DMA By using regular memory access instructions
does
Which I/O technique the CPU access
is commonly used forthese locations?
high-speed devices like disks and instructions
Programmed I/O (PIO) Interrupt-driven I/O Direct Memory Access (DMA) Memory-mapped I/O Direct Memory Access (DMA)
network interfaces?
Which system call is used to create a new file? open() create() mkdir() fopen() open()
Which system call is used to read data from a file? read() write() open() close() read()
Which system call is used to write data to a file? read() write() open() close() write()
Which system call is used to close a file descriptor? read() write() open() close() close()
Which system call is used to rename a file? unlink() rmdir() rename() open() rename()
Which system call is used to create a directory? mkdir() rmdir() rename() open() mkdir()
Which system call is used to remove a directory? mkdir() rmdir() rename() open() rmdir()
Which system call is used to move the file pointer within a file? open() read() write() seek() seek()
Which system call is used to create a new process? fork() exec() wait() exit() fork()
Which system call is used to wait for the termination of a child process? fork() exec() wait() exit() wait()
Which system call is used to terminate the current process? fork() exec() wait() exit() exit()
Which system call is used to change the data segment size for a process in
munmap() sbrk() mmap() brk() brk()
heapamemory?
Which system call is used to map file or device into a process's address
brk() sbrk() mmap() munmap() mmap()
Which system call is used to unmapspace?
a memory-mapped file from a process's
brk() sbrk() mmap() munmap() munmap()
Which system calls are used toaddress space?
lock and unlock pages in memory to prevent
brk() and sbrk() mmap() and munmap() mlock() and munlock() malloc() and free() mlock() and munlock()
them from being swapped out?
Which system call is used to create a pipe for interprocess communication? fork() exec() wait() none of the above none of the above
Which system call is used to read from a pipe? read() write() open() close() read()
Which system call is used to write to a pipe? read() write() open() close() write()
Which system call is used to create a message queue for interprocess
msgget() msgsnd() msgrcv() msgctl() msgget()
Which system call is usedcommunication?
to create a shared memory segment for
shmget() shmat() shmdt() shmctl() shmget()
interprocess
Which system call is used communication?
to take control access of opened file or a device
open() read() access() close() open()
file?
Which system call is used to read data from a device file? read() write() open() close() read()
In a uniprogramming system, how many programs can be executed at a time? One Two Many Depends On the System One
A single program to be executed on
Multiprogramming allows for: Multiple programs to be executed simultaneously Multiple tasks within a single program Real-time processing Multiple programs to be executed simultaneously
Running multiple programs simultaneously on a multiple CPUs on multiple
Running multiple programs Running multiple tasks within a single
Multitasking refers to: Real-time processing Running multiple tasks within a single program
single CPU
Running multiple programs simultaneously on a Running multipleCPUs
programs on multiple program
Running multiple tasks within a single
Multiprocessing involves: Real-time processing Running multiple programs on multiple CPUs
single CPU CPUs with limited
Specialized computers program
Embedded systems are typically: General-purpose computers High-performance computing systems Large-scale server systems Specialized computers with limited resources
resources
Real-time systems are designed to: Process data as quickly as possible Provide a user-friendly interface Handle large datasets Run on embedded devices Process data as quickly as possible
Which of the following is a common handheld operating system? Windows 11 macOS Android Linux Android
Which of the following is an example of a real-time system? A word processor A web browser A flight control system A database management system A flight control system
Which of the following is a key advantage of multiprogramming? Improved CPU utilization Increased system overhead Reduced response time Both A and C Both A and C
Preemptive for real-time, non-preemptive
What is the difference between preemptive and non-preemptive multitasking? Preemptive allows OS to interrupt. Non-preemptive allows OS to interrupt. No difference. Preemptive allows OS to interrupt.
for general-purpose.
What is a thread? A lightweight process A process control block A memory management technique A synchronization mechanism A lightweight process
Threads share the same address space, processes Threads have their own stack, while Threads are created using the fork() Threads are more expensive to create and manage Threads share the same address space, processes
How do threads differ from processes?
hv sparate address spaces. processes do not. system call than processes. hv sparate address spaces.
What is the primary advantage of using threads over processes? Improved performance Increased security Simplified programming All of the above All of the above
A situation where two or more threads are competing for access to a shared
To allocate and deallocate memory to processes To manage I/O operations To schedule processes To handle system calls To allocate and deallocate memory to processes
resource To translate virtual addresses to physical
What is the purpose of a memory management unit (MMU)? To manage I/O operations To schedule processes To handle system calls To translate virtual addresses to physical addresses
Which scheduling algorithm selects the process with the shortest estimated addresses
First-Come-First-Served (FCFS) Shortest Job First (SJF) Priority Scheduling Round Robin Shortest Job First (SJF)
burst time for execution?
SJF is an example of which type of scheduling algorithm? Preemptive Non-preemptive Both preemptive and non-preemptive Neither preemptive nor non-preemptive Non-preemptive
What is the main disadvantage of SJF scheduling? It can lead to starvation of long processes . It is difficult to implement It is not suitable for interactive systems It has high overhead It can lead to starvation of long processes
Which of the following is a variation of SJF scheduling? Priority Scheduling Shortest Remaining Time First (SRTF) Round Robin None of the above Shortest Remaining Time First (SRTF)
The space within an allocated block of
What is external fragmentation? The space between allocated blocks of memory A memory management technique A scheduling algorithm The space between allocated blocks of memory
Which memory allocation strategy is more susceptible to external memory
Contiguous allocation Segmentation Paging None of the above Contiguous allocation
fragmentation?
What is the primary goal of partition allocation policies? To manage the allocation of memory to processes To schedule processes To handle I/O operations To control the system clock To manage the allocation of memory to processes
Which partition allocation policy allocates contiguous blocks of memory to
Fixed-partition allocation Variable-partition allocation Buddy system Place allocation Fixed-partition allocation
processes?
Which partition allocation policy is often used in operating systems that
Fixed-partition allocation Variable-partition allocation Buddy system none of above Variable-partition allocation
What is the term forsupport dynamic
the process statememory
where allocation?
a process is waiting for some
Running Blocked Ready Suspended 2
event removed
In which process state is a process to occur?from memory and placed back
Ready Blocked Suspended Terminate 3
in the job queue?
Which information is typically stored in the Process Control Block (PCB)? Process ID and priority CPU registers and program counter Base and limit registers All of the above 4
What is the state of a process after it has been loaded into the main memory? Ready Running Blocked New 2
What is the role of the scheduler in process management? Allocating memory to processes Determining which process to run next Managing file systems Controlling input/output devices 2
Which scheduling queue typically holds processes that are waiting for I/O? Ready queue Waiting queue Execution queue New queue 2
What is the purpose of the PCB? To store the process execution state To manage the process queue To handle memory allocation To control I/O operations 1
Which scheduling
Consider algorithm
three processes provides
with the minimum
burst times average
of 4, 8, and waiting
6 units. If thetime?
time First-Come-First-Serve (FCFS) Shortest Job Next (SJN) Round Robin (RR) Priority Scheduling 2
quantum is 5 units, what is the turnaround time for the last process in Round 13 units 18 units 21 units 24 units 3
What is the primaryRobin scheduling?
advantage of using virtual memory? Faster access to data Increased program size Better utilization of the CPU More efficient use of physical memory 2
In a multi-programming environment, what does the term "context switch"
Changing the state of a process Allocating memory to a process Handling I/O operations Swapping processes in and out of main memory 4
refer to?
Which algorithm selects the process with the highest priority for execution? Round Robin (RR) Shortest Job Next (SJN) Priority Scheduling First-Come-First-Serve (FCFS) 3
The stack pointer is a register that points to the Push of the stack Bottom of the stack Top of the stack Pop of the stack 2
What is the purpose of file permissions in a file system? To control access to files and directories To compress files for storage To organize files in a directory To encrypt file contents 1
Which of the following is an example of a non-pre-emptive scheduling
Round Robin Shortest Job Next (SJN) Priority Scheduling Multilevel Queue Scheduling 3
Which page replacement algorithm algorithm?
replaces the page that has not been used
FIFO (First-In-First-Out) LRU (Least Recently Used) Optimal MRU (Most Recently Used) 2
for the longest period of time? Moving a process from the ready queue to the Moving a process from main memory to
Consider theWhat
set ofis swapping
6 processes in the context
whose of operating
arrival systems?
time 0,1,2,3,4,5 and burst time Exchanging data between two processes Allocating memory to a new process 2
execution queue disk and vice versa
are 7,5,3,1,2,1
Consider If thestring:
a reference CPU scheduling policy
4, 7, 6, 1, 7, 6, 1,is2,shortest
7, 2. theremaining
number oftime first,in
frames 4 5 6 3 1
the memory calculate the average waiting time 3 4 5 6 3
A system uses isa 3. Find out the
round-robin number of
scheduling page faults
algorithm withusing
a timeOptimal
quantum Page
of 20
Replacement Algorithm
milliseconds. If a process requires 60 milliseconds of CPU time, how many 1 2 3 4 3
What is a potential drawback
times willofit using the Priority
be scheduled Round-Robin scheduling
to run? Increased waiting time for high-priority
Unequal CPU time distribution Improved system throughput Reduced context switching overhead 2
What challenge is associated withalgorithm?implementing the Shortest Job First (SJF) tasks
Improved CPU efficiency Difficulty in predicting burst times Reduced waiting time for long processes Enhanced fairness among processes 2
scheduling
If a computer system usesalgorithm in a dynamic
fixed partitioning environment?
for memory management, what is
Increased internal fragmentation Efficient memory utilization Improved context switching time Reduced CPU overhead 1
a potential
If a process holds adrawback
lock and isofwaiting
having for
a large numberwhat
a resource, of partitions?
is the state of the
Running Ready Blocked Terminated 3
process?
In a multithreading environment, what is a potential benefit of using user-level
Improved thread synchronization Enhanced parallelism Simplified context switching Efficient memory utilization 2
threads
If a process requires a largeover kernel-level
contiguous blockthreads?
of memory and the system
Increased page fault rate Efficient memory utilization External fragmentation Improved TLB efficiency 3
usesispaging,
In a file system, what whatadvantage
a potential problem might occur?
of using the Master File Table
Reduced disk I/O speed Improved data reliability Simpler directory structures Enhanced disk space utilization 4
(MFT) approach over the File Allocation Table (FAT) method?
What is the primary purpose of a Process Control Block (PCB)? To manage file operations To store information about a process To allocate memory To control input/output devices 2
Which of the following is a valid process state? Running Sleeping Blocked All of the above 4
Which page replacement algorithm is based on the principle of discarding the
FIFO LRU Optimal Page Replacement Clock 2
page that has not been used for the longest time?
What is the purpose of a short-term scheduler? Allocating CPU time to processe Allocating memory to processes Allocating I/O devices to processes Allocating disk space to processes 1
In paging, what is the term for a fixed-size contiguous block of virtual
Page Frame Blocked New 1
memory? A mechanism to share memory A way to divide a process into multiple
What is threading in the context of operating systems? A type of process A form of file organization 3
Which type of memory management allows processes to be allocated between processes threads
Contiguous
Pre-emptive memorytoallocation
allows a process be interrupted and Non-pre-emptivePaging
allows a process to Segmentation Fragmentation
Pre-emptive scheduling is used in real-time 2
physical
What is the memory that
main difference is not pre-emptive
between necessarily contiguous?
and non-pre-emptive Both pre-emptive and non-pre-emptive
moved out of the CPU, while non-pre-emptive does be interrupted and moved out of the systems, while non-pre-emptive is used in general- 1
scheduling? Dividing memory into variable-sized scheduling operate the same way.
What is segmentation in memory management? Dividing memory not.
into fixed-size blocks CPU, while pre-emptive does not. Allocating memory in a contiguous manner purpose
Allocating memorysystems.
dynamically 2
segments
What is a Process Control Block? Process type variable Data Structure A secondary storage section A Block in memory 2
A single thread of control allows the process to perform only one task at a time multiple tasks at a time only two tasks at a time all of the mentioned 1
In a preemptive multitasking system, what triggers a process transition from
Completion of execution ThreadsExternal interrupt
have their own program I/O operation System call 2
running to ready state? Processes have their own memory space, while Processes are lightweight, while threads Threads can't run concurrently, while processes
What is the key difference between a process and a thread? counter, while processes share the 1
threads share the same memory space. are heavyweight can.
FourInjobs to be executed
a multithreaded on a single
system, processor
what is system arrive atused
thread synchronization timefor?
0 in the To improve CPU scheduling same program counter.
To prevent race conditions To increase thread priority To manage thread termination 2
order A, B, C, D. Their burst CPU time requirements are 4, 1, 8, 1 time units
Consider a reference string: 4, 7, 6, 10 4 8 9 4
respectively. The completion time of1,
A 7, 6, 1,round
under 2, 7, 2. the scheduling
robin number of frames in
with time
the
In amemory is 3. Find
multithreading out
slicethe
of number
environment, oneiftimeofunit
page
a system is- faults using
follows LRU Page
a priority-based 3 6 5 4 2
Replacement Algorithm
scheduling algorithm with thread priorities ranging from 1 to 10, what is the 1 5 10 It depends on the system configuration 4
In a system with two threads
priority of asharing a common
newly created resource, if thread A is
thread? Running Ready Blocked Terminated 3
executing a critical section, what is the state of thread B?
Threading in operating systems introduces complexities related to: Memory fragmentation Process synchronization TLB management Disk scheduling 2
Swapping in process management may lead to: Decreased context switching time Improved CPU utilization Increased I/O overhead Reduced memory fragmentation 3

In a In a demand-paging
multiprocessing system,
system, threewhat is the purpose
processes of the page
are in execution. table? A is
Process Manage TLB entries Map logical to physical addresses Handle page replacement Allocate main memory to processes 2
waiting for an
A process I/Oa operation,
with high priorityProcess B is in the
is continuously running
arriving in state, and Process
the system, causingC Ready Blocked Terminated Zombie 3
has completed its execution. What state is Process C in
other processes with lower priority to wait for a long time. What schedulingnow? Aging Round-Robin Priority adjustment FCFS 1
A file system uses a flat directory structure. What challenge
queue management strategy would address this issue? might arise as the Difficulty in organizing and searching for
Improved file access speed Reduced file fragmentation Efficient use of disk space 3
number of files in the system increases? files
Holes in memory caused by processes being loaded
What is external fragmentation? Unused memory within a partition Memory blocks of varying sizes Memory blocks of fixed sizes 1
and removed Loading pages into memory only when Swapping pages in and out of memory Allocating a fixed amount of memory for each
What is demand paging in virtual memory? Loading all pages into memory at program startup 2
Which scheduling algorithm uses the principle of giving each process a fixed they are needed constantly process
Round Robin First Come First Serve (FCFS) Shortest Job Next (SJN) Priority Scheduling 1
time slot? When the priority of each process is When the length of each process is known When the arrival time of each process is known in
In which situation would a priority scheduling algorithm be most appropriate? When all processes are of equal importance 2
known in advance in advance advance
What is the purpose of virtual memory? To provide additional RAM To create a virtual machine To emulate different operating systems To manage processes 1
What is the purpose of a process control block (PCB)? To manage file systems To storeThe
Ready: process-related information
process is waiting to run To control network connections To allocate memory to processes 2
Running: The process is currently executing on the Waiting: The process is waiting for a
What are the different process states? and is available to be scheduled onto all of the above 4
CPU. resource, such as I/O or memory.
What is the key advantage of multithreading? Improved program structure the CPU.
Enhanced parallelism Simplified debugging All of the above 2
Excessive page faults, leading to a decrease in Sudden termination of processes due to insufficient
What is thrashing in the context of virtual memory? Efficient memory management Rapid swapping of processes 1
system performance Represents a process waiting for an memory
What is the role of the zombie state in the context of process states? Represents a process that has terminated Represents a process in the running state Represents a process that is ready to execute 1
event
When a page is accessed and is not in
Consider the setInofdemand
3 processespaging, whatarrival
whose is a page timefault?
0,3,5 and burst time When a page is loaded into memory
memory
When a page is swapped out of memory When a page is allocated to a process 2
are2,1,6 If
Consider a the CPU scheduling
reference string: 4, 7,policy
6, 1, is
7, FCFS,
6, 1, 2,calculate
7, 2. the the average
number waiting
of frames in 3 0 1 4 2
time
the memory is 3. Find out the number of page faults using FIFO Page 3 6 determine the 5 2 2
Access methods Access methods control how files are
Discuss the role of accessReplacementmethods in a Algorithm
file system and provide an example Access methods define file attributes, and an Access methods manage file access permissions,
sequence of file operations, and an stored and retrieved, and an example is 3
A file system uses the ofFile
a common
Allocation access
Table method.
(FAT) to manage file storage. example is the file control block. Difficulty in organizing and searching for and an example is the file allocation table.
If a system uses a Round-Robin scheduling algorithm with a time quantum of Accelerates random access time example
Reduces diskisspace
indexing.
wastage hashing. Minimizes directory search time 1
20 milliseconds How does the FAT
and has threecontribute
processes, to each
file retrieval
requiringefficiency?
30 milliseconds of files
1 2 3 4 3
InCPU time, how many
a demand-paging times will
system, a page eachfault
process
occurs, getandto execute before
the required the is
page next
not
In a preemptive process in thesystem
queue gets a turn? Major page fault Minor page fault Critical page fault Access violation 2
in memory.Priority
What scheduling
is the specific namewith priorities
for this ranging
type of from 1 to 5,
page fault?
Inif aa Priority
processRound-Robin
with priority 3scheduling
is currentlysystem,
running, a and a process
low-priority with priority
process has been4 Priority 3 process Priority 4 process None Both will run concurrently 2
arrives, what willtime.
be the new Decrease the time quantum for low-
Ininathe ready queue
non-preemptive for a long
Priority scheduling How canrunning
system this process?
situation
with be ranging
priorities addressed fromto1 Increase the time quantum for low-priority processes Adjust the priority dynamically Apply the Aging technique 3
priority processes
to 10, if a process ensure fairness
with priority 8 is among
currently processes?
running, and a process with Priority 8 process Priority 5 process No change Both will run concurrently 3
In a file system,
prioritywhat information
5 arrives, what will is typically
be the new stored in theprocess?
running File Control Block
File name and location File access permissions File data content File owner and creation time 1
(FCB) of a file?
Which of the following is a non-preemptive scheduling algorithm? Round Robin First-Come, First-Served Shortest Job Next Priority Scheduling 2
A race condition occurs when multiple threads access shared data
Using CPU scheduling Using locks Increasing memory allocation Using multiple processors 2
simultaneously. What is a common way to prevent this?
What is the primary benefit of using threads in a program? Increased memory usage Increased responsiveness Simplified programming model Faster I/O operations 2
What does multithreading allow a program to do? Run multiple processes Run multiple threads in parallel Increase disk space usage Enhance single-thread performance 2
In contiguous memory allocation, what is the main issue that can arise? Thrashing Fragmentation Deadlock Race conditions 2
What is the primary purpose of paging in memory management? To eliminate fragmentation To allow multiple processes to run To swap data between disk and RAM To create virtual memory spaces 1
Segmentation differs from paging because it is based on: Fixed-size blocks Variable-sized segments Page tables Physical memory 2
What does thrashing refer to in the context of virtual memory? Excessive page faults High CPU utilization Increased memory access speed Data corruption in memory 1
The operating system allocates
What occurs when a page fault happens? Data is written to the disk The required page is not in memory CPU performance decreases 3
memory
Which page replacement algorithm replaces the least recently used page? FIFO LRU Optimal Second Chance 2
What is the primary function of a file system? To manage CPU scheduling To handle memory allocation To manage data storage and retrieval To control hardware devices 3
Which of the following is a method of implementing a file system? File Allocation Table Multilevel Feedback Queue Segmentation Round Robin 1
Which disk scheduling algorithm services requests in the order they arrive? FCFS SSTF SCAN C-SCAN 1
Which technique allows the system to use disk space as additional memory? Paging Segmentation Virtual Memory Contiguous Allocation 3
Changing the CPU's context from one process to Swapping processes between memory
What is context switching? Switching between user and kernel modes Allocating memory to processes 1
another and disk
What is a necessary condition for a deadlock to occur? Preemption Circular wait Resource allocation Non-sharing of resources 2
Which of the following is NOT a function of an operating system? Process management Memory management Data processing File management 3
In which mode does the operating system run? User mode Kernel mode Both user and kernel mode System mode 2
Which of the following is NOT a state of a process? New Running Waiting Stored 4
Which CPU scheduling algorithm is known for minimizing turnaround time? Shortest Job First Round Robin First-Come, First-Served Priority Scheduling 1
If three processes have burst times of 4, 3, and 5 milliseconds, what is the
3 ms 4 ms 5 ms 2.67 ms 2
average
Using waiting
Shortest Jobtime
Firstusing
(SJF)First-Come,
scheduling,First-Served (FCFS)
if two processes scheduling?
have burst times
6 ms 10 ms 8 ms 7 ms 3
If a thread of 8 ms20and
takes ms2toms, what is how
complete, the average turnaround
many threads time?
can run in parallel on
4 threads 5 threads 3 threads 6 threads 4
a CPU
If a process requires 300 withthe
KB and a time slice of
available 5 ms? is 1 MB with a hole of
memory
Yes No Only with fragmentation Depends on allocation method 1
400ifKB,
In a system with 3 page frames, can1,
pages it fit?
2, 3, 4, 1, 2, 5 are referenced in
4 page faults 5 page faults 6 page faults 3 page faults 2
If a processthat order,
needs 300how many
KB of pageand
memory faults
eachoccur using
page FIFO?
is 100 KB, how many
3 pages 2 pages 4 pages 5 pages 3
Given that 1 MB of memory pages are necessary?
is allocated in 256 KB segments, how many
5 chunks 6 chunks 7 chunks 4 chunks 2
segments
If a system can be 100
encounters utilized
pageif the total
faults available
every secondmemory is 1.5
and each MB?
fault takes 20
1200 seconds 2000 seconds 3000 seconds 1200 ms 2
Formsato500
fix,KB
what
fileissaved
the overall time
in a file spentwith
system on page faults
a block sizeinofone
128minute?
KB, how
3 blocks 4 blocks 5 blocks 6 blocks 4
many blocks
If two threads each increment will be
a counter required?
starting at 0 for a total of 1 million
0 1 million 2 million Between 1 million and 2 million 4
If aiterations, what could
process requires 300the
KBfinal value be
of memory without
and any size
the page synchronization?
is 100 KB, how
3 pages 2 pages 4 pages 5 pages 3
many pages
If 1 MB of memory is allocated in 256will
KBbe needed?
chunks, how many chunks can be
If a system experiences 100 page faults per second, and each page fault 5 chunks 6 chunks 7 chunks 4 chunks 2
allocated if there is 1.5 MB of total memory?
takes 20 ms to resolve, what is the total time spent on page faults in one 1200 seconds 2000 seconds 3000 seconds 1200 ms 2
If a file of 500 KB is stored in a fileminute?
system with a block size of 128 KB, how
3 blocks 4 blocks 5 blocks 6 blocks 4
If two threads increment many blocks
a counter are needed?
starting at 0 for 1 million iterations each,
If threewhat
processes have execution times of 4, 3, and 5 milliseconds, 0 1 million 2 million Between 1 million and 2 million 4
is the potential final value if no synchronization is used?what is
the average waiting time when using First-Come,
When applying Shortest Job First (SJF) scheduling, First-Served (FCFS)
if there are two 3 ms 4 ms 5 ms 2.67 ms 2
processes with burst times of 8 ms scheduling?
and 2 ms, what is the average turnaround 6 ms 10 ms 8 ms 7 ms 3
If completing a thread takes 20time? ms, how many threads can execute
4 threads 5 threads 3 threads 6 threads 4
simultaneously on a CPU that has a time slice of 5 ms?
If a process needs 300 KB of memory and there is 1 MB of total available
In a systemmemory
that haswith
3 page frames, if the pages referenced areit?
1, 2, 3, 4, 1, Yes No Only with fragmentation Depends on allocation method 1
a 400 KB hole, can the process fit into
2, and 5 in that order, how many page faults will occur using FIFO page 4 page faults 5 page faults 6 page faults 3 page faults 2
replacement?
What is a semaphore primarily used for? Memory allocation Process synchronization File management CPU scheduling 2
What type of fragmentation occurs when free memory is divided into small
External fragmentation Internal fragmentation Logical fragmentation Temporal fragmentation 2
blocks?
What are the common types of file permissions in UNIX/Linux? Read, Write, Execute Read, Modify, Delete Access, Change, Execute Open, Close, Read 2
Integrates a file system into the
What does mounting a file system do? Adds a new file to the system Removes a file from the system Converts file formats 2
directory structure
What is the purpose of I/O buffering? To speed up data transfer To free up memory To ensure data integrity To manage CPU scheduling 2
Which file organization method allows for quick access to records? Sequential organization Hashed organization Indexed organization Random organization 1
What is the role of the kernel in an operating system? To manage applications To manage system resources To provide user interfaces To execute user commands 2
A way for applications to request services from the
What is a system call? A method for managing threads A type of hardware interrupt An application-level error handler 1
kernel To allow multiple users to access a
What is the main purpose of time-sharing in operating systems? To enhance security To manage memory effectively To increase processing speed 3
computerlayer
An abstraction simultaneously
to allow different
What is a virtual file system (VFS)? A system for managing physical disks A type of file encryption system A file compression tool 2
file systems to be accessed uniformly
Which mechanism is commonly used for process synchronization? Mutex Semaphore Both A and B None of the above 3
Which of the following is an example of a real-time operating system? Windows Linux QNX macOS 1
Which protocol is commonly used in network file systems? FTP NFS HTTP SMTP 1
When many threads access shared data at the same time, a race condition
Using CPU scheduling Using locks Increasing memory allocation Using multiple processors 2
happens. What is a standard procedure to avoid this?
What is the main advantage of a program that uses threads? Increased memory usage Increased responsiveness Simplified programming model Faster I/O operations 2
What prerequisites must be met for there to be a deadlock? Preemption Circular wait Resource allocation Non-sharing of resources 2
Which disc scheduling technique responds to queries in the sequence that
FCFS SSTF SCAN C-SCAN 1
they come in?
What method enables the system to utilize disk space as extra memory? Paging Segmentation Virtual Memory Contiguous Allocation 3
Changing the CPU's context from one process to Swapping processes between memory
Which of the following Whatstatements
does contextabout switching involve?
real-time operating systems is They guarantee that critical tasks complete They alwaysand
use a round-robin Switching
They can between user and
be classified askernel
hard modes
real- Allocating
They are often usedmemory to processes
in embedded systems 1
another disk
If a process is in a 'Blocked' state, FALSE? what does it mean regarding its within their deadlines scheduling algorithm time or soft real-time systems and industrial control
In a non-preemptive Shortest termination?
Job First (SJF) scheduling, if two jobs It has completed execution. It is waiting for some event to occur. It is eligible for termination. It is actively running.
have the same burst time, which one is typically chosen? The job
Two processes thatto
trying arrived first a shared
increment Thethreads
Multiple job withaccessing
higher priority
a shared A single The job thatperforming
process arrived lasta read- It's chosen
Two processes randomly
attempting to allocate the
Which scenario is LEAST likely to cause a race condition? Threads share variable simultaneously
the same address space within Eachdata structure
thread has itswithout locks
own program Threads only operation
always executeon sequentially
a file Threadssame
canresource
communicateat the more
sameeasily
time than
Which statement about threads is FALSE? A CPU-bound task a process
with no parallelizable counter
A simple, linear calculation with A web server within a process
handling multiple client A programseparate
that needs processes
maximum security
Which Which scenario
memory is MOST
allocation likely toisbenefit
technique MOSTfrom likelymultithreading?
to suffer from the components minimal I/O requests simultaneously isolation between its components
Paging is only used in virtual
"50% rule"? Paging uses Segmentation
fixed-size blocks, while memory, while Paging
segmentation is First-fit contiguous
Segmentation allocation
requires special Paging is used for Buddy
code,system
while segmentation is
If What
a system is thehasprimary
32 pages difference
and thebetween page table paging
is 4 andbytessegmentation?
per entry, what segmentation uses variable-size blocks used in physical memory hardware, while paging doesn't used for data
In a segmentation is system,
the total the sizesegment
of the page tabletable?
contains which of the 128 bytes The base address 256 bytes
and limit for each 512 bytes 1024 bytes
following? The physical addresses of pages The operatingsegment
system searches for The total number of pages The status of each page in memory
In theWhat
Workinghappens immediately
Set model, after a page
what happens if thefault
working occurs?set size The process is terminated thesystem
The required page ontodisk
switches LRU The
TheCPU workingswitches
set sizeto another process
is automatically The page
The oldest pagetable
in theis working
completely set rebuilt
is swapped
Which page replacement exceeds thealgorithm
availablemight physical memory?
perform identically to FIFO Thrashing occurs algorithm reduced out
A mutex canOptimal
be released by any
In a file systemunder usingcertain
linked circumstances?
allocation, what is the primary LRU Random
process, while a binary semaphore A binary semaphore can be used for
MRU
disadvantage? External fragmentation must Internal fragmentation
by the process signalingSlow random access while a Difficulty
has ina implementing directories
In a system using the Banker's algorithm for deadlock avoidance, what A binary semaphore can only have values 0 or be released between processes, A mutex priority inheritance property,
What
happens is theif akey difference
process requestsbetween a binary
resources thatsemaphore
would leave and thea system
mutex? 1, while a mutex can have any integer value that acquired
The request is denieditand the mutex is used only for mutual exclusion while a reallocates
The system binary semaphoreresources does notother
from
What is theRobin
primary advantagein an of unsafe state? The process is terminated processcanmust waitmore The system enters a synchronization
deadlock state processes
In Round scheduling with ausing a monitorof
time quantum over 4ms, semaphores
how long will for Monitors handle Monitors encapsulate
itIntake to complete synchronization?
3 processes with burst Monitors are faster to implement concurrent processes logic, reducing programmer errors Monitors use less system resources
a system with 100MB of memory, if the times
OS takes of 10ms, 20MB6ms, and and
we
have 5 processes of sizes8ms 10MB, respectively?
15MB, 25MB, 20MB, and 5MB, how 20ms 24ms 28ms 32ms
Which of the following much external
strategies fragmentation
can be usedistothere? manage entries in a 10MB 15MB 20MB 5MB
In pre-emptive scheduling, whichTLB? of the following is most likely to lead First-In-First-Out (FIFO) Least Recently Used (LRU) Random replacement All of the Above
If a process takes 10 milliseconds toofa the
starvation to complete
condition? its CPU burst and there Round Robin Shortest Job First (SJF) First-Come, First-Served (FCFS) Priority Scheduling
areIn 5 a such
file system,
processes which waiting infollowing
the ready structures
queue, what is used to manage
is the total time
taken to complete allenvironment, file metadata?
5 processes File Descriptor Inode Directory Entry Block
In a multithreading ifusing
a CPU First-Come,
can handle First-Served
2 threads
Asimultaneously
page replacement there(FCFS)
and algorithm are uses scheduling?
5 threads waiting, how
the following reference manystring:
total time
7, 0,
50 milliseconds 20 milliseconds 70 milliseconds 80 milliseconds
1, 2, 0, slices
3, 0,are required
4, 2, if each
3. If there are thread
3 frames runs for 3 milliseconds?
available, how many page 4ms 12ms 16ms 8ms
If afile faults occurisusing
semaphore the Least
initialized to Recently
3 and 5where Used (LRU)
processes algorithm? 7 8 5 9
AAsystem system
usesusesFIFO anpolicy
inodefor structure
page replacement. eachattempt
inode
It has
to acquire
occupies
4 page 128
frames
it,
bytes. how12 many processes will be blocked? 3 5 7 2
with noIfpages
a file has
loaded blocks,
to begineach with.ofThe 1 KB, whatfirst
system is the total size
accesses 100in
distinct pages in some bytes of the
order and inode
thenand the file?
accesses the same 100 pages 12,288 bytes 12,128 bytes 12,512 bytes 12,000 bytes
but
Whichnowofinthethefollowing
reverse is order.
a keyHow many page
advantage faultsmonitors
of using will occur?
for 196 They provide192 a higher level of They are easier195 to use for low-level They are suitable 191for all types of
How can the performance of synchronization?
paging be improved using techniques like They are more flexible than semaphores By increasing abstraction
the size of the page synchronization synchronization problems
inverted page tables
In a multi-programming operating and multi-level
system, what pagehappenstables? when a TheBy
CPUreducing
remainstheidle
sizeuntil
of the
thepage table
I/O operation The process istable terminated to free TheBy using a larger
operating systempage size to
switches By using
The process a smaller
continues page size
to occupy the CPU but
process
Which enters
of the a waiting
following is NOT state due toaan
typically I/O operation?
reason for process completes up resources another ready process performs no operations
termination? Normal
They occur exit
when(completion of execution)
multiple processes access They always Fatal error
result in a system They Process
can leadpreemption
to unpredictable They can beKilled by another
prevented usingprocess
synchronization
In non-preemptiveWhich statement about race what
priority scheduling, conditions
happens is FALSE?
if a higher priority The higher shared resources
priority processsimultaneously
immediately takes crash process is
The lower priority The higherprogram behaviorwaits until
priority process The scheduler mechanisms
ignores the priority and
process arrives
In a multithreaded while a lower
application, which priority process is
of the following is running?
typically shared over the CPU terminated the current process completes continues with FCFS
among all threads? Stack Moving a threadRegisters
from one core to Saving the Heap
statememory
of a thread and Saving the state Program counter
of a thread and restoring the
In a system usingWhat is thread
contiguous context
memory switching?
allocation, what is the primary Changing the priority of a thread Processesanother
requesting more restoring
Inability the state
to move of another
processes once state of another
In a paging system cause
with 4KBof external
page size fragmentation?
and 32-bit logical addresses, Allocating memory in fixed-size blocks memory than available allocated Frequent process termination and creation
how many bits are typically used for the page number? 12 bits 20 bits 16 bits 24 bits
In a system using paging, what happens if a process accesses a
logical address that translates to a page not currently in physical
Which of the following is NOT memory?
a typical segment in a segmented Segmentation fault Page fault Memory leak Stack overflow
memory system? Accessing a Code page segment
that is not in physical Data segment Reading from Stack
a pagesegment
that is already in Accessing a page Cache
thatsegment
has been swapped out
In theWhich of thepage
Optimal following does NOT
replacement typicallywhich
algorithm, causeofathe page fault? is
following It replaces the pagememory that won't be used for the It'sWriting
easily to a read-only page
implementable in real It has the physical
highestmemory
page fault rate to disk
In the LFU (Least Frequently Used) true?algorithm, if two pages have the longest time in the future systems among all algorithms It always performs worse than LRU
same
In the frequency
context of file count, which what
systems, one isdoes typically
the term chosen for replacement?
"journaling" primarily The most recently used page The least recently used page Ensuring Randomly
file system selected page after
consistency The page with the lower page number
help with? Binary Improving
semaphores read canperformance
be used to control Enhancing file compression Counting semaphores crashes can only be Implementing access control
In a semaphore-based synchronization mechanism, which of the access to a single resource, while counting Binary semaphores can maintain a initialized to one, while binary Both binary and counting semaphores are
Which ofstatements
following the following is trueis NOT a method
regarding the useof deadlock
of binaryprevention?
semaphores semaphoresResource can control ordering
access to multiple countBanker's
of resources, Algorithm
whereas semaphores Timeout can mechanism
be initialized to any used exclusively Disabling interrupts
for mutual exclusion and
and counting semaphores? instances of a resource. counting semaphores cannot. non-negative integer. cannot be used for signaling purposes.
If aInbinary
a monitor implementation,
semaphore is initialized what to is
1 andthe purpose of the condition
three processes P, Q, and To release the monitor lock and block the
R system
executehas the afollowing variable's
operations wait() order:
operation? calling process To acquire the monitor lock To signal other waiting processes To check if any other process is waiting
A total virtual memoryinspace ofP(wait),
256 MBQ(wait),
and uses R(signal),
a page
size of Q(signal),
4 KB. Howwhat manyispages the final arevalue
availableof theinsemaphore?
the virtual memory 0 1
To reduce the time taken for
2 3
space?
What is the primary purpose of a Translation Lookaside Buffer (TLB) in To store frequently64,000 accessed data for quick address translation 32,768from virtual to To increase 65,536 the overall storage To manage input/output 16,384 operations more
What
Givenisthe theburst
maintimes
drawback computer of the
for processes architecture?
First-Come,
P1, P2, P3, First-Served (FCFS)
and P4 as follows: retrieval It can lead physical
to highmemoryturnaround time capacity of the system efficiently
Which of the following can scheduling
be used algorithm? It is complex to implement. for short processes. It can lead to starvation. It is not fair to all processes
In a non-preemptive Shortest Job to avoid
First (SJF) race conditionsscenario,
scheduling in a multi-
there Process
threaded P1: 5
environment? ms Spinlocks Mutexes Semaphores All of the above
In aare system threewithprocesses
5 processes, with the
Process
following
if each
P2:the 2process
ms
burstrequires
times: P1 = 8 ms, P2
2 resources
and =there4 ms, areP3only
= 6 7ms. Calculate
resources
Process P3: available, average waiting time.
8 ms what is the maximum
4.67 ms 5.67 ms 4.70 ms 5.22 ms
number of processes that can be safely allowed to run? 2 2 3 7
A system has 6 identical Process resources P4: and3 ms N processes competing for
them. EachWhat process is thecan average
requestturnaround
atmost 2 resources.time usingWhich SJF? one of the 5.5ms 6.5ms
A condition where excessive paging
7.5ms
A security vulnerability where
8.5ms
following values
Which of the following best describes the concept of N could lead to a deadlock?
of "thrashing" in an A situation where the CPU 1 is overloaded with occurs, leading 2 to severe processes can access 3 each other's A method of optimizing 6 disk I/O by predicting
operating system? too many processes A critical
External section isdegradation
fragmentation
performance a piece
occurs of code
when
AInternal
critical fragmentation
section is a piece of code Executed only if it has been waiting Executed onlymemory if it has the shortest future access pattern
In priority-driven scheduling, the task with the highest priority is Always occurs
executed whenthat
first
can be
a page is that can
a page is thebe executed
not longest by multiple
fully used, while burst time xecuted only ifisitaispiece a real-time
What is a critical section, and why is it necessary to protect it from executed
not by only
fully used, whileone process
external at a time to
fragmentation processes
internal simultaneously
fragmentation occurs whento A criticalBoth section
internalis aandpiece of code that
external A critical
Both internalsection of codetask
and external fragmentation thatoccur
is
What is the difference between concurrent access?
internal fragmentation and external occurs when prevent
there data
areinconsistency.
unused gaps between thereimprove
are unused performance.
gaps between is not executed
fragmentation occurby when
any process.
a page is when always
there areexecuted
unusedcorrectly.
gaps between
fragmentation in paging? allocated pages. allocated pages. not fully used. allocated pages.
Semaphores are used to: Manage process creation Synchronize
Can be interrupted access to byshared resources
a higher-priority Control file permissions Monitor CPU usage
In non-preemptive scheduling, once a process starts executing, it: Waits for user input It is difficult process
to manage memory Cannot be interrupted until it finishes Runs for a fixed time and then gets suspended
What is an issue with contiguous memory allocation? It leads to memory duplication addresses Processes can't share memory Memory fragmentation
Which
Which of ofthethe
following
following is not
can acause
necessary
external condition for a deadlock
fragmentation to occur?
in contiguous Mutual exclusion Preemption Hold and wait Circular wait
Segmentation causes internal
memory allocation? Pages Memory
have fixedsharing
sizes, between processeshave
while segments Segments Fixed-size
have fixedmemorysizes,blocks
while pages Variable-size
fragmentation, memory
paging blocks
causes external PagingOnly one process
provides running protection
better memory at a time than
WhenWhat a fileisisadeleted
key difference
in a file between
system, what paging must andthe
segmentation?
operating system variable sizes The filehave variablefrom
is removed sizesthe root fragmentation
All space associated with the file is segmentation
ensure? The file pointer is set to the end of the file By combining directory
the page onlynumber and By multiplying the released
page number with the The file remains hidden in the directory
In a paging system,
In multithreading, what ishow the is the issue
main physical thataddress
can arisegenerated?
when multiple By adding the page number to the frame number offset offset By subtracting the offset from the frame number
Which of threads share a pre-emptive
the following common variable without
scheduling synchronization?
algorithms is most likely to Deadlock Thread duplication Race condition Priority inversion
cause starvation? First-Come, First-Served (FCFS) ByShortest
allowing Remaining
processesTime First (SRTF)
to access shared By runningRound processesRobinon separate Priority Scheduling
By ensuring (Pre-emptive)
mutual exclusion and proper
How can race conditions be avoided in a system? By using round-robin scheduling It cannot resources without locking
be implemented in practice processors synchronization mechanisms
In What
the Least is a major
Recently drawback
Used (LRU) of thepageOptimal Page Replacement
replacement algorithm, whichAlgorithm?page is It
Thecauses
pagemore page
that has notfaults
beenthan
usedother algorithms
for the longest because it requires future
The page that has been accessed the knowledge It requires excessive memory space It only works for small-sized processes
replaced? time Too manymost pages recently
are loaded into TheThe pagepage
thatreplacement
is about to bealgorithm
accessedisnext The pagesystem
The operating that was least recently
spends more time added
swapping
Thrashing occurs
Which deadlock avoidance technique requires that each process declare thewhen: The CPU is overloaded with processes memory at once inefficient pages than executing processes
If a user wants maximum
to remove number of resources
all content from a file it might
withoutneed?
deleting the file Banker’s algorithm Circular wait Preemption Wait-for graph
itself, which file operation should they perform? Delete operation Condition File variables
truncate operation
allow threads to Seek operation
Condition variables are used to signal Condition variables Resetdo operation
not allow any signaling
Which of the following is true about condition
In which directory structure can a single file exist in multiple variables in monitors?
directories Condition variables are used for mutual exclusion wait outside the critical section between threads within a monitor mechanism
Monitors allow multiple processes to
without duplication? Single-level directory Acyclic-graph
access the critical directory
section Tree-structured
Monitors do not support directory
process Two-level directory
Monitors differ from semaphores
Which file operation allows the user to change the current position of the file because: Semaphores are easier to implement than monitors simultaneously synchronization Monitors automatically handle mutual exclusion
In a tree-structured pointer without
directory, howreading
are filesor writing data?
and subdirectories identified Truncate Rewind Seek Write
What uniquely? By their unique name within the directory ByKernel
their relative
threadspath within theinsystem By their file extension By the block size of the and
file scheduled
Given the burst times for processes P1 (10 ms), P2 (2 ms), P3 kernel
is the primary reason for higher overhead in managing (5 ms),threads
and P4 are managed user Kernel threads block the entire process Kernel threads need to be created
compared to user threads?
(3 ms), calculate the average turnaround time using the Shortest Job First Kernel threads require more memory. space. during I/O by the operating system
Which of the following(SJF) helps scheduling algorithm.from overwriting each
prevent processes 10 ms 13 ms 11 ms 12.5 ms
other’s memory space? Swapping Paging Memory isolation Binding at compile-time
What is
Given the effect
burst times of of 7too ms, many
4 ms,pageandfaults
6 ms in in aa Round
demandRobin paging system?
scheduling Thrashing, leading to reduced system performance Increased process execution speed Lower disk usage Increased memory allocation
system
Which with a time
threading modelquantum
is mostofappropriate
3 ms, what for is the average waiting
applications requiring time?
true 5 ms 6 ms 4 ms 3 ms
parallelism in multi-core systems? Many-to-One model Swaps pages Userintothread modelonly when
memory Swaps theMany-to-Many
entire process modelinto memory at One-to-One model
Which of the following best describes a "lazy swapper" in demand paging? Swaps pages even if they are not needed they are requested once Swaps pages randomly between memory and disk
WhichInthread FIFO page modelreplacement,
allows for the howhighest
is the oldest
degreepage identified?across
of portability By using a stack structure By using a priority list By using a queue structure By using a frequency counter
Which access method different
allows usersoperating systems?
to access a specific record without Many-to-One model One-to-One model Many-to-Many model Kernel thread model
Which of the following processing
is a majorall preceding records?
disadvantage of user threads compared to Sequential access Batch access Direct access Tape access
Which of the following page kernel threads?algorithms can suffer from
replacement Faster context switching No kernel privileges required Blocking system calls block all user threads Portability
In a system using paging, Belady’s when a programAnomaly? needs to access a page not FIFO LRU Optimal Clock
currently in memory, what occurs? Segmentation fault Fragmentation Will not be used Thrashing
for the longest time in Page fault
The optimal page replacement algorithm selects the page that: Was loaded first HasTo not been used
translate for the
logical longestto
addresses time the future Was used most recently
What is the primary purpose of the memory management unit (MMU)? To manage process scheduling physical addresses To optimize CPU usage To handle file systems
In segmentation, the address is specified as: A page number and an offset A frame number and an offset A segment number and an offset A process ID and an offset
Which of the following refers to loading only essential parts of a program
In which scenario would initially and the
a process be rest
moved as needed?
from the running state to the Dynamic linking Overlays
When it requires input/output Dynamic loading Swapping
waiting state? ContextWhen it completes
switching its execution.
allows multiple processes to Context switching operations.
is resource-intensive When
Context it is scheduled
switching to runonly
is performed next.when When it switching
Context is terminated by the
requires operating
saving system.
and restoring
Which Which of the
of the following
following statements
directory aboutallows
structures contextforswitching
cross-useris file
FALSE?
sharing share the CPU. and can degrade performance. a process completes its execution the process state
without duplicating files? Single-level directory Acyclic-graph directory Two-level directory Tree-structured directory
Which ofInthe demand paging,
following pagewhat is the "valid-invalid"
replacement algorithms bit used
tracks for?
the last usage To indicate whether a page is in memory or on disk To determine the size of each page To identify the page number of a process To indicate whether a process is valid or invalid
Which directory structure time of eachthe
provides page?
best support for multi-user FIFO Optimal Least Frequently Used (LFU) Least Recently Used (LRU)
environments with minimal interference between users? Single-level directory Acyclic-graph directory Two-level directory Tree-structured directory
In a segmented memory system, the logical address consists of: A page number and page offset AMoving
segment number
the and segment
file pointer to the end offset
of Releasing A base address
the file spaceand for offset
use by other ChangingA frame number
the current and frame
position of theoffset
file pointer
In the context of operating system file operations, what is a file seek? Deleting a file from the directory structure A page fault occurs,the fileand the page is The entire process filesis swapped into within the file
In systems
In demand thatpaging,usewhat happens
execution timewhen a required
binding, page is notcomponent
which hardware in memory? is The operating system terminates the process loaded from disk memory The CPU skips executing the process
most crucial for address translation? Memory addresses are Hard drive
dynamically adjusted during Memory management
The hardware assignsunit (MMU)
memory MemoryCentral processing
is allocated byunit
the (CPU)
operating Memory addressesCache are fixedmemory
and known at compile
In compile time binding, how is memory allocated? The directoryprogram
containing execution.
the master user file Thedynamically
lowest-levelatdirectory
execution. in the system atfrom
The base directory runtime.
which all other time.
Which In of athe
tree-structured
following scenariosdirectory,bestwhat is the the
illustrates rootadvantage
directory?of true directory
A web server handling multiple client requests hierarchy task in a
Running a background directories stem
A process where all threads must wait for The directory that contains
A single-threaded process performing all sharedafiles
CPU-
What is the primaryparallelism
disadvantage in kernel
of thethreads?
Best-fit memory allocation simultaneously across multiple processors graphical user interface I/O bound task
algorithm? It is slow to find the best fit It causes the largest memory wastage It results in external fragmentation It always selects the largest block
What is the main advantage of the roll-out, roll-in variant of swapping? Faster memory access Dynamic loading of functions Priority-based process scheduling Minimizing internal fragmentation
In a system with three processes, P1, P2, and P3, with burst times of 10 ms, 5
ms, and 8 What is the purpose
ms respectively, whatofisthethe"stub"
average in dynamic
turnaround linking?
time using the To allocate memory dynamically To map logical to physical addresses To divide processes into segments To locate memory-resident library routines
What doesFirst-Come, First-Servedof(FCFS)
the "true parallelism" kernelscheduling
threads allow algorithm?
that user threads 18 ms Context switching 16 mswithout kernel Executing multiple 20threads
ms on different 15 ms
do not? Blocking system calls for individual threads involvement processors simultaneously Threadbetween
The mapping management inand
logical userphysical
space page
Which of the In demand
followingpaging, what does
is a challenge whentheimplementing
page table contain?direct access in a The entire process data
Load time binding occurs before program
The addresses
Managing of all processes
the structure of numbered The Ensuring
entire secondary memory
the file pointer moves contents Requiring all data toaddresses
be read sequentially before
What is the main difference between file system?
load time binding and execution time Maintaining
execution, whilethe order oftime
execution databinding
during writes
happens Load blocks
time for random
binding is more access
flexible than Execution sequentially writing hardware support,
Logical addresses are stored in cache, Logical addresses are generatedefficient
time binding is more by the Load time
Logical binding
addresses arerequires
generated by the operating
binding? Logical addresses during execution.
are used for I/O devices, while execution time binding.
while physical addresses are stored in CPU, while than load time
physical binding.
addresses are the real while
system, whileexecution
physicaltime binding
addresses aredoes not. by
generated
What is the key difference between a logical address and a physical address? physical addresses are for memory RAM a technique memory addresses external
for overcoming the CPU
A memory buffer used to What is compaction?
accommodate a speed differential is called a technique for overcoming internal fragmentation a paging technique fragmentation a technique for overcoming fatal error
____________ stack pointer cache accumulator disk buffer
Which one of the following is the address generated by CPU? physical address absolute address logical address none of the mentioned
The page table contains ____________ base address of each page in physical memory page offset page size none of the mentioned
Memory managementWhich of the followinginiswhich
technique not the state stores
system of a process?
and retrieves data new old waiting running
from secondary storage for use in main memory is called? fragmentation paging mapping none of the mentioned
The The addressthat
processes of aare
page table in
residing in memory
main memory is pointed by ____________
and are ready and waiting stack pointer page table base register page register program counter
to execute
Which system arebe
call can kept
usedonby a list calledprocess
a parent _____________
to determine the job queue ready queue execution queue process queue
termination of child process? wait exit fork get
The number of processes completed per unit time is known as __________ Output Throughput Efficiency Capacity
A method that must be overridden while extending threads. run() start() stop() paint()
Whichwith
In a system one of thepages,
4 KB following
howismany not apages
valid state of a thread?
are needed for a 64 KB running parsing ready blocked
process? 8 16 4 32
Transient operating system code is code that
The systems which allow only one process execution at a time, are called ____________ is not easily accessible comes and goes as needed stays in the memory always never enters the memory space
__________ uniprogramming systems uniprocessing systems unitasking systems none of the mentioned
What are Multithreaded programs? lesser prone to deadlocks more prone to deadlocks not at all prone to deadlocks none of the mentioned
By using the specific system call, we can ____________ open the file read the file write into the file all of the mentioned
Mapping of file is managed by ____________ virtual memory file metadata page table file system
When will file system fragmentation occur? unused space or single file are not contiguous used space is not contiguous unused space is non-contiguous multiple files are non-contiguous
Operating
A system has 3System
processesmaintains
sharingthe page tableIffor
4 resources. ____________
each process needs a each process each thread each instruction each address
maximum of 2 units then, deadlock ____________ can never occur may occur
Executing a special program called Executing a special has to occur called system
program none of the mentioned
Which of the followingHow does pagethereplacement
Hardware trigger an interrupt?
algorithms replaces the page that Sending signals to CPU through a system bus interrupt program program Executing a special operation called system call
Using a Roundwill notscheduling
Robin be used foralgorithm
the longest with period
a timeofquantum
time? of 3, if P1 = FIFO LRU Optimal NRU
9, P2 = 6, P3 = 2, what will be the total completion time? 17 Semaphores are binary, 22 while mutexes Mutexes are used39 for signaling, while Mutexes are typically used 11 for mutual exclusion,
What is the primary difference between a semaphore and a mutex? Mutexes can be recursive; semaphores cannot. are counting. semaphores are for resource control. while semaphores can allow multiple threads.
The first fit, best fit and worst fit are strategies to select a ______ whenprocess fromis ascheduled
process queue to to putrun
in memory
after some processor
when to run
process the next
is unable process
to run until free hole from a set of available holes all of the mentioned
In a Round Robin scheduling algorithm with a time quantum of 2, what will
be the waiting timeWhat for aisprocess
the ready thatstate
has aofburst
a process?
time of 6 and is the only execution some task has been completed when process is using the CPU none of the mentioned
If processes have burst times process
of P1in=the4, P2queue?
= 2, P3 = 1, what is the average 0 2 4 6
If three processes have burst waiting
timestimeP1using
= 10,SJF?
P2 = 6, P3 = 4, calculate the 5 1.67 2.5 1.25
average waiting time using Priority Scheduling (P1=1, P2=2, P3=3). 16 8.67 20 16.61
A process can be terminated due to __________ normal exit fatal error killed by another process all of the mentioned
A Process Control Block(PCB) does not contain which of the following? Code Stack Bootstrap program Data
Which process can be affected by other processes executing in the system? cooperating process child process parent process init process
A parent Which
processof the following
calling _____does
system notcall
interrupt
will beasuspended
running process?
until children A device Timer Scheduler process Power failure
processes terminate. wait fork exit exe
Multithreading is also called as ____________ Concurrency Simultaneity Crosscurrent Recurrent
The register context and stacks of a thread are deallocated when the thread? terminates blocks unblocks spawns
Run time mapping from virtual to physical address is done by ____________ Memory management unit CPU Provides an illusion PCIof a larger address None of the mentioned
Which of the following is a benefit of virtual memory? Increases physical memory size Allows for easier sharing of files space Decreases system complexity
In operating system, each process has its own __________ address space and global variables open files pending alarms, signals and signal handlers all of the mentioned
Which one of the following is a synchronization tool? thread pipe semaphore socket
A deadlockProcess synchronization
eventually cripples system can throughput
be done on and __________
will cause the CPU hardware level software level both hardware and software level none of the mentioned
To _______ to a safe state, utilization
the system to ______
needs to keep more information increase drop stay still none of the mentioned
______ is a unique tag, about theastates
usually number of processes.
identifies the file within the file abort the process roll back the process queue the process none of the mentioned
system. File identifier File name File type None of the mentioned
Which
The one of system
operating the following
and the explains the sequential
other processes file accessfrom
are protected method?
being random access according to the given byte number read bytes one at a time, in order read/write sequentially by record read/write
every address randomly
generated by by
therecord
CPU is being
modified by an already running process because ____________ they are
all threads of ainprocess
different memory
share spaces
the same address they
all are inofdifferent
threads a process logical
shareaddresses
the same allthey haveofaaprotection
threads process can algorithm
share the checked against the relocation and limit registers
Thread synchronization is required because ___________ space global variables
To map virtual addresses to physical same files all of the mentioned
What is the main purpose of a page table in virtual memory systems? To store process states addresses To keep track of I/O devices To manage CPU scheduling
Given the processes P1, P2, and P3 with burst times of 4, 3, and 2
Which of the
respectively, following
calculate isturnaround
NOT a typetime
theburst of pageforP2replacement
P1=using algorithm? LRU FIFO Least Recently Used First Come First Serve
Given the processes with times: P1 = 12, 6, P3First-Come,
= 8, calculate First-
the
average turnaround time Served
using(FCFS) scheduling.
Priority Scheduling where the priority is 4 7 9 6
P1=2, P2=1, P3=3.
For processes P1 = 8, P2 = 2, P3 = 5, what is the average waiting time using 6 12.55 26 16.67
Round Robin with a time quantum of 1? 4 7 attaching portion of15 the file system into a removing the portion of 6 the file system into a
Mapping of network What fileissystem
the mounting
protocol oftofilelocal
system?
file system is done by crating of a filesystem deleting a filesystem directory structure directory structure
In fixed size partition, the ____________
degree of multiprogramming is bounded by network file system local file system volume manager remote mirror
When high priority task is indirectly preempted by medium priority task
___________
effectively inverting the relative priority of the two tasks, the scenario is the number of partitions the CPU utilization the memory size all of the mentioned
called __________
If deadlocks occur frequently, the detection algorithm must be invoked priority inversion priority removal priority exchange priority modification
Which file is aprocesses
sequencewith of bytes ________
organizedburst into blocks rarely frequently rarely & frequently none of the mentioned
Consider three the following times: understandable
P1 = 10, P2 = 1, P3 by =
2. What is the average waiting the system’s linker?
time using the Shortest Job First (SJF) object file source file executable file text file
scheduling algorithm? 4 5 6 7
In process creation, what system call is typically used? fork() exec() wait() exit()
In the context of threading, what does a 'thread' refer to? A standalone application A physical core in a CPU A sequence of executed A type of file
What is the purpose of paging in memory management? To manage cache memory To eliminate fragmentation instructions
To increase CPU speed To allocate disk space
In deadlock prevention, which of the following conditions Mutual exclusion Hold and wait No preemption Circular wait
In which state does a must
process be broken?
wait for an event to occur? Ready Running Blocked Terminated
Which scheduling algorithm is known for minimizing the First-Come, First-Served (FCFS) Shortest Job First (SJF) Round Robin (RR) Priority Scheduling
average waiting
Which of the following is true regarding time? a mutex? It allows multiple threads to access a It is a locking mechanism used It is used to manage memory It only works in a single-threaded
Which of the following is a common method to prevent resource Allocation
Resource simultaneously
Graph for mutual Scheme
Wait-Die exclusion Banker's Algorithm Allenvironment
of the above
What is the role of the dispatcher deadlock?in an operating system? To allocate resources to processes To schedule processes for To switch the CPU to a different To manage I/O devices
What type of file system is used by most UNIX systems? FAT32 execution
NTFS process
ext4 HFS+
Which of the following is true about the Least Recently Used It replaces the page that has been in It requires future knowledge of It uses a simple FIFO queue It is the most efficient in all cases
Which data(LRU) pageisreplacement
structure commonly used algorithm?
by file systems to memory Binary theTree
longest page Inodereferences Hash Table B-Tree
maintain
Let m[0]…m[4]the metadata
be mutexes of files, suchsemaphores)
(binary as file size, permissions,
and P[0] …. Deadlock Thrashing Starvation, but not deadlock None of the above
andP[4] location on
be processes. disk?
Consider the following statements about user level threads Context switch time is longer for kernel User level threads do not need Related kernel level threads can Blocking one kernel level thread blocks
and kernel
which levelof thethreads.
following Which
statementsone of is the following
false? levelvirtual
threads than for
memory user level threads.
implements the any hardware
Virtual memory allows support.
each be scheduled
Virtual memory on different
increases the all related
Virtual memory threads.
reduces the context
statement is FALSE? translation of a program’s address space program topage exceed processors of in a multi-processor
The minimum number of page frames that must be allocated the instruction set architecture sizethe size of degreephysical multiprogramming
memory size number switching
of processes overhead
in memory
into physical memory address space the primary memory system.
to a running
Which ofprocess the followingin a virtualis used memory environment is
for inter-process Threads Sockets Memory Allocation Semaphores
determined by
communication?
To obtain better memory utilization, dynamic loading is used. special support from operating system is special support from hardware special support from both user programs can implement dynamic
With
In whichdynamicof the loading
following a routine
directory is not loadedis
systems, until it is called
it possible to Single essential
Level Directory Two is essential
Level Directory hardware and operating
Tree Structured system loading without
Directory Acyclic any Graph special support from
Directory
have multiple for. For implementing
complete pathsfor dynamic
for loading,from root
a file starting are essential the operating system or the hardware.
Consider Peterson’s algorithm mutual exclusion between flag [j] = true and turn = i flag [j] = true and turn = j flag [i] = true and turn = j flag [i] = true and turn = i
two concurrent processes directory?
i and j. The programeach executed by
An operating system contains 3 user processes requiring 2 4 3 5
process
2Atunits isofshown
resource below. repeat flag [i]number= true; of turn = j; while (
a particular timeR.ofThe minimum
computation, the value resources
of countingR 15 22 18 14
P ) do no-op; Enter requiredcritical section, perform actions, then exit
semaphore
Determineisthe 7. Then
number 20toPof avoid
(wait) a deadlock is?
page operations
faults whenand 'x' V (signal)
references to 3 4 5 None of the above
operations
pages were completed
in the Robin
order- 1, 2,Scheduling,
4, 5, 2, on1, this
2,assemaphore.
4.theAssume If the
that thefinal
main
In Round CPU time quantum is remains constant varies irregularly increases decreases
memory canincreased, value of
accommodate semaphore is
3 pagesturn 5. x will
andaround be
the main memory
the average
In which of the following Page replacement Algorithm making LRU Page replacement Algorithm FIFO page replacement Optimal page replacement None of the above
already has the pages 1 and 2, with page 1 having been
pages replacement
The operating system decisions
and theinother suchprocesses
a manner are thatprotected
the total they are in different memory spaces Algorithm
they are in different logical algorithm
they have a protection algorithm every address generated by the CPU is
number of modified
page faults by during operation of process a process is the
Iffrom being
the size of logical address an already
space isrunning 2 to the power of because
m, and m, n addresses
n, m m-n, m being checked against m-n, nthe relocation and
minimum possible? limit registers
a
A page
machine sizehasis 2atophysical
the power memoryof n addressing
of 64 Mbyte units,
and then the
a virtual 24 Mbyte 16 Mbyte 2 Mbyte 8 Mbyte
high order
address space _____
of bits- of
32 bit.a The
logicalpage address
size isdesignate
4kbyte, the page
What is the
Using Priority Scheduling algorithm, find the average waiting 8 8.2 7.75 3
number, and approximate
the ____ low order bits
sizefollowing
of thedesignate
page table? the page offset.
timec(in
Round Robin milliseconds)
scheduling foristhe essentially the setpreemptive
of processes given
version FIFO Shortest Job First (SJF) Shortest remaining Longest time first
with their priorities in theoforder: Process : Burst Time : Priority
__________.
respectively . P1 : 10 : 3 , P2 : 1 : 1 , P3 : 2 : 4 , P4 : 1 : 5 , P5 :

You might also like