1/45
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Memory Management Unit
It is a hardware device that maps virtual/logical to physical address
Memory Management Unit Scheme
The value in relocation register is added to every address generated by the user process at the time it is sent to memory
user program
It always deals with the logical address; it never sees the real physical address.
Fetch strategies, Placement strategies, and Replacement strategies
3 Categories in Memory Management Strategies
Fetch Strategies
Demand or anticipatory
Decides which piece of data to load next
Placement Strategies
Decides where in main memory to place incoming data
Replacement Strategies
Decides which data to remove from the main memory to make more space.
Logical address space
- Generated by the CPU; also referred to as virtual address
- The set of all logical addresses generated by the program.
Physical address space
- Address seen by the memory unit
- The set of all physical addresses generated by the program.
compile time and load time
The logical and physical address are the same in ________________ and _______________ address-binding scheme.
execution time
The logical and physical address are different in ______________________ address-binding scheme.
Contiguous and Non Contiguous Allocation
Ways of organizing program in Memory
Contiguous
- Program must exist as a single block of contiguous address.
- Sometimes it is impossible to find large enough block.
- Low overhead.
Non Contiguous
- Program is divided into chunks called segment.
- Each segment can be placed in different parts of memory.
- Easier to find “holes” in which segment it will fit.
Holes
Empty space
Swapping
A mechanism in which a process can be swapped temporarily out of main memory to secondary memory and later again swaps back to main memory.
Fragmentation
A process are loaded and removed from memory, the free memory space is broken into little pieces.
Fragmentation
The problem in which the memory block remains unused.
External Fragmentation and Internal Fragmentation
2 Types of Fragmentation
External Fragmentation
Total memory space is enough to satisfy a request or reside a process in it, but it is not contiguous, so it cannot be used.
Internal Fragmentation
Memory block assigned to process is bigger. Some portion of memory is left unused, as it cannot be used by another process.
compaction or shuffle
External fragmentation can be reduces by _________________ or _______________ free memory together is one large block.
Internal Fragmentation
It can be reduced by effectively assigning the smallest partition but large enough for the process.
Program
A collection of segments
Segment
A logical unit such as main program, procedure, function, local variable, global variable, common blocks, stacks, symbol table, arrays, and etc.
segment name and segment offset
What are the 2 quantities that the user specifies in each address?
<segment #, offset>
logical address
Segment number and segment offset
2 tables in logical address
Segment table
It maps 2 dimensional physical address which are base and limit
Base
It contains the starting physical address.
Limit
It specifies the length of segment.
Segment Table Base Register (STBR)
It points to the segment table’s location in memory.
Segment-table length register (STLR)
- Indicates number of segments used by program.
- Segment number s is legal if segment < STLR.
Paging
It is a non contiguous allocation
Virtual Memory
- To provide easy to the users
- To increase the CPU utilization
Operating System
Giving illusion to the user such that:
- user can write a very big program
- user thinks that its entire program is present in RAM.
- All the space allocated to the use is contiguous.
small portion, present in the secondary memory
In reality only a __________________ of the user program is in RAM, which may or may not be contiguous while the remaining program is _________________________________________.
Virtual memory
It is the extra memory that a computer can add than the amount physically installed on the system.
Paging
A memory management technique in which process add space is broken into blocks of same size.
power of 2
Size should always be in the ________________.
Frames
Main memory is divided into small fixed blocks (physically) of memory called _______________.
size of frame = size of page
It is to avoid external fragmentation
logical address = page number + page offset
Page address is logical address and represented by ___________________________________________.
physical address = frame number + page offset
Frame address is called physical address and represented by ___________________________________________.
Paging
It reduces external fragmentation but still suffer from internal fragmentation
Paging reduces external fragmentation but still suffer from internal fragmentation, It is simple to implement, Swapping becomes very easy, and It is not suitable for small RAM’s
Paging Advantages and Disadvantages