chapter 10 storage management l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Chapter 10 Storage Management PowerPoint Presentation
Download Presentation
Chapter 10 Storage Management

Loading in 2 Seconds...

play fullscreen
1 / 8

Chapter 10 Storage Management - PowerPoint PPT Presentation


  • 176 Views
  • Uploaded on

Chapter 10 Storage Management. Implementation details beyond programmer’s control Storage/CPU time trade-off Binding times to storage. Storage needed for code . Code User programs Library routines Storage mgt routines Static/automatic/heap allocation

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Chapter 10 Storage Management' - dannon


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
chapter 10 storage management
Chapter 10 Storage Management
  • Implementation details beyond programmer’s control
  • Storage/CPU time trade-off
  • Binding times to storage
storage needed for code
Storage needed for code
  • Code
    • User programs
    • Library routines
    • Storage mgt routines
      • Static/automatic/heap allocation
      • Garbage collection, storage compaction
    • Loaders, interpreters, etc.
storage needed for data objects
Storage needed for data objects
  • programmer variables, constants
  • Temps for expression evaluation, functions return, parameters
  • Other activation record objects
    • Static and/or dynamic reference environment
    • Return point from subprogram call
  • Input/output buffers
  • Garbage collection bits, ptrs
  • Tables for named heap objects (Snobol4’s Central String’s Table)
routines that call for storage mgt
Routines that call for storage mgt
  • Subroutine entry, return
    • Prolog, epilog
  • Heap object/ class object creation, destruction
  • Expression evaluation
  • Parameter passing (specifically if expression is a parameter)
programmer control issues
Programmer control issues
  • Free facility (danger of dangling references) versus garbage collection overhead + delay in knowing when object has lost external path
    • Compare to virtual memory
  • Efficient allocation of storage in blocks (C) rather than according to logical need
    • Reuse of freed storage an issue – compaction problems
static storage management
Static storage management
  • No run-time storage mgt
  • Efficiency of compiler generating location for data object as offset from code section
    • No table or lists needed
  • No overlays of storage
  • Problem – we have a large tax table that we want to hide within a routine that computes taxes
    • Where is it defined?
  • No recursion
stack automatic storage management
Stack (automatic) storage management
  • Efficient storage mgt – stack ptr
  • Recursion is possible
  • Overlays are system controlled
  • Compiler generates location (l-value) as offset from start of activation record
  • Scope rules
  • (Text left this out by error)
heap storage mgt
Heap storage mgt
  • Allocation from free list typically organized as linked list
    • Programmer call or creation of object
  • Deallocation
    • Programmer call or garbage collection
    • Is freed object placed at top of list or ordered by size?
  • Compaction for freed objects of different sizes
    • LISP list components are all the same size
  • Reuse
    • For fixed size elements, free storage is fungible
    • For variable size elements, do we allocate from best fit, first (random) fit