OS Assignment 9 and 10
OS Assignment 9 and 10
OS Assignment 9 and 10
The allocation methods define how the files or data are stored in the disk space/blocks.
There are three main disk space or file allocation methods.
1. Contiguous Allocation
2. Linked Allocation
3. Indexed Allocation
The main purpose for this different methods is to provide Efficient disk space utilization.
Fast access to the file blocks
reference:
File Allocation Methods - GeeksforGeeks
File Allocation Methods in OS - Scaler Topics
Assignment 10
Explain the concept of Paging & Segmentation with various partitioning methods
?
In the non-contiguous memory allocation technique, different parts of the same process
are stored in different places of the main memory
1. Paging
2. Segmentation
Paging
Paging is a non-contiguous memory allocation technique in which secondary
memory and the main memory is divided into equal size partitions. The
partitions of the secondary memory are called pages while the partitions of
the main memory are called Frames. They are divided into equal size
partitions to have maximum utilization of the main memory and avoid
external fragmentation.
Various partitioning methods associated with paging include:
1. Fixed Partitioning:
In fixed partitioning, physical memory is divided into fixed size
partitions, and each partition can hold one process.
Each process occupies an entire partition, and processes cannot
exceed the size of the partition.
2. Dynamic Partitioning:
In dynamic partitioning, memory is divided into variable sized partitions
to accommodate processes of varying sizes.
Paging can be combined with dynamic partitioning by dividing each
partition into fixed size frames and allocating pages to these frames
dynamically.
Segmentation
In paging, we were blindly diving the process into pages of fixed sizes but in
segmentation, we divide the process into modules for better visualization of
the process. Here each segment or module consists of the same type of
functions. For example. the main function is included in one segment, library
function is kept in other segments, and so on.
Various partitioning methods associated with segmentation include:
1. Pure Segmentation:
In pure segmentation, the logical address space is divided into
segments of variable sizes.
Each segment represents a different part of the program, such as code,
data, or stack.
Segments are mapped to physical memory using segment tables,
which contain the base address and size of each segment.
2. Segmentation with paging:
This method combines segmentation with paging to take advantage of
the benefits of both techniques.
Each segment is further divided into pages of fixed size, allowing for
more efficient use of memory.
Segment tables map segment numbers to page tables, which in turn
map page numbers to physical frames.
reference:
What are Paging and Segmentation? (afteracademy.com)
Difference Between Paging and Segmentation - GeeksforGeeks
Difference between Paging and Segmentation - javatpoint