Module3 - Fixed Partitions
Module3 - Fixed Partitions
MANAGEMENT
MODULE 3
EARLY SYSTEMS
Fixed Partition (Static) Scheme
Supports multi-programming within the available memory space.
The main memory is divided into blocks of memory known as
partitions. Each job is allocated a partition (one partition for each job).
Each partition is of fixed size and if any job exceed the partition sizes,
then the program cannot be executed.
Performs more steps as compared to Single-user scheme because the
size of the job needs to be less than or equal to the size of the available
partitions to ensure that the job completely fits into partition.
Fixed Partition (Static) Scheme
Advantages:
More flexible because it supports multi-programming allowing several programs
to be in the memory at the same time.
The jobs in other partitions are prevented from overriding the boundaries of the
other jobs.
Each partition is protected by partition intrusion. Once a partition was assigned to
a job, no other job could be allowed to enter its boundaries.
Disadvantages:
Once the system was in operation, the partition sizes remained static. The
system needs to be shutdown to re-configure the sizes of partitions.
If the job size is greater than the size of memory partition, then job cannot be
loaded, thus the execution is not possible.
If the partition sizes are too big, memory is wasted.
As in single-user scheme, the remaining space in each partition is unused. Hence,
internal fragmentation occurs in this scheme.
Requires the entire program be stored contiguously.
Fixed Partition (Static) Scheme
Allocation Placement Algorithms:
First-fit
Best Fit
Worst Fit
Next Fit
Fixed Partition (Static) Scheme
Allocation Placement Algorithms:
Job List:
Job1 40k
Job2 50k
Job3 30k waiting
Job4 20k
Memory Partition Size Job Allocation
FIRST FIT
OS Partition 10k OS
Job1 (40k)
Partition 1 100k 1
Job4 (20k)
Partition 2 25k 3
Partition 3 25k
Job List:
Job1 50k
Memory Partition Size Jobs Allocation
Job2 40k
Job3 20k OS Partition 10k OS OS OS
Job4 20k
Job5 20k Partition 1 60k Job1 (50k) Job5 (20k)
Partition
Memory Jobs Allocation
Size
OS Partition 20k OS OS OS OS OS OS OS OS OS OS
Partition 1 25k
Partition 2 75k
Partition 3 50k
Partition 4 30k
Set 1 Deallocation Set 2 Deallocation Set 3 Deallocation Set 4 Deallocation Set 5 Deallocation
FIRST – FIT Exercise – SOLUTION:
Job List in k-unit Show the allocation and deallocation of partitions for
each set of jobs. For each deallocation, consider freeing
Job 1 40 Job 6 60
the two partitions for the 2 smallest jobs.
Job 2 50 Job 7 10
Job 3 35 Job 8 15
Job 4 20 Job 9 45
Job 5 25 Job 10 30
OS Partition 20k OS OS OS OS OS OS OS OS OS OS
Partition 2 75k Job 1 (40k) Job 1 (40k) Job 1 (40k) Job 1 (40k) Job 1 (40k) Job 3 (35k) Job 6 (60k)
Partition 3 50k Job 2 (50k) Job 2 (50k) Job 2 (50k) Job 2 (50k) Job 2 (50k) Job 2 (50k) Job 2 (50k) Job 9 (45k)
Set 1 Deallocation Set 2 Deallocation Set 3 Deallocation Set 4 Deallocation Set 5 Deallocation
M3: ACT1 FIRST – FIT
Job List in k-unit Show the allocation and deallocation of partitions for
each set of jobs. For each deallocation, consider freeing
Job 1 45 Job 6 50
the two partitions for the 2 smallest jobs. Provide your
Job 2 50 Job 7 15 conclusion.
Job 3 35 Job 8 20
Job 4 20 Job 9 40
Job 5 25 Job 10 30
Partition
Memory Jobs Allocation
Size
OS Partition 20k OS OS OS OS OS OS OS OS OS OS
Partition 1 40k
Partition 2 40k
Partition 3 40k
Partition 4 40k
Set 1 Deallocation Set 2 Deallocation Set 3 Deallocation Set 4 Deallocation Set 5 Deallocation
PL-ACT6: Fixed Partition Scheme (FIRST – FIT)
1. Display the activity title and your name.
2. Input the following: (in M unit)
◦ Memory size
◦ OS size
◦ No. of Partitions
◦ Individual Memory Partition sizes
◦ No. of Jobs
◦ Individual Job sizes
3. Display the job list for n input jobs.
4. Display the memory structure after loading OS, the OS and the partitions with the
corresponding sizes.
5. Allocate and deallocate the memory for jobs in sequence using FIRST – FIT
placement algorithm. Display the memory structure for each set of allocation and
deallocation at a time. Consider an appropriate message/alert, if necessary.
6. Provide your conclusions.