ZILKIFIL
ZILKIFIL
ZILKIFIL
ASSIGNMENT ON
OPERATING SYSTEM II
BY
ZULKIFIL IBRAHIM
1
Q1; USE a diagram to show SWAPPING ACTIVITY IN AN
OPERATING SYSTEM:
2
processes to the operating system box represent the activity or
communication between the processes and the operating system.
Please note that this is a basic ASCII art representation and may
not accurately capture the complexity and dynamics of actual
activity in an operating system. For more detailed and
comprehensive diagrams, using specialized diagramming tools
would be more appropriate.
3
Q3: SIMPLY STATE THE ADVANTAGE OF ANY OTHER
MEMORY MANAGEMENT TECHNIQUE OVER A SINGLE
CONTIGIOUS MEMORY MANAGEMENT USE DIAGRAM TO A
SUPPORT YOUR PRESENTATION.
One advantage of memory management techniques that do not rely on a
single contiguous memory block is the ability to utilize fragmented or
non-contiguous memory space more efficiently. One such technique is
the "Paging" memory management technique, where memory is divided
into fixed-size blocks called "pages," and processes are divided into
smaller fixed-size blocks called "pages" as well. Here's a diagram to
illustrate the advantage of paging over single contiguous memory
management:
_______________________________________
| |
| Process 1 |
| |
|_______________________________________|
4
|
______________________________________________
________|
As you can see, in the single contiguous memory management, the entire
memory space is occupied by Process 1, even if it does not fully utilize
all the memory. However, in the paging memory management, each
process is divided into smaller fixed-size pages, and these pages can be
scattered throughout the memory,
Allowing for more efficient use of memory space. This can help reduce
external fragmentation, as smaller chunks of free memory can be used to
accommodate processes that do not require contiguous memory blocks.
Additionally, paging allows for easy and efficient allocation and
deallocation of memory pages,
making it more flexible and adaptable to varying memory requirements of
different processes.
Q2;
Create a job say job 1 in a memory with 10 partitions having
5kbon the first with an increase of 6k on each of the
remaining partitions to the 10th one if the job has 15kb. use it
to show 1st fit-allocation 2nd show the best fit allocation.
Let's consider a job, Job 1, with a total size of 15 KB, and we
have a memory system with 10 partitions, each with an initial
size of 5 KB, increasing by 6 KB for each subsequent partition
up to the 10th one. We can use this information to
demonstrate both the First Fit and Best Fit allocation
algorithms. Here's how the memory allocation may look like:
Memory Partition Table:
Partition Initial Size Current Size
(KB) (KB)
1 5 0
2 11 0
3 17 0
4 23 0
5 29 0
6 35 0
7 41 0
8 47 0
5
9 53 0
10 59 0
Job 1: Size = 15 KB
C)
First Fit Allocation:
In the First Fit algorithm, the operating system allocates the
first available partition that is large enough to accommodate
the job.
Job 1 (15 KB) is allocated to Partition 2 (11 KB):
A)
Memory Partition Table:
B)
Best Fit Allocation:
In the Best Fit algorithm, the operating system allocates the
smallest available partition that is large enough to
accommodate the job.
Job 1 (15 KB) is allocated to Partition 3 (17 KB):
6
Memory Partition Table: