Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kareemmoneeam/operatingsystem-memorymanagment
A memory allocation simulator to allocate variable-sized partitions of the memory to a given sequence of processes requests.
https://github.com/kareemmoneeam/operatingsystem-memorymanagment
Last synced: 3 days ago
JSON representation
A memory allocation simulator to allocate variable-sized partitions of the memory to a given sequence of processes requests.
- Host: GitHub
- URL: https://github.com/kareemmoneeam/operatingsystem-memorymanagment
- Owner: KareemMoneeam
- Created: 2023-10-07T14:39:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-07T14:45:11.000Z (about 1 year ago)
- Last Synced: 2023-10-07T15:35:07.756Z (about 1 year ago)
- Language: Java
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OperatingSystem-MemoryManagment
## A memory allocation simulator to allocate variable-sized partitions of the memory to a given sequence of processes requests.Memory is divided into partitions; these partitions can either be fixedsized or variable-sized. In case of fixed-sized partitions, each partition
may contain exactly one process. Thus, the degree of multiprogramming is bound by the number of partitions.
In case of variable-sized partitions, the operating systems keeps a table indicating which parts of memory are available (called holes)
and which are occupied along with their sizes. It then allocates space and loads a process in memory according one of the following
### Policies:- First fit: in which the first hole that is large enough to fit the process is allocated (fastest method).
- Best fit: in which the smallest hole that is large enough to fit the process is allocated (has the best memory-space utilization).
- Worst fit: in which the largest hole is allocated (has the lowest memory-space utilization).It is rare to have a perfect fit for a process, so memory allocation usually causes fragmentation. Fragmentation is either external or internal. Internal fragmentation occurs when the memory allocated to
a process is slightly larger than the requested memory while external fragmentation occurs when there is enough total memory space to satisfy a process request but the available spaces are not contiguous.#### Solutions to external fragmentation:
1. Shuffle the memory contents so as to place all free memory together in one large block. This is called compaction. (used method)
2. Allow the logical address space of the processes to be noncontiguous, thus allowing a process to be allocated physical
memory wherever such memory is available. This solution can be achieved through segmentation or paging.