Midterm 26-50 Flashcards
What are the primary and secondary memory layers?
Primary/volatile:
- registers
- cache (SRAM)
- main (DRAM)
Secondary/non-volatile:
- solid-state disk (flash)
- magnetic disk (electro-mechanical)
- optical disk (DVD blue-ray)
What are the four categories of memories in terms of “access-type”?
RAM, SAM, DASD, CAM
Look these up beyond this simple answer!
What is the inclusion principle in the context of the memory hierarchy?
Content of layer 𝑖 of the hierarchy has to exist in layer 𝑖 + 1.
What are the four policies or questions in the management of a memory hierarchy?
1- placement policy
2- identification policy
3- replacement policy
4- update policy
What is “mapping” in the context of memory management?
Conversion of virtual addresses to physical addresses is called mapping.
What is address binding?
As a general definition, binding means mapping from one address space to another. Traditionally, binding is categorized into three groups: compile-time-binding, load-time-binding, and execution-time-binding.
Explain why load-time binding is not “dynamically relocatable” and why execution-time binding is dynamically relocatable.
Load time binding: The compiler translates symbolic addresses to relative (relocatable) addresses. The loader translates these to absolute addresses. If it is not known at compile time where the process will reside in memory, then the compiler must generate relocatable code. This is done once, and swapping cannot be performed, which makes the method static.
Execution time binding: If the process can be moved during its execution from one memory segment to another, then binding must be delayed until run time. The absolute addresses are generated by hardware. Most general- purpose OSs use this method (Dynamic).
Static-binding means locations are determined before execution. Dynamic- binding means locations are determined during execution.
What are “logical” and “physical” addresses?
Logical address are addresses generated by a program and sent to the CPU; also referred to as virtual address.
Physical addresses are addresses seen by the memory unit assigned to a program depending on where the program resides in the main memory.
What is the job of the memory management unit (MMU)?
The run-time mapping from virtual to physical addresses is performed by hardware called the memory-management unit (MMU).
What is dynamic relocation?
Dynamic relocation is the process of relocating data or code currently in the computer memory to other parts of the computer, creating more efficient memory storage while a program is still active.
What are the minimum hardware requirements of an MMU for a dynamic relocation?
A relocation register.
Which type of program benefits most from dynamic relocation?
In some programs, a significant portion of the code is used for rare cases, and only a small piece of the code is frequently used. For such applications, dynamic relocation can be used efficiently. Such applications are known as 20-80, which means that 20% of the code is used 80% of the time.
What is a stub?
Stub is used for dynamic linking where linking is postponed until execution time. A stub is a small piece of code used to locate the appropriate memory-resident library routine. Stub replaces itself with the address of the library routine and executes the routine.
What is the “Contiguous allocation” of memory?
Contiguous allocation means the allocation of a contiguous region of the main memory to a program.
Why is segmentation considered as “Contiguous” and paging is considered as “non-Contiguous”?
Segmentation allocates one piece of memory, called a segment, to one program. In paging, different parts of the memory, called pages, could contain a part of a program. These pages could be non- contiguous.