Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Memory Management in Operating Systems, Study notes of Operating Systems

The concept of memory management in operating systems. It describes the division of main memory into two parts, logical and physical address space, and the role of the Memory Management Unit (MMU) in handling memory and caching operations. The document also explains the task of sub-division of user space into partitions and the use of relocation registers. an example to illustrate the concept of logical and physical address space.

Typology: Study notes

2016/2017

Available from 03/10/2023

subhrajit-chakraborty
subhrajit-chakraborty 🇮🇳

5 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Memory Management
In a mono programming or uni programming system, the main memory is divided into two parts,
one part for operating system and another part for job which is currently executing. Consider the
following figure bellow.
Partition-1
Partition-2
Wasted of memory
Partition-1 is allowed for Operating system and partition-2 is allowed for user process. But some
part of partition 2 wasted, it is indicated by black color.
In multiprogramming environment the user space is divide into number of partitions. Each
partitions is for one process.
The task of sub division is carried out dynamically by the operating system, this task is known as
“Memory Management”.
Memory Management Unit (MMU): It is hardware component that handles all memory and
caching operation associated with the processor. So MMU is responsible for all over activity of
memory management.
Operating system
User process
pf3
pf4
pf5

Partial preview of the text

Download Memory Management in Operating Systems and more Study notes Operating Systems in PDF only on Docsity!

Memory Management

In a mono programming or uni programming system, the main memory is divided into two parts, one part for operating system and another part for job which is currently executing. Consider the following figure bellow.

Partition-

Partition-

Wasted of memory

Partition-1 is allowed for Operating system and partition-2 is allowed for user process. But some part of partition 2 wasted, it is indicated by black color.

In multiprogramming environment the user space is divide into number of partitions. Each partitions is for one process.

The task of sub division is carried out dynamically by the operating system, this task is known as “Memory Management”.

Memory Management Unit (MMU): It is hardware component that handles all memory and caching operation associated with the processor. So MMU is responsible for all over activity of memory management.

Operating system

User process

Logical Address Space and Physical Address Space:

An address generated by CPU is called logical address, where as an address generated by MMU is called Physical address.

For an example J1 is a program, written by user, the size of program is 100KB. But program loaded in main memory from 2100 to 2200 KB. This actual loaded address in main memory is called physical address.

The set of all logical address are generated by a program is referred as a “Logical address space”.

The set of physical address corresponding these logical address referred to as a “Physical address space”.

CPU

In our example from 0 to 100KB is the logical address space and from 2100 to 2200KB is the physical address space.

So, Physical address space = Logical address space + Contents of relocation register/ Base value

2200= 100 + 2100

The run time mapping from logical to physical address is done by the memory management unit (MMU). The relocation register is also known as base register. The value of relocation register is added to every address generated by a user process at the time it is sent to the memory.

Relocation Register

J

2100

0

2100

2200

5000

L 100

utilization is extremely inefficient. Any program, no matter how small, occupies an entire partition. This phenomenon, in which there is wasted space internal to a partition due to the

fact that the block of data loaded is smaller than the partition, is referred to as internal fragmentation. Two possibilities:

a). Equal size partitioning

b). Unequal size Partition

Unequal size partitioning is not suitable for systems in which process memory requirements

not known ahead of time; i.e. timesharing systems.

When the queue for a large partition is empty but the queue for a small partition is full, as is the case for partitions 1 and 3. Here small jobs have to wait to get into memory, even though plenty of memory is free An alternative organization is to maintain a single queue as in above Fig. (b).

Whenever a partition becomes free, the job closest to the front of the queue that fits in it could be loaded into the empty partition and run.