Code No: A63EX R 22
B V R AJ U IN S T I TU TE O F T E C H N O L O G Y , N AR S A P U R
(UGC - AUTONOMOUS)
II B. Tech I Semester Supplementary Examinations, July 2024
PRINCIPLES OF OPERATING SYSTEMS
(Open Elective)
Time: 3 Hours Max Marks: 60
Note: This Question Paper contains two Parts A and B
• Part A is compulsory which carries 10 marks. Ten questions from five units. Answer all
questions in Part A at one place only.
• Part-B consists of 5 Questions (numbered from 2 to 6) carrying 10 marks each. Each of these
questions is from one unit and may contain a, b, c as sub-questions. For each question there
will be an either/or choice (that means there will be two questions from each unit and the
student should answer only one question).
PART – A (10x1 = 10 Marks)
1.a) What are the main functions performed by an operating system in
managing a computer system?
An operating system (OS) performs several key functions to manage a computer system
effectively. These functions include:
• Process Management
• Memory Management
• File System Management
• Device Management
• Security and Protection
b). Differentiate between batch processing and time-shared operating systems
c). How does preemptive scheduling differ from non-preemptive scheduling in the context
of process scheduling?
Preemptive scheduling is used when a process switches from the running state to the ready state
or from the waiting state to the ready state.
Non-preemptive Scheduling is used when a process terminates, or a process switches from
running to the waiting state.
d).Find a name for common scheduling algorithm used for multiple processors
scheduling algorithms for multiple processors include:
• First-Come, First-Served (FCFS)
• Shortest Job Next (SJN)
• Priority Scheduling
• Multilevel Queue Scheduling
• Multilevel Feedback Queue
e). Define the concept of "Process Synchronization"
Process Synchronization is the coordination of execution of multiple processes in a multi-
process system to ensure that they access shared resources in a controlled and predictable
manner. It aims to resolve the problem of race conditions and other synchronization issues
in a concurrent system
f). List two classic problems of synchronization
• Bounded–buffer (also producer-consumer or vendor-customer) problem
• Dining philosophers problem
g).Define the term "Swapping" in memory management
Swapping is a memory management technique used in multi-programming to increase
the number of processes sharing the CPU. It is a technique of removing a process from the
main memory and storing it into secondary memory, and then bringing it back into the main
memory for continued execution.
h).List two common page replacement algorithms used in virtual memory systems
There are two main types of page replacement algorithms: first in, first out (FIFO), and least
recently used (LRU).
i).How does a file system implementation ensure efficient allocation of storage space
for files?
The file system determines how data is stored on physical storage devices. It manages the
allocation of space for files and directories. It organizes data into a hierarchical structure,
typically using directories to create a logical organization of files.
j).Find a name for disk scheduling algorithm used in mass storage structures
The main purpose of disk scheduling algorithm is to select a disk request from the queue of
IO requests and decide the schedule when this request will be processed. The list of various
disks scheduling algorithm is given below
o FCFS scheduling algorithm
o SSTF (shortest seek time first) algorithm
o SCAN scheduling
o C-SCAN scheduling
o LOOK Scheduling
o C-LOOK scheduling
PART-B
2.a Define the objectives and functions of an operating system. Explain why an
operating system is essential for computer systems
Objectives of an Operating System
1. Resource Management:
o Processor Management: Allocating CPU time to various tasks efficiently.
o Memory Management: Handling and optimizing the use of primary memory.
o Device Management: Managing hardware peripherals like printers, monitors,
and storage devices.
o File System Management: Organizing and managing data storage and
retrieval.
2. User Interface:
o Providing a user-friendly interface to interact with the system (CLI or GUI).
3. Execution of Programs:
o Loading and executing application programs and services.
4. Security and Access Control:
o Protecting data and resources from unauthorized access and ensuring data
integrity.
5. Error Detection and Handling:
o Identifying and responding to errors and ensuring smooth system operation.
6. Job Accounting:
o Tracking and managing resource usage, often used for billing or analysis
purposes.
Functions of an Operating System
1. Process Management:
o Creating, scheduling, and terminating processes.
o Ensuring efficient execution and multitasking.
2. Memory Management:
o Allocating and deallocating memory spaces as needed.
o Managing virtual memory and memory swapping.
3. File System Management:
o Organizing files and directories for efficient storage and retrieval.
o Managing permissions and access controls for files.
4. Device Management:
o Handling communication with peripheral devices through drivers.
o Managing input/output operations and buffering.
5. Security and Protection:
o Implementing authentication and authorization mechanisms.
o Enforcing security policies and protecting against malicious activities.
6. Networking:
o Managing network connections and protocols.
o Facilitating communication between devices over a network.
7. User Interface:
o Providing command-line or graphical interfaces for user interaction.
o Managing user sessions and profiles.
Importance of an Operating System
1. Resource Coordination:
o An OS ensures efficient and fair resource allocation among various
applications and users, preventing conflicts and bottlenecks.
2. User Convenience:
o It abstracts complex hardware operations, providing a simpler and more
intuitive interface for users and developers.
3. Multitasking and Multiprogramming:
o Allows multiple applications to run simultaneously, enhancing productivity
and resource utilization.
4. Hardware Abstraction:
o Facilitates hardware independence for applications, making software
development and execution more flexible.
5. Security and Stability:
o Protects system integrity and user data from unauthorized access and
malicious activities.
o Manages errors and system failures to ensure continuous operation.
6. Efficiency and Performance:
o Optimizes system performance through efficient management of CPU,
memory, and I/O operations.
o Ensures minimal idle time for resources, maximizing throughput and system
responsiveness.
OR
[Link] and contrast the characteristics of simple, batch, and multi
programmed time-shared operating systems. Highlight the advantages and
disadvantages of each type
1. Batch Operating System
This type of operating system does not interact with the computer directly. There is an
operator which takes similar jobs having the same requirements and groups them into
batches. It is the responsibility of the operator to sort jobs with similar needs. Batch Operating
System is designed to manage and execute a large number of jobs efficiently by processing
them in groups.
Advantages of Batch Operating System
• Multiple users can share the batch systems.
• The idle time for the batch system is very less.
• It is easy to manage large work repeatedly in batch systems.
Disadvantages of Batch Operating System
• Batch systems are hard to debug.
• It is sometimes costly.
• The other jobs will have to wait for an unknown time if any job fails.
• In batch operating system the processing time for jobs is commonly difficult to
accurately predict while they are in the queue.
• It is difficult to accurately predict the exact time required for a job to complete
while it is in the queue.
2. Multi-Programming Operating System
Multiprogramming Operating Systems can be simply illustrated as more than one program is
present in the main memory and any one of them can be kept in execution. This is basically
used for better execution of resources.
Advantages of Multi-Programming Operating System
• Multi Programming increases the Throughput of the System.
• It helps in reducing the response time.
Disadvantages of Multi-Programming Operating System
• There is not any facility for user interaction of system resources with the system.
[Link] Operating Systems
Characteristics:
1. Single Tasking:
o Executes one task at a time.
o No overlap between the execution of different programs.
2. Minimal Resource Management:
o Simple allocation of resources since only one process runs at a time.
o No need for complex scheduling algorithms.
3. User Interaction:
o Often provides a basic interface, typically command-line based.
oLimited user control and functionality.
4. Resource Utilization:
o Inefficient use of CPU and other resources since the system remains idle when
the program waits for I/O operations.
Advantages:
• Simple and easy to design.
• Less overhead and resource requirements.
Disadvantages:
• Poor utilization of CPU and other resources.
• Not suitable for multitasking environments.
***
3.a. Define the concept of a Process Control Block (PCB) in the context of process
scheduling. List the information typically stored in a PCB.
A Process Control Block (PCB) is a data structure used by the operating system to manage
information about a process. The process control keeps track of many important pieces of
information needed to manage processes efficiently. The diagram helps explain some of these
key data items.
• Pointer: It is a stack pointer that is required to be saved when the process is
switched from one state to another to retain the current position of the process.
• Process state: It stores the respective state of the process.
• Process number: Every process is assigned a unique id known as process ID or
PID which stores the process identifier.
• Program counter: Program Counter stores the counter, which contains the
address of the next instruction that is to be executed for the process.
• Register: Registers in the PCB, it is a data structure. When a processes is
running and it’s time slice expires, the current value of process specific registers
would be stored in the PCB and the process would be swapped out. When the
process is scheduled to be run, the register values is read from the PCB and
written to the CPU registers. This is the main purpose of the registers in the
PCB.
• Memory limits: This field contains the information about memory management
system used by the operating system. This may include page tables, segment
tables, etc.
• List of Open files: This information includes the list of files opened for a
process.
OR
[Link] the advantages and disadvantages of different scheduling criteria, such
as CPU utilization, throughput, turnaround time, and waiting time. Develop a
hypothetical scenario where you would prioritize one criterion over others, and
explain your reasoning.
Scheduling Criteria Analysis
1. CPU Utilization
Advantages:
• Efficiency: High CPU utilization means the CPU is being used effectively without
idle time, maximizing productivity.
• Resource Maximization: Ensures that the computing resources are being used to
their fullest potential.
Disadvantages:
• Potential for Starvation: Processes requiring fewer CPU resources might be
neglected in favor of more demanding ones, leading to potential starvation.
• Lack of Fairness: High CPU utilization can sometimes come at the cost of fairness
among processes.
2. Throughput
Advantages:
• High Productivity: Maximizes the number of processes completed in a given time
frame, leading to high system productivity.
• Performance Measurement: Provides a clear metric for evaluating system
performance and efficiency.
Disadvantages:
• Process Prioritization: Focusing solely on throughput might prioritize shorter or less
complex processes over longer ones, potentially leading to imbalanced processing.
• Possible Increase in Turnaround Time: High throughput can sometimes increase the
turnaround time for individual processes if short processes are prioritized over longer
ones.
3. Turnaround Time
Advantages:
• User Satisfaction: Lower turnaround times generally lead to higher user satisfaction
as tasks are completed promptly.
• Balanced System Performance: By focusing on reducing turnaround time, the
system can achieve a balance between responsiveness and efficiency.
Disadvantages:
• Complex Scheduling Algorithms: Requires more sophisticated scheduling
algorithms to minimize turnaround time, which can increase overhead.
• Potential for Increased Waiting Time: Efforts to reduce turnaround time might
inadvertently increase the waiting time for some processes.
4. Waiting Time
Advantages:
• Fairness: Reducing waiting time ensures that all processes receive attention, leading
to a fairer distribution of CPU resources.
• Improved Responsiveness: Lower waiting times result in a more responsive system,
enhancing the user experience.
Disadvantages:
• Potential for Lower Throughput: Focusing on reducing waiting time might decrease
overall throughput as processes are given equal priority regardless of their resource
requirements.
• Complexity: Implementing scheduling policies that minimize waiting time can be
complex and require more sophisticated algorithms.
Hypothetical Scenario
Scenario: Online Transaction Processing System (OLTP)
In an OLTP system, such as those used by e-commerce websites, the primary focus is on
handling a large number of transactions efficiently and in real-time. Users expect quick
responses to their queries and transaction requests, making responsiveness and fairness
critical.
Prioritizing Waiting Time
Reasoning:
1. User Satisfaction: In an OLTP system, user satisfaction is paramount. Reducing
waiting time ensures that each transaction is processed promptly, leading to a
smoother and more satisfactory user experience.
2. Fairness: Since transactions are typically short and numerous, ensuring that no
transaction has to wait excessively long is important. Prioritizing waiting time ensures
that all users receive timely responses.
3. Real-Time Processing: The nature of OLTP systems requires real-time processing of
transactions. Minimizing waiting time helps achieve this by ensuring quick
turnaround for each transaction, keeping the system responsive and efficient.
Trade-offs:
• Throughput: While reducing waiting time might slightly decrease overall
throughput, the benefit of maintaining user satisfaction and real-time responsiveness
outweighs the potential drop in the number of transactions processed per unit time.
• CPU Utilization: High CPU utilization is still important, but the focus on minimizing
waiting time ensures that the CPU cycles are distributed more evenly among
processes, preventing bottlenecks and improving overall system responsiven
***
4.a. Analyse the critical section problem in concurrent computing. Develop a
synchronization solution using semaphores or monitors to address this problem.
Provide a step-by-step explanation of your solution and how it ensures mutual
exclusion, progress, and bounded waiting
Critical Section Problem
The critical section problem arises in concurrent computing when multiple processes need to
access shared resources. The main challenges are ensuring that:
1. Mutual Exclusion: Only one process can be in the critical section at a time.
2. Progress: If no process is in the critical section, the decision of which process will
enter next cannot be postponed indefinitely.
3. Bounded Waiting: Each process must have a bounded number of times it can be
bypassed by other processes before entering its critical section.
Solution Using Semaphores
Semaphores are synchronization tools that can be used to control access to the critical
section. Here, we will use two types of semaphores:
• Binary Semaphore (Mutex): Ensures mutual exclusion.
• Counting Semaphore (S): Ensures bounded waiting and progress.
Detailed Explanation
1. Initialization:
o The binary semaphore mutex is initialized to 1, ensuring only one process can
enter the critical section at a time.
o The counting semaphore S is initialized to the number of processes N. This
allows all processes to initially proceed without waiting.
2. Entry Section:
o The wait(S) operation decrements the counting semaphore. If S is greater than
0, the process continues. If S is 0, the process waits until another process
signals S.
o The wait(mutex) operation decrements the binary semaphore. If mutex is 1,
the process enters the critical section and sets mutex to 0. If mutex is 0, the
process waits until another process signals mutex.
3. Critical Section:
o Only one process can execute this section at a time, ensuring mutual
exclusion.
4. Exit Section:
o The signal(mutex) operation increments the binary semaphore, allowing
another process to enter the critical section.
o The signal(S) operation increments the counting semaphore, allowing waiting
processes to proceed.
Ensuring Mutual Exclusion, Progress, and Bounded Waiting
1. Mutual Exclusion:
o The binary semaphore mutex ensures that only one process can be in the
critical section at a time. Any other process attempting to enter will be blocked
until mutex is signaled.
2. Progress:
o The counting semaphore S ensures that processes can proceed without
unnecessary delay. If no process is in the critical section, a process will be able
to enter immediately when S and mutex are both signaled.
3. Bounded Waiting:
o The counting semaphore S also ensures bounded waiting. Each process is
guaranteed that after a maximum of N-1 process entries, it will be able to enter
the critical section. This prevents indefinite postponement.
OR
[Link] and contrast deadlock prevention and deadlock avoidance strategies
in operating systems. Assume a scenario in a multi-process environment and
evaluate the advantages and disadvantages of each approach
Deadlock is a state in a multi-process system where a set of processes are blocked because
each process is holding a resource and waiting for another resource held by another process.
There are two primary strategies to handle deadlocks: prevention and avoidance.
Deadlock Prevention
Deadlock prevention aims to ensure that at least one of the necessary conditions for
deadlock cannot hold, thus preventing deadlock from occurring. The four necessary
conditions for deadlock are:
1. Mutual Exclusion: Only one process can use a resource at a time.
2. Hold and Wait: Processes holding resources can request new resources.
3. No Preemption: Resources cannot be forcibly taken from processes.
4. Circular Wait: There exists a set of processes such that each process is waiting for a
resource held by the next process in the set.
Strategies for Deadlock Prevention
1. Mutual Exclusion:
o Make resources sharable whenever possible.
2. Hold and Wait:
o Require processes to request all needed resources at once, before execution.
o Ensure processes release all held resources before requesting new ones.
3. No Preemption:
o Allow preemption of resources if a process holding a resource is denied a
subsequent request.
4. Circular Wait:
o Impose a total ordering of all resource types and require processes to request
resources in an increasing order of enumeration.
Deadlock Avoidance
Deadlock avoidance ensures the system never enters an unsafe state where deadlock could
occur. The most common algorithm used for deadlock avoidance is the Banker's Algorithm.
Banker's Algorithm
• Each process must declare the maximum number of resources it might need.
• The system must ensure that the allocation state will always remain safe.
Steps:
1. Resource Request: When a process requests resources, the system checks if it is in a
safe state by temporarily allocating the resources and simulating the future states.
2. Safe State: If the temporary allocation leaves the system in a safe state, the resources
are allocated; otherwise, the process must wait.
Scenario Evaluation: Multi-Process Environment
Scenario: Consider a multi-process environment where several processes (P1, P2, P3) require
access to shared resources (R1, R2, R3) to complete their tasks. Each process can request,
hold, and release resources dynamically.
Deadlock Prevention
Implementation:
• Processes must request all needed resources upfront or release held resources before
requesting new ones.
• Resources are requested in a specific order to prevent circular wait.
Evaluation:
• Advantages:
o Simplicity in implementation.
o Guaranteed deadlock prevention.
• Disadvantages:
o Inefficient resource utilization: Processes may hold resources longer than
necessary.
o Increased waiting time: Processes may need to wait longer to acquire all
needed resources.
Deadlock Avoidance
Implementation:
• Use the Banker's Algorithm to ensure the system remains in a safe state.
• Processes declare maximum resource needs, and the system checks safe state before
allocation.
Evaluation:
• Advantages:
o Efficient resource utilization: Resources are allocated as needed.
o Reduced waiting time: Processes are less likely to be delayed as resources are
allocated dynamically while maintaining safety.
• Disadvantages:
o Complexity: More complex to implement and manage.
o Overhead: Additional computational overhead for constant monitoring and
checking safe states.
***
[Link] a detailed plan for implementing a demand paging memory
management scheme in an operating system. Analyze the steps involved in handling
page faults.
Demand paging is a memory management scheme that loads pages into memory only when
they are needed during execution. This can significantly reduce the amount of memory
required and improve system performance.
Steps for Implementing Demand Paging
1. Initialization:
o Set up the page table and frame table.
o Mark all frames as free initially.
o Mark all pages as not present in the page table.
2. Page Table Structure:
o Each entry should include:
▪ A valid/invalid bit indicating whether the page is in memory.
▪ The frame number if the page is in memory.
▪ A reference bit for page replacement algorithms..
3. Page Fault Handler:
o When a page fault occurs, the operating system must handle it efficiently.
o Steps include:
1. Trap: Detect the page fault and trap to the OS.
2. Check Validity: Ensure the requested page is valid.
3. Load Page: Load the required page from disk into the selected frame.
4. Update Tables: Update the page table and frame table to reflect the
new page location.
5. Restart Process: Restart the interrupted process.
4. Page Replacement Algorithm:
o Common algorithms include:
▪ FIFO (First-In, First-Out): Replaces the oldest page in memory.
▪ LRU (Least Recently Used): Replaces the page that has not been used
for the longest period.
▪ Optimal: Replaces the page that will not be used for the longest period
in the future (ideal but impractical to implement).
5. Disk Management:
o Ensure efficient handling of disk I/O for loading pages into memory.
o Maintain a swap space on disk for storing pages that are not currently in
memory.
6. Performance Optimization:
o Use techniques like page buffering, pre-paging, and working set models to
optimize performance and reduce page faults.
Handling Page Faults: Step-by-Step Analysis
1. Page Fault Detection:
o When a process accesses a page that is not in memory, the MMU (Memory
Management Unit) detects the invalid page table entry and generates a page
fault interrupt.
2. Check Page Validity:
o The OS checks if the accessed page is valid (exists within the process’s
address space). If not, it results in a segmentation fault or process termination.
3. Find a Free Frame:
o The OS checks the frame table for a free frame.
o If a free frame is found, it will be used to load the page.
o If no free frame is available, the OS must select a victim frame using a page
replacement algorithm.
4. Page Replacement:
o The chosen victim frame's page is written back to disk if it has been modified
(dirty bit is set).
o The victim frame is marked as free and can be used for the new page.
5. Load Page from Disk:
o The OS reads the required page from the disk into the free frame.
o Disk I/O operations are performed, which can introduce latency.
6. Update Page and Frame Tables:
o The page table entry for the faulting page is updated to reflect the new frame
number and mark the page as present.
o The frame table is updated to indicate that the frame is now occupied.
7. Restart the Faulting Process:
o The process is restarted from the instruction that caused the page fault.
o The page fault handler returns control to the process, and it can now access the
required page in memory.
OR
5.b. Evaluate the importance and influence of the Memory Hierarchy in modern
computer systems. Justify the significance of having multiple levels of memory
The memory hierarchy in modern computer systems is a structured organization of different
types of memory based on speed, cost, and capacity. The primary purpose of this hierarchy is
to bridge the performance gap between the fast central processing unit (CPU) and the slower
memory components, ensuring efficient and effective system performance.
Structure of Memory Hierarchy
1. Registers:
o Fastest, smallest, and most expensive type of memory.
o Located within the CPU.
o Used for immediate execution of instructions and storing temporary data.
2. Cache Memory:
o L1 Cache: Closest to the CPU, very fast, small capacity.
o L2 Cache: Larger than L1, slightly slower.
o L3 Cache: Larger than L2, shared among multiple CPU cores, slower than L2
but faster than main memory.
3. Main Memory (RAM):
o Primary memory used for storing data and instructions that the CPU needs in
real-time.
o Volatile, meaning data is lost when power is off.
o Slower than cache but faster than secondary storage.
4. Secondary Storage:
o Includes hard drives (HDDs) and solid-state drives (SSDs).
o Non-volatile, retains data without power.
o Larger capacity but significantly slower than RAM.
5. Tertiary Storage:
o Includes optical disks and tape drives.
o Used for archival and backup purposes.
o Slowest and largest in capacity.
Significance of Multiple Levels of M
Performance Optimization:
• The memory hierarchy allows frequently accessed data to be stored in faster memory
(e.g., cache), reducing the average time the CPU spends waiting for data.
• The CPU can quickly access data in registers and cache, while less frequently
accessed data is stored in slower, larger memory types.
Cost Efficiency:
• Faster memory (registers, cache) is more expensive per bit than slower memory
(RAM, SSDs).
• A hierarchical approach balances cost and performance by using smaller amounts of
faster memory and larger amounts of slower, cheaper memory.
***
[Link] the influence of different access methods (e.g., sequential direct,
indexed) on file system performance. Justify the importance of selecting the
appropriate access method for different types of data and applications
In file systems, different access methods—sequential, direct (or random), and indexed—
affect performance based on how data is organized and accessed. Each method has its
strengths and trade-offs, influencing efficiency in various applications.
Access Methods
1. Sequential Access:
o Description: Data is read or written in a linear order. The system starts at the
beginning of the file and proceeds sequentially.
o Example: Reading a log file or processing a text file line by line.
Use Cases:
• Log Files: Where data is appended and accessed in a continuous stream.
• Multimedia Files: Like video or audio files, where processing is typically
done in a sequential manner.
o
2. Direct (or Random) Access:
o Description: Data can be read or written at any location in the file without the
need to process preceding data. Access is based on specific positions or
offsets.
o Example: Accessing a specific record in a database or a particular byte in a
binary file.
Use Cases:
• Databases: Where records are accessed or modified frequently at various
locations.
File Systems: Implementing efficient data retrieval where direct access is
3. Indexed Access:
o Description: Uses an index to quickly locate data. An index maps keys to file
positions, allowing direct access to the data without scanning the entire file.
o Example: Database tables with indexing, or file systems with directory
structures.
Use Cases:
o Database Management Systems (DBMS): Indexing is used to quickly
retrieve records based on keys.
o File Systems with Directory Structures: Efficient file retrieval using
hierarchical directory indexing.
OR
[Link] a new file allocation method that optimizes storage space utilization and
minimizes fragmentation. Discuss how your proposed method would work and its
potential advantages over traditional allocation methods
The allocation methods define how the files are stored in the disk blocks. There are three
main disk space or file allocation methods.
• Contiguous Allocation
• Linked Allocation
• Indexed Allocation
The main idea behind these methods is to provide:
• Efficient disk space utilization.
• Fast access to the file blocks.
All the three methods have their own advantages and disadvantages as discussed below:
1. Contiguous Allocation
n this scheme, each file occupies a contiguous set of blocks on the disk. For example, if a
file requires n blocks and is given a block b as the starting location, then the blocks
assigned to the file will be: b, b+1, b+2,……b+n-1. This means that given the starting
block address and the length of the file (in terms of blocks required), we can determine the
blocks occupied by the file.
The directory entry for a file with contiguous allocation contains
• Address of starting block
• Length of the allocated portion.
The file ‘mail’ in the following figure starts from the block 19 with length = 6 blocks.
Therefore, it occupies 19, 20, 21, 22, 23, 24 blocks.
2. Linked List Allocation
In this scheme, each file is a linked list of disk blocks which need not be contiguous. The
disk blocks can be scattered anywhere on the disk.
The directory entry contains a pointer to the starting and the ending file block. Each block
contains a pointer to the next block occupied by the file.
The file ‘jeep’ in following image shows how the blocks are randomly distributed. The last
block (25) contains -1 indicating a null pointer and does not point to any other block.
3. Indexed Allocation
In this scheme, a special block known as the Index block contains the pointers to all the
blocks occupied by a file. Each file has its own index block. The ith entry in the index
block contains the disk address of the ith file block. The directory entry contains the
address of the index block as shown in the image: