Professional Documents
Culture Documents
Memory management
(Basics)
1
Goals of an OS
● Maximize memory utilization
● Improve protection between applications
● Maximize CPU utilization
● Minimize response time
● Prioritize “important” processes
● Note: Conflicting goals/tradeoffs
● E.g. running many processes will increases CPU
utilization but would reduce system response
time.
Process
● Unit of protection
● One or more threads of execution
● Resources required for execution
● Memory (RAM)
● Program code (“text”)
● Data (initialized, uninitialized, stack)
● Buffers held in the kernel on behalf of the process
Example:
protection
● Try the code in LMS
Disk
Frames
Page sizes
● What should be the best page size?
● Things to remember
○ We map/unmap share in units of pages
○ If the TLB can cover lots of memory that would
be fast
○ Difficult to build large TLBs
Changing page size
● Increasing page size
○ Better TLB coverage
○ Internal fragmentation increase
○ Increase page fault latency