Home
Flashcards
Preview
OS - Chapters 7-8
Home
Get App
Take Quiz
Create
Types of address binding
Static - Binding before execution
Dynamic - Binding at runtime
How is an address dynamically bound
Processor generates a logical address
Logical address is passed through an
address map
Physical address can reference main memory
What does the relocation register contain?
The starting memory (
physical
) address of the current program
Two methods of logical to physical address translation
Address map
Reloaction register addittion
Memory partitioning schemes
Fixed
Variable
Characteristics of fixed partitioning schemes
Main memory is divided into physical partitions
Partitioning happens at OS initialization
Partitions might have different sizes
Characteristics of dynamic partitioning schemes
OS assigns exact amount of space requested
Partitions variable by length and number
If the holes in memory are not adjacent, how to combine them to get a large memory block? List two approaches.
Linked list implementation
Bitmap
- Where each bit represents some portion of the memory and indicates whether it is free or occupied.
How to quickly calculate pa = f*2^([w])? Give two solutions.
Left shift the frame number by W bits, then add W to it
Concatenate F and W into one number
List the placement algorithms when it is time to load or swap a process into memory
First Fit
Next Fit
Best Fit
How does first fit placement work?
Scan from the beginning and choose the first available block that is large enough.
List three replacement algorithms for deciding which page to evict when no no free page frames are available in memory.
FIFO
Least Recently Used (LRU)
Random
Breifly explain the buddy system
Any hole can be divided into two holes. These two holes are called buddies and can be combined together to get a hole of their original size.
What is a page (Virtual Memory)?
A fixed-size portion of virtual memory
What is a frame (virtual memory)?
A fixed-size portion of physical memory
How to pages map to frames?
A page table
Anatomy of a page address
Some bits representing page address (leftmost)
Some bits representing offset (rightmost)
How to calculate maximum size of virtual memory?
2^(total number of bits in address)
What does the page table register hold?
The starting address of the page table of the currently running process
What can a segment contain?
An entire logical component (function, module or stack)
Purpose of segmentation
Allows programmer to view memory as consisting of multiple address spaces or segments
What is the STR, what does it do?
Segment Table Register
Contains starting address of the segment table
Function to convert a page or segment to a physical address
foo(s, w) {
pa = *(PTR + w) + w;
return pa;
}
How does combined segmentation and paging work?
Memory is broken up into segments (programmer discretion)
Segments are broken up into fix-sized pages (same size as frames)
Minimum size of a segment
Page size
Three parameters needed to calculate physical address in combined paged and segmented systems
Segment address
Page (Within segment - as an offset)
Offset (within page)
Relative performance of the three process swapping methods
LRU > FIFO > Random
Author
Ant
ID
359880
Card Set
OS - Chapters 7-8
Description
Updated
2022-11-17T19:52:11Z
Home
Flashcards
Preview