1/10
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Why does primary memory need careful management?
Primary memory is a limited resource
Benefits of Memory Management
Efficient allocation of memory enables multitasking, and maintains security, as it does not let programs access memory reserved for other programs
3 techniques for memory management
Paging, Segmentation, Virtual Memory
What is paging?
A method of chunking the primary memory into equal sized blocks, leading to smooth running of applications.
How does paging work?
When an application is launched, data moves from the hard disk into pages for easier access. As users move between applications, memory is dynamically allocated, where pages will be taken away from applications not in use and granted to applications that are in active use.
Disadvantage effect of paging
internal fragmentation - more pockets of unused space will exist across memory. not all the space in a page may be used, which is wasteful, as other unrelated data can not be stored in this page.
What is segmentation?
Chunking memory into blocks that correspond to different types of data. E.g. a video file may have a segment for video data, audio data and special effects. Segments are not all the same size, as their size depends on their allocated data.
Advantage of segmentation
Segmentation is space efficient as they only allocate space depending on the amount an application needs.
Disadvantage of Segmentation
external fragmentation occurs as segments fill up memory, and physical gaps reduce the size of new segments that can be allocated. This means that the arrangement of data becomes more fragmented over time because blocks are taken away and you can not guarantee a block of the same size will fill that space.
What is virtual memory?
Operating system can offload data from primary storage into virtual memory (where secondary storage is used as if it is primary storage). This creates an illusion of a larger memory, enabling multitasking.
Disadvantage of virtual memory.
Accessing data in virtual memory is considerably slower than accessing it in RAM. Over-reliance on virtual memory can lead to performance issues.