OS PYQs SOL.
OS PYQs SOL.
1. What are the various objectives and functions of Operating Systems? [DEC
22/MAY 24]
- An OS is a foundational software program that manages a computer’s hardware
and software resources, acting as a bridge between users and the hardware.
- Objectives (include details):
o Efficient resource utilization, Convenience to the user, System performance,
Security and protection, Support for multiprogramming and multitasking,
Error detection and handling, Controlled access to files and devices, Job
scheduling.
- Functions (include details):
o Process management, Memory management, File system management,
Device management, Storage management, Security and access control,
Error handling, System performance monitoring.
1
3. Explain about Resource Allocation Graph (RAG). [DEC 22]
- A Resource Allocation Graph (RAG) is a visual tool used in operating systems to
illustrate how resources are assigned to processes and which processes are
waiting for resources. It helps in detecting potential deadlocks more intuitively
than tables.
- Components of RAG:
o Vertices:
o Process vertex: represented as a circle.
o Resource vertex: represented as a rectangle.
Single instance resource: only one instance is available.
Multiple instance resource: multiple instances can be shared among
processes.
o Edges:
o Request edge: from process to resource, indicating a request.
o Assignment edge: from resource to process, indicating the resource is
assigned.
- Illustration:
- Key point:
o RAG helps visualize how resources and processes interact.
o It is useful for deadlock detection by showing cycles or wait conditions.
o While Banker's algorithm uses tables for deadlock avoidance, RAG is
preferred for visual clarity in deadlock detection.
2
4. Explain about file attributes, file operations, and file types. [DEC 22]
- File is a logical storage unit of information.
- Each file has characteristics like file name, file type, date, etc. These
characteristics are referred to as file attributes. They are:
o Name – File name is name given to file. It is a string of characters
o Identifier – Identifier is a unique number for a file. It identifies files within file
system. It is not readable to us, unlike file names.
o Type – Type of file specifies the type of file such as archive file (.zip),
source code file (.c, .java), .docx file, .txt file, etc.
o Location – Specifies location of file on device (directory path). This attribute
is a pointer to a device.
o Size – Specifies current size of file (in Kb, Mb, Gb, etc.) & possibly the
maximum allowed size of file.
o Protection – Specifies information about Access control (Permissions about
who can read, edit, write & execute the file). Provides security to sensitive &
private information.
o Time, date & user identification – tells about date & time on which file was
created, last modified, created & modified by which user, etc.
- A set of essential tasks & actions directed at files & directories residing within a
computer’s file system are referred to file operations. They are:
o File Creation & Manipulation: creating files, creating directories, opening
files, reading files, writing files, renaming files & directories, deleting files &
directories
o File Organization & Search: copying files, moving files, searching for files
o File Security & Metadata: file permissions, file ownership, file metadata
o File Compression & Encryption: file compression, file encryption
- File types:
3
5. What is virtual memory? Mention its advantages. [DEC 22/DEC 23]
- Virtual Memory is a memory management technique used by operating systems
to provide the illusion of a large, continuous memory space to programs, even if
the actual physical memory (RAM) is limited.
- Key points:
o Virtual Addressing: Programs use virtual addresses instead of physical
addresses. These are translated into real memory addresses during
execution.
o Removes the need for programmers to manually manage memory
hierarchy (RAM vs disk).
o Allows programs to use larger memory spaces than physically available.
o Efficient memory sharing when multiple programs run.
o Prevents programs from interfering with each other.
o Eliminates the limitation of small physical memory.
- How virtual memory works:
o Divides memory into fixed-size pages.
o Pages are stored on disk and loaded into RAM as needed.
o MMU (Memory Management Unit) performs virtual-to-physical address
translation using page tables.
o If a required page isn’t in RAM, a page fault occurs, and the OS loads the
page from disk.
- Techniques involved(explain both in brief):
o Paging
o Segmentation
- Advantages:
o Programs are not limited by physical RAM.
o More programs can run simultaneously (better multiprogramming).
o Improves CPU utilization and system throughput.
o Reduces I/O operations for loading/swapping.
5
o Disadvantages – internal fragmentation exists in last disk block of file,
overhead of maintaining pointer in every disk block, if pointer of any disk
block is lost file will be truncated, supports only sequential access of files.
- Indexed Allocation:
o Addresses many problems of contiguous & chained allocation. File
allocation table contains a separate one-level index for each file: index has
one entry for each block allocated to file. Allocation may be on basis of
fixed-size blocks or variable-sized blocks. Allocation by blocks eliminates
external fragmentation whereas allocation by variable-size blocks improves
locality. It supports both sequential & direct access to file & is most popular
form of file allocation.
6
- Implementation:
o Contiguous allocation:
Directory Entry:
Filename | Start Block | Length
o Chained allocation:
Block: [Data | Pointer to Next Block]
Directory Entry:
Filename | Starting Block
o Indexed allocation:
Directory Entry:
Filename | Index Block Address
Index Block:
[Block 1 | Block 2 | Block 3 | …]
7
Multiple instances per resource → A cycle may or may not indicate a
deadlock.
- Critical region:
o A critical section is a part of a program where a shared resource (like a
variable, file, or memory location) is accessed and modified.
o Since multiple processes or threads may try to access the shared resource
simultaneously, the critical section must be executed by only one process at
a time to prevent data inconsistency or race conditions.
o It contains code that accesses shared resources.
o Mutual exclusion is required to ensure that only one process is executing in
its critical section at any time.
o The OS or programmer uses synchronization techniques (like semaphores,
mutexes, monitors) to manage critical sections.
o Problems:
Synchronization
Increased overhead
Potential for deadlocks
Limitations on parallelism
Race condition
o Solution
Mutual Exclusion – Only one process in the critical section at a time.
Progress – If no process is in the critical section, others can proceed.
Bounded Waiting – A process will eventually get a turn.
9
- Many to one model: multiple user threads mapped to one kernel thread. When a
user thread makes a blocking system call, entire process blocks. As we have only
one kernel thread & only one user thread can access kernel at a time, so multiple
threads are not able to access multiprocessor at same time. Thread management
is done on user level so it is more efficient.
- One to one model: one to one relationship between kernel & user thread. Here
multiple thread can run on multiple processor. Problem with this model is that
creating a user thread requires corresponding kernel thread. As each user thread
is connected to different kernel, if any user thread makes a blocking system call,
other user threads won’t be blocked.
10. Explain paging in detail. Describe how logical address is converted into
physical address. [DEC 22/MAY 24]
- Partition memory into small equal fixed-size chunks & divide each process into
same size chunks. These chunks of a process are called pages & these chunks
of memory are called frames. OS maintains a page table for each process. Page
table contains frame location for each page in process, memory address consist
of a page number & offset within the page.
- Process of retrieving processes in form of pages from secondary storage into
main memory is known as paging. Basic purpose of paging is to separate each
procedure into pages.
- Mapping between logical pages & physical page frames is maintained by page
table which is used by memory management unit to translate logical addresses
into physical addresses. Page table maps each logical page number to a physical
page frame number.
- Logical address to physical address
10
11. a) What is semaphore and its types? How the classic synchronization
problem – Dining philosopher is solved using semaphores? [DEC 22/MAY
24]
b) What is semaphore? What is its significance? [MAY 23]
c) Write short note on: Semaphores [DEC 23]
- Semaphore is an integer value used for signalling among processes, it is a
synchronization tool that does not require busy waiting, it can only be accessed
via two indivisible (atomic) operations, 3 operations can be performed on
semaphores all are atomic – initialize, increment(signal) & decrement(wait). A
queue is used to hold processes waiting on semaphore, strong semaphore use
FIFO, weak semaphores don’t specify order of removal from queue.
- Types of semaphore – Counting semaphore (integer value can range over
unrestricted domain) & Binary semaphore (integer value can range only between
0 & 1, it can be simpler to implement)
wait(s) signal(s)
- RAID 2 (Bit-level stripping with hamming code) – specialized RAID level that uses
bit-level stripping combined with error correction using Hamming Code. Data is
distributed at bit level across multiple drives & dedicated parity drive is used for
error detection & correction.
12
- RAID 3 (Byte-level stripping/block-level parity) – enhances fault tolerance by
employing byte-level stripping across multiple drives & storing parity info on
dedicated parity drive. Dedicated parity drive allows for reconstruction of lost data
if single drive fails.
13
13. What is open-source operating systems? What are the design issues of
Mobile operating system and Real time operating system? [DEC 22/MAY 24]
- An open source OS is a type of OS whose source code is made publicly available
for anyone to view, modify & distribute. These are often developed collaboratively
by a community of programmers & are usually free to use. (Ex: Linux, BSD, QNX)
- Linux is most famous open-source OS & it powers a large portion of servers,
smartphones & desktops. Popular distributions are ubuntu, Debian, fedora, arch
linux. Key features – customizability, wide hardware support, community-driven
development, & large software repository
- BSD (Berkeley Software Distribution) – they are derived from original Unix.
Popular distributions are FreeBSD, OpenBSD, NetBSD. Key features – Robust
networking support, secure by design, & strong unix heritage.
- QNX – commercial real-time OS (RTOS) but its core is available as open-source.
Used in embedded systems primarily. Key features – Real time performance,
modularity, & reliability in embedded applications.
- Design issues of Mobile OS:
o Resource constraints – limited CPU, memory & battery, need for power-
efficient resource management.
o User Interface Responsiveness – ensure smooth touch, gesture & display
performance
o Security & Privacy – app sandboxing, permission models.
o Application lifecycle management – managing app states (background,
foreground, suspended, terminated), handling resource allocation for
multitasking
o Network Variability – mobile N/W are less reliable & vary in speed
o Fragmentation, App Store Ecosystem Integration, Power management,
Updates & patching
- Design issues of RTOS:
o Deterministic Response (timing predictability) – tasks must be executed
within strict time constraints, missing deadline can cause system failure
o Resource constraint – runs on microcontrollers with very limited memory &
processing power.
o Scheduling – priority based preemptive
o Interrupt handling – fast & predictable interrupt service routines.
o Minimal latency – very low interrupt latency & context switch time
14
o Safety & reliability – critical for medical devices, automotive, industrial
control
o Concurrency & synchronization – multiple tasks/processes need reliable
IPC
o Static memory allocation – avoids dynamic memory allocation to prevent
fragmentation & non-determinism
o Minimal power consumption
15
Key component is dispatcher (part of OS
Key component is scheduler (part of OS
that performs context switch after
that makes scheduling decisions)
scheduling)
Affects overall system responsiveness & Context switching introduces overhead
efficiency by choosing optimal processes because it consumes CPU cycles without
to run doing useful work
Objective is to implement decision made
Objective is to ensure fair, efficient &
by scheduler by actually switching
policy-driven CPU time distribution
between processes
20. State features of Cloud OS. Enlist its advantages and disadvantages.
[MAY 23]
- A cloud OS is an OS designed to manage & run applications, services &
resources within a cloud computing environment. A cloud OS is designed to
provide seamless access to cloud resources, allowing users to interact with
virtualized hardware, storage, networking & computing resources over the
internet. [Ex: Google Cloud Platform (GCP), Amazon Web Services (AWS), Cloud
Foundry, OpenStack, IBM Cloud]
- Features:
o Virtualization Support – Manages virtual machines (VMs) & abstracts
hardware resources.
o Scalability – Dynamically allocates resources (CPU, memory, storage)
based on demand.
o Multi-Tenancy – Supports multiple users securely on a shared
infrastructure.
o Resource Management – Efficiently manages computing resources,
ensuring optimal performance.
o Web-Based Interface – Accessible through a web browser; no need for
installation on client side.
o Security & Access Control – Includes identity management, role-based
access, & data encryption.
o API integration – Offers APIs for developers to build & integrate cloud-
based applications.
o Monitoring & Analytics – Tracks performance metrics, logs, & system health
in real-time.
o Storage Services - Provides access to distributed file systems or object
storage.
o Automatic Updates – Software & system updates are handled centrally &
automatically.
19
- Advantages:
o Cost Efficiency – Reduces hardware & maintenance costs; pay-as-you-go
pricing models
o Remote Accessibility – Accessible from anywhere with internet connectivity.
o High Availability – Built-in redundancy & failover mechanisms ensure
uptime.
o Fast Deployment – Rapid provisioning of servers, applications & services.
o Centralized Management – Simplifies administrative tasks across multiple
machines & users.
o Environmentally Friendly – Optimized use of shared infrastructure reduces
energy usage.
o Improved collaboration – Multiple users can access & work on shared
resources in real-time.
- Disadvantages:
o Dependence on Internet – Requires stable & fast internet access for optimal
performance.
o Data Security & Privacy Risks – Potential exposure of sensitive data if
security is compromised.
o Limited Control – Less control over infrastructure compared to on-premise
systems.
o Downtime & Outages – Cloud provider issues can lead to service
interruptions.
o Compatibility issues – Some legacy applications may not be supported.
o Vendor Lock-In – Switching providers can be difficult & costly due to
proprietary technologies.
o Ongoing Costs – Long-term operational costs may accumulate, especially
with increasing usage.
20
3. Handling Page Fault – When a program tries to access a page that isn’t in
memory at the moment, a page fault happens. In order to determine whether
necessary page is on disk, OS pauses application & consults page tables.
4. Page fetch – OS loads necessary page into memory by retrieving it from disk
if it is there. New location of page is reflected in page table.
5. Resuming the program – OS picks up where it left off when necessary pages
are loaded into memory.
6. Page Replacement – If there is not enough free memory to hold all pages a
program needs, OS may need to replace one or more pages currently in
memory with pages currently in memory on disk. Page replacement algorithm
used by OS determines which pages are selected for replacement.
7. Page Cleanup – When a process terminates, OS frees memory allocated to
process & cleans up corresponding entries in page tables.
21
o Faster program start – As only part of program is initially loaded into
memory, programs can start faster than if entire program were loaded at
once.
o Reduce memory usage – Query paging can help reduce amount of memory
a program needs which can improve system performance by reducing
amount of disk I/O required.
- Disadvantages:
o Page Fault Overload – process of swapping pages between memory & disk
can cause performance overhead, especially if program frequently
accesses pages that are not currently in memory.
o Degraded Performance – If a program frequently accesses pages that are
not currently in memory, system spends a lot of time swapping out pages,
which degrades performance.
o Fragmentation – Query paging can cause physical memory fragmentation,
degrading system performance over time.
o Complexity – Implementing query paging in an OS can be complex,
requiring complex algorithms & data structures to manage page tables &
swap space.
- Hardware support required:
o Memory Management Unit (MMU) – translates virtual addresses to physical
addresses using page table, checks valid (proceed with address
translation)/invalid bit (page fault occurs)
o Page Fault Trap Mechanism – hardware must be capable of generating a
trap (interrupt) when page fault occurs. This trap transfers control to OS
which then locates page on disk, loads it into free frame in memory,
updates page table & restarts instruction that caused fault.
- Secondary Storage Interface, Buffer, etc.
23. Write short note on: Real Time Operating System [MAY 23/DEC 23/MAY
24]
- RTOS is an OS specifically designed to meet requirements of real-time
applications, where correctness of an operation depends not only on its logical
correctness but also on time it was executed. An RTOS ensures that critical tasks
are completed within defined time constraints known as deadlines.
- Types of RTOS: Hard RTOS, Soft RTOS, Firm RTOS
- Hard Real-Time Systems: missing a deadline is unacceptable & can lead to
catastrophic failures. (Ex: automotive airbag systems, medical infusion pumps)
- Soft Real-Time Systems: meeting deadlines is important but not critical. Missing a
deadline may result in degraded performance or reduced quality of service but
22
system will continue to function (Ex: video streaming applications, real-time
gaming)
- Firm Real-Time Systems: similar to soft RTOS, but missing a deadline often
results in a significant degradation in system’s performance or quality. It is not
catastrophic but system should try to meet deadlines as much as possible. (Ex:
Online transaction processing systems, stock trading systems)
- Uses of RTOS – defense systems like RADAR, air traffic control system, medical
devices like pacemakers, stock trading applications.
- Advantages – maximum consumption, task shifting, focus on application, error
free, memory allocation
- Disadvantages – limited tasks, use heavy system resources, complex algorithms,
thread priority, minimum switching
24. Write short note on: Deadlock avoidance [MAY 23/DEC 24]
- write about deadlock & conditions….
- A decision is made dynamically whether the current resource allocation request
will (if granted) potentially lead to a deadlock. This requires knowledge of future
process requests. There are 2 approaches to avoid deadlock.
- 1 – do not start a process if its demands might lead to deadlock & 2 – do not
grant an incremental resource request to a process if this allocation might lead to
deadlock
- Resource allocation denial refers to banker’s algorithm, the state of system is the
current allocation of resource to process, safe state is a state where there is at
least on sequence that does not result in deadlock whereas unsafe state is a
state that is not safe.
- Write about banker’s algorithm, safe sequence, allocation matrix, need matrix,
claim matrix, available resource, etc.
25. a) Write short note on: Process Control Block [MAY 23]
b) What is a process? Explain Process Control Block in detail. [DEC 23/DEC
24]
- Process is a program in execution, it is an instance of program running on a
computer, it is an entity that can be assigned to & executed on a processor, it is a
unit of activity characterized by execution of a sequence of instructions (a current
state & an associated set of system instructions)
- Process consists of – program code (an executable program), set of data
(associated data needed by program), no. of attributes describing state of
process & execution context of program (all info OS needs to manage process)
- PCB contains process elements, it is created & managed by OS, it allows support
for multiple processes
23
- Components of PCB:
o Identifier – unique ID to distinguish from other process
o State – if process is executing currently then it is in running state
o Priority – priority level relative to other processes
o PC (Program Counter) – address of next instruction in program to be
executed
o Memory pointers – includes pointers to program code & data associated &
also any memory blocks shared with other processes
o Context data – these are data that are present in register in processor while
process is executing
o I/O status info – includes outstanding I/O requests, I/O devices assigned to
this process, a list of files in use by process & so on….
o Accounting info – may include amount of processor time & clock time used,
time limits,…..
- Role of PCB:
o It is most import data structure in OS (defines state of OS)
o It requires protection: 1 – faulty routine can cause damage to block
destroying OS’s ability to manage process & 2 – any design change to
block can affect many modules of OS
24
- Five-state Process Model:
25
27. Explain about IPC. [DEC 23/DEC 24]
- In order to cooperate concurrently executing processes must communicate &
synchronize, IPC is based on use of shared variables (variables referenced by
more than one process) or message passing.
26
28. What are different types of process scheduling algorithms? Explain
anyone scheduling algorithm with example. [DEC 23]
- Scheduling is the activity of process manager that handles removal of running
process from CPU & selection of another process on basis of a particular
strategy.
- FCFS (First Come First Serve):
o It is non pre-emptive
o Pro – simple to implement & understand
o Con – poor average waiting time (not very good for time-sharing systems)
o Convoy effect – short process behind long process, one CPU-bound
process with numerous I/O-bound processes, resource utilization of I/O
device degrades.
- Shortest Job First (SJF):
o Length of next CPU burst is associated with each process. Schedules the
process with shortest burst. Use FCFS sub-scheduling to break ties.
o Two Schemes – Non pre-emptive & Pre-emptive
o Non pre-emptive – cannot pre-empt before process completes its CPU
burst
o Pre-emptive – if a new process arrives with CPU burst length less than
remaining time of current executing process, then pre-empt (known as
shortest remaining time first – SRTF)
o SJF is optimal, minimizes average waiting time for any given set of
processes.
- Priority scheduling:
o A priority number (integer) is associated with each process within specified
range (0 to 255)
o CPU is allocated to process with highest priority (smallest integer = highest
priority) [can be pre-emptive or non pre-emptive]
o SJF is like priority scheduling, priority is predicted next CPU burst time.
o Problem – starvation (low priority process may never execute)
o Solution – aging (as time progresses increase priority of process)
- Round Robin (RR):
o Each process gets a small unit of CPU time (time quantum). After this time
has elapsed, process is pre-empted & added to end of ready queue.
o If ‘n’ processes in ready queue & time quantum is ‘q’ then each process
gets of CPU time in chunks of at most ‘q’ time units at once. No process
waits more than (𝑛 − 1)𝑞 time units.
o Time quantum 𝑞 must be large with respect to context switch, otherwise
overhead is too high
o Performance: when q large FIFO, when q small processor sharing
27
29. a) Give detail comparison of user level and kernel level threads. [DEC 23]
b) What is thread in OS? Compare user level and kernel level threads. [DEC
24]
- Refer to thread answer….
User level threads Kernel level threads
Implemented by user-level libraries Implemented by OS
OS doesn’t recognize user-level
Recognized by OS
threads directly
Implementation is easy Implementation is complicated
Context switch time is less Context switch time is more
No hardware support is required Hardware support is required
If one user-level thread performs If one kernel thread performs blocking
blocking operation then entire process operation then another thread can
will be blocked continue execution
Multithreaded applications cannot take
Can be multithreaded
full advantage of multiprocessing
Can be created & managed more
Takes more time to create & manage
quickly
Any OS supports user-level threads Kernel-level threads are OS specific
Limited access to system resources,
Can access to system-level features
cannot directly perform I/O operations
More portable than kernel-level
Less portable due to dependence on OS
threads
28
down into processes called as servers, tough to implement/code, performance is
low, more secure because if one service crashes others still function properly.
Monolithic Microkernel
User services & kernel services are User services & kernel services are
kept in same address space kept in separate address space
Larger than microkernel Smaller in size
Fast execution Slow execution
Hard to extend Easily extendible
If a service crashes other services
If a service crashes, whole system
function independently but effects on
crashes.
microkernel
Less code required to write More code is required to write
Ex: Linux, BSDs Ex: QNX, Symbian
29
32. a) List page replacement algorithms? Explain anyone page replacement
algorithms with example. [DEC 23]
b) What is page replacement? Explain anyone page replacement algorithm
with example. [DEC 24]
- Page replacement algorithms are used in virtual memory systems to decide
which memory page to remove when a new page needs to be loaded and
memory is full.
- Common Page Replacement Algorithms: (These are just overview write
something in your own words or include diagrams/example)
i. FIFO (First-In, First-Out)
Replaces the oldest loaded page.
Simple to implement using a queue.
Can lead to Belady’s Anomaly (more frames → more page faults).
ii. LRU (Least Recently Used)
Replaces the page that was least recently used.
Based on the past usage pattern.
Gives good performance, but costly to implement (requires tracking).
iii. Optimal Page Replacement (OPT)
Replaces the page that will not be used for the longest time in future.
Gives the lowest possible page fault rate.
Not implementable in practice (requires future knowledge).
iv. NRU (Not Recently Used)
Uses reference (R) and modify (M) bits.
Classifies pages into 4 categories; removes from the lowest class.
Good balance of performance and overhead.
v. LFU (Least Frequently Used)
Replaces the page with lowest access count.
Assumes pages used less often are less important.
Can be inefficient if old but heavily used pages stay long.
36. What are features of Mobile and Real Time Operating Systems? [MAY 24]
- Features of Mobile OS:
o Rich GUI – touchscreen support, gestures, animations, multi-windowing
o Multitasking – runs multiple apps simultaneously, background & foreground
app management
o App store ecosystem – centralized platform for downloading, installing, &
updating applications securely
o Network connectivity – seamless switching between Wi-Fi, 4G/5G,
Bluetooth, & NFC
o Power management – Aggressive background task control to optimize
battery life, app standby & sleep modes.
o Security & permissions – app sandboxing, runtime permissions for
accessing locations contacts camera etc.
o Multimedia capabilities – audio, video playback, camera integration, AR
(augmented reality), VR (Virtual Reality) support on modern devices
o Sensor support – accelerometers, gyroscopes, GPS, proximity sensors,
biometric scanners
o Cloud integration – sync with cloud services for contacts media files &
backups
o Frequent updates & patches – system & security updates delivered via
internet
- Features of RTOS (refer RTOS design issues), deterministic response time,
priority based scheduling, minimal latency, resource efficiency, static memory
allocation, task synchronization & IPC, modularity & portability, device driver
support, minimal power consumption, high reliability & safety
37. What is difference between physical address and virtual address? [DEC
24]
Physical Address Virtual address
It is a location in a memory unit It is generated by CPU
It is a set of all physical addresses It is set of all logical addresses
mapped to corresponding logical generated by CPU in reference to a
addresses program
User can never view physical address User can view logical address of a
of program program
32
Computed by MMU (memory Computed by CPU
management unit)
User can indirectly access physical User can use logical address to
address but not directly access physical address
Physical address will not change i.e. Logical address can change
not editable
It is also called as real address It is also called as logical address
33
39. Write short notes on: Cache Memory [DEC 24]
40. What is paging?
- Paging is a memory management scheme that eliminates external
fragmentation and minimizes internal fragmentation.
- It divides both logical memory (process) and physical memory (RAM)
into fixed-size blocks:
o Pages (in logical memory)
o Frames (in physical memory)
- When a process is loaded, its pages are placed into any available frames,
even if they are not conƟguous.
- This removes the need for allocaƟng a large conƟguous block, solving
the problem of external fragmentaƟon.
- Internal fragmentaƟon may sƟll occur in the last page of a process if it's
not completely filled, but this is limited and predictable.
- A page table is used to maintain the mapping between the process’s
pages and memory frames.
- Logical address is split into: → Page number (used to index into the page
table) → Offset (used within the frame)
- Example:
o If a process needs 18 KB and page/frame size is 4 KB:
→ It will require 5 pages (4 full pages and 1 parƟally filled)
o Only the last page will have 2 KB internal fragmentaƟon (if it uses
only 2 KB of the 4 KB frame)
- Advantages:
o No external fragmentation – Pages fit into any available frame.
o Efficient memory utilization – Makes use of all free frames.
o Simplifies memory allocation – Fixed-size pages and frames are
easier to manage.
o Supports virtual memory – Pages can be stored in secondary
memory until needed.
- Disadvantages:
o Minor internal fragmentation – Wasted space in the last page.
o Overhead of page table – Needs memory to store and manage
mappings.
o Slower address translation – Requires hardware support like TLB
to maintain speed.
34