Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 10 Storage management

Similar presentations


Presentation on theme: "Chapter 10 Storage management"— Presentation transcript:

1 Chapter 10 Storage management
Elements requiring storage Programmer and system controlled storage Static Storage Management Heap Storage Management

2 Elements requiring storage
Code segments for translated user programs System run-time programs - e.g. libraries User defined data structures and constants Subprogram return points Referencing environments

3 Elements requiring storage
Temporaries in expression evaluation Temporaries in parameter transmission Input-Output buffers Miscellaneous system data - tables etc

4 Operations that require storage allocation
Subprogram call and return operations - creation and deletion of activation records Explicit data structure creation and destruction operations Component insertion and deletion operations

5 Programmer and system controlled storage
Pros and cons: Programmer knows when to allocate / free storage. Programmer may interfere with the system-controlled storage management Storage-Management Phases Initial allocation Recovery Compaction and reuse

6 Static Storage Management
Static allocation : allocation during translation that remains fixed throughout execution. Does not allow recursive subprograms

7 Dynamic Allocation: Heap Storage Management
Memory used for dynamic allocation of data objects in somewhat unstructured manner is called heap storage. OS HEAP STACK

8 Heap Storage Management
Tasks: allocation, recovery, dangling references garbage collection compaction, reuse Fixed size elements Variable size elements

9 Heap Compaction used used used used used used used

10 Heap Compaction used used used used used used used


Download ppt "Chapter 10 Storage management"

Similar presentations


Ads by Google