Operating Systems Chapter 8

Fixed length block of main memory
A fixed length block of data that resides in secondary memory. A page of data may temporarily be copied into a frame of main memory
Variable length block of data that resides in secondary memory. An entire segment may temporarily be copied into an available region of main memory (segmentation) or the segment may be divided into page which can be individually copied into main memory.
Memory management is intended to satisfy the following requirements
Local Organization
Physical Organization
Process of assigning load addresses to various parts of a program and adjusting the code and data in the program to reflect the assigned addresses
Address Space Protection
Logical address
Referred toa s virtual address, user level
Physical address
Address seen by the memory unit – system level.
Memory Management Unit
Value in the relocation register is added to every address generated by a user process at the time it is sent to memory
Dynamic Loading
Routing not loaded until it is called. Unused routine never loaded. Useful when large amounts of code are needed to handle infrequently occurring cases.
Sharing the system library
Advantageous to allow each process access to the same copy of the program rather than have their own separate copy. Memory management must allow controlled access to shared areas of memory without compromising protection
Dynamic linking
Linking postponed until excution time.
Small piece of code used to locate the appropriate memory resident library routing. Replaces itself with the address os the routine and executes the routine.
page fault
a hardware interrupt that occurs when an attempt is made to access a non-resident address; the process that made the attempt is interrupted and the OS brings the needed page into memory
dirty bit
created when you open and modify a file in Windows When all the files have been saved, the dirty bit is cleared.
difference between segmentation and paging
Pages are a fixed size and segments are a flexible size. Segments
corrspond to some logical unit and page is basically chopped up.
Memory management scheme that supports user view of memory. Program is a collection of segments. Segment is a logical unit such as main, procedure, method, func, etc.
page replacement algorithm
frame table
Data structure containing the reverse mapping. Given a frame number, it returns the process which it belongs to.
reference table
Processw can be swapped temporarily out of memory to a backing store and then brought back into memory for continued execution
Backing store
Fast disk large enoug t oaccomodate copies of all memory images for all users
Roll out, rolll in
swapping variant used for priority based scheduling algorithms; lower-priority process is swapped out so higher priority process can be loaded and executed
Contiguous allocation
a classical memory allocation model that assigns a process consecutive memory blocks
External Fragementation
Total memory space exists to satisfy a request but is not contigous. Solution: use compaction, use paging to divide space into multiple small fixed size pages then allocate
Internal fragementation
Allocated memory may be slightly larger than requested memory, this size difference is memory internal to a partition but not being used.
Fixed partitioning
Operating system can swap out a process if all partitions are full and no process is in the ready or running state. Causes internal fragementation
Dynamic partitioning
Partitions are of variable length and number.
Block of available different size memory scattered throughout memory.
First fit
Allocate to first hole that is big enough
Best fit
Allocate the smallest hole that is big enough
Worst fit
Allocate largest hole, must search entire list
The process of swapping data or instructions that have been placed in the swap file for later use back into active random access memory (RAM). The contents of the hard drive’s swap file then become less active data or instructions.
Page number
used as an index into a page table which contains base address of each page in physical memory
page offset
combined with base address to define the physical memory address that is sent to the memory unit
Page table implementation
Page table small – fast registers
large – kept in main memory
Page-table base register
points to page table
Page table length register
indicates size of page table
a fast associate memory needed to reduce the overhead of two memory access problem
Hierachal paging
Muli-layer of paging to reduce overhead of keeping all page tables in large address space computers such as 32 bit and 64 bit processors. Only relevant page tables are brought into ram.
Hashed page tables
Used for machines having larger than 32 bit addressing
Use hashing rather than multiple paging that has overhead of multiple memory accesses
Effective access time
EAT = 2 + time unit – hit ratio