Module 9 Vocab Flashcards
(35 cards)
Memory management
the technique for mapping virtual address spaces to physical memory
Physical Memory
memory that is directly accessible to the CPU; operates at high speed, but typically offers lower capacity than storage
This is your RAM, limited size but free access to the CPU. Very Fast
Disk
a storage device that uses a magnetic storage mechanism. Not all data fits into physical memory, so the disk holds data until it is pulled into physical memory
Hard-drive or SSD
Fixed Partition Scheme
a strategy for translating virtual to physical addresses in which we divide the memory into partitions such that one process is loaded per partition and queue processes that are waiting to be loaded into memory. Uses a fixed offset to convert between physical and virtual addresses
Base and limit registers
a strategy for translating virtual to physical addresses in which the base register contains the value that gets added to the virtual address to determine the physical address, and the limit register contains the highest address that the program cannot surpass. Requires hardware support to implement
Bitmaps
in tracking free space in memory, a bitmap is a vector in which each digit is 1 or 0 depending on whether a given memory chunk is free or not
Linked Lists
in tracking free space in memory, the elements of the linked list represent blocks of memory that are free
Worst fit
a memory allocation scheme that finds the largest block of free memory possible and stores the process in it
First Fit
a memory allocation scheme that puts the process in the first discovered hole of free memory that is large enough to fit the process
Best Fit
a memory allocation scheme that finds the smallest hole which is large enough to fit the process and stores the process in it
External Fragmentation
space that the OS is aware of, but that is too small to fit new processes
Internal Fragmentation
internal to an allocated space, internal fragmentation is where a process is allocated more bytes than it uses
Page
a continuous portion of memory that is treated by the operating system as a single unit of storage
Slab Allocation
break large chunks of memory given to a process by the Buddy algorithm into smaller units for allocation
Object Caches
freed objects are stored in a cache in case they are allocated again, rather than freeing them for allocation to other processes
Virtual Memory
Abstraction provided by the OS
- Each process has its own large private address space
- An illusion created by the OS that gives each program its own large, private memory space, even if physical RAM is limited.
Whats the connection between virtual and physical memory?
Virtual addresses used by programs are mapped to physical addresses in RAM by the OS using a page table.
What happens if there’s not enough physical memory (RAM) to hold everything?
The OS moves some data to the disk’s swap space, freeing up RAM for active tasks. This is called paging or swapping.
What is a partition?
A block of memory
What is the goal of memory allocation?
A: To make sure each running program (process) gets enough memory to function properly.
What is the naive way of allocating memory?
Divide memory into fixed partitions at startup, one program per partition.
Ex. Like assigning fixed-size desks to students regardless of their needs.
What are the pros and cons of naive memory allocation?
Pros: Easy to set up, minimal hardware needed. Cons: Inflexible, inefficient, you must know the program size in advance.
What is the base register used for?
It holds the starting address of a process in memory.
What is the limit register used for?
It sets the maximum allowed memory size for a process; if the process tries to access more, an error is triggered.