Compare process management and memory management.
Answers
Answered by
4
PROCESS MANAGEMENT:
Processes management access memory through virtual addresses
I Simulates a large interval of memory addresses
I Simplifies memory management
I Automatic translation to physical addresses by the CPU (MMU/TLB circuits)
Paging mechanism
I Provide a protection mechanism for memory regions, called pages
I Fixed 2
n
page size(s), e.g., 4kB and 2MB on x86
I The kernel implements a mapping of physical pages to virtual ones
I Different for every process
Key mechanism to ensure logical separation of processes
I Hides kernel and other processes’ memory
I Expressive and efficient address-space protection and separation.
MEMORY MANAGEMENT:
Motivation: high-performance memory allocation
I Demand-paging: delay the allocation of a memory page and its mapping to
the process’s virtual address space until the process accesses an address in the
range associated with this page
I Allows overcommitting: more economical than eager allocation (like
overbooking in public transportation)
Motivation: high-performance process creation
I Copy-on-write: when cloning a process, do not replicate its memory, but mark
its pages as “need to be copied on the next write access”
I Critical for UNIX
I Cloning is the only way to create a new process
I Child processes are often short-lived: they are quickly overlapped by the
execution of another program .
HOPE IT HELPS★★★★
Processes management access memory through virtual addresses
I Simulates a large interval of memory addresses
I Simplifies memory management
I Automatic translation to physical addresses by the CPU (MMU/TLB circuits)
Paging mechanism
I Provide a protection mechanism for memory regions, called pages
I Fixed 2
n
page size(s), e.g., 4kB and 2MB on x86
I The kernel implements a mapping of physical pages to virtual ones
I Different for every process
Key mechanism to ensure logical separation of processes
I Hides kernel and other processes’ memory
I Expressive and efficient address-space protection and separation.
MEMORY MANAGEMENT:
Motivation: high-performance memory allocation
I Demand-paging: delay the allocation of a memory page and its mapping to
the process’s virtual address space until the process accesses an address in the
range associated with this page
I Allows overcommitting: more economical than eager allocation (like
overbooking in public transportation)
Motivation: high-performance process creation
I Copy-on-write: when cloning a process, do not replicate its memory, but mark
its pages as “need to be copied on the next write access”
I Critical for UNIX
I Cloning is the only way to create a new process
I Child processes are often short-lived: they are quickly overlapped by the
execution of another program .
HOPE IT HELPS★★★★
Similar questions