Explain fixed partitioning.
Partitioning are the simpler techniques that don't involve virtual memory. Partitioning has been used in numerous variations in operating systems.
In fixed partitioning the operating system inhabits some fixed portion of main memory is available for use of multiple process. Main memory is separated in to a number of static partitions at system generation time. The simplest method for managing this available memory is to partition it into regions with fixed boundaries. A process may perhaps be loaded into a partition of equal size or unequal size. In equal size partition any process whose size is equal or less than to the partition size can be loaded into any available partition. If all the partitions are full and no process is in the ready or running state the OS is able to swap a process out of any of the partitions and load in other process. There are two complexities with the use of equal-size fixed partition:
1. A program perhaps too long to fit the partition, in such a circumstance the programmer should Design the program with the use of overlays so that only a portion of program required in the Main memory at any one time. When a module is required that is not present, the program should load that module in to the programs partition, overlaying whether data or programs are there.
2. Main memory utilization is wasteful. All through job scheduling, a job is allocated to a memory partition. All steps of job implement in the same partition. Therefore the partition should be large enough to accommodate the largest job step that is internal fragmentation present most of the time.
Both of these programs are able to be lessened, although not solved, by means of using unequal size partition. Consider an instance of fixed partitioning of a 64-megabyte memory.
Operating systems
8M
|
8M
|
8M
|
8M
|
8M
|
8M
|
8M
|
8M
|
(a) Equal size partition
Operating systems
8M
(b) unequal size partition
Programs as large as 16 megabytes are able to be accommodated without overlays. Partitions smaller than 8Mbytes permits smaller program to be accommodate with less internal fragmentation.
With equivalent size partitions the placement of process in memory is trivial. Provided that there is no available partition, process is able to be loaded into that partition. For the reason that all the partitions of same size, it doesn't matter which partition is used. If all partitions are occupied among processes that are ready to run, after that one of these processes must be swapped out to make room for a new process.
With un-equal-size partitions, there are two possible means to assign process to partitions. The simplest method is to assign every process to the smallest partition within which it will fit. In this case, scheduling queue is needed for each partition, to hold swapped out process destined for that partition. The advantage of this approach is that processes are always assigned in such a way as to minimize wasted memory within a partition
When it is time to load a process into main memory, the smallest available partition that will hold the process will select. Every partition may contain exactly one process. Thus a degree of Multiprogramming is bound by number of partitions. If all partitions are occupied, then
Swapping decision must be made. Preference should be given to swapping out of the small partition that will hold the incoming process. It is also possible to consider other factors, such as priority, and a preference for swapping out blocked processes versus ready processes. When the partition is free; a process is selected from the input queue and load into the free partition. When the process terminates, the partition becomes available for other process.
Fixed partitioning scheme are comparatively easy and require minimal operating system software and processing overhead.