Podcast
Questions and Answers
A pair of ______ and limit registers define the logical address space.
A pair of ______ and limit registers define the logical address space.
base
An input queue is a collection of ______ on the disk that are waiting to be brought into memory.
An input queue is a collection of ______ on the disk that are waiting to be brought into memory.
process
User programs usually go through several ______ before being run.
User programs usually go through several ______ before being run.
steps
At compile time, if memory location known a priori, _______ code can be generated.
At compile time, if memory location known a priori, _______ code can be generated.
Source code addresses are usually ______ like count.
Source code addresses are usually ______ like count.
Compiled code addresses bind to ______ addresses.
Compiled code addresses bind to ______ addresses.
If memory location is not known at compile time, compiler must generate _______ code.
If memory location is not known at compile time, compiler must generate _______ code.
If the process can be moved during its execution from one memory segment to another, binding delayed until _______ time.
If the process can be moved during its execution from one memory segment to another, binding delayed until _______ time.
The address space of the computer starts at ______.
The address space of the computer starts at ______.
Special _______ support is needed for address maps.
Special _______ support is needed for address maps.
Binding of instructions and data to memory addresses can happen at _______ different stages.
Binding of instructions and data to memory addresses can happen at _______ different stages.
Address binding of instructions and data to memory addresses can happen at compile time, load time, or _______ time.
Address binding of instructions and data to memory addresses can happen at compile time, load time, or _______ time.
The best-fit method allocates the smallest ______ that is big enough.
The best-fit method allocates the smallest ______ that is big enough.
First-fit and best-fit are better than worst-fit in terms of ______ and storage utilization.
First-fit and best-fit are better than worst-fit in terms of ______ and storage utilization.
External fragmentation occurs when total memory space exists to satisfy a request, but it is not ______.
External fragmentation occurs when total memory space exists to satisfy a request, but it is not ______.
Internal fragmentation occurs when allocated memory may be slightly larger than requested memory, resulting in ______ internal to a partition.
Internal fragmentation occurs when allocated memory may be slightly larger than requested memory, resulting in ______ internal to a partition.
Compaction involves shuffling memory contents to place all free memory together in one large ______.
Compaction involves shuffling memory contents to place all free memory together in one large ______.
Paging is a memory management scheme that allows physical memory space of a process to be non ______.
Paging is a memory management scheme that allows physical memory space of a process to be non ______.
Logical address 0 is page 0, offset 0→ indexing into the page table we get page 0 is in frame ______.
Logical address 0 is page 0, offset 0→ indexing into the page table we get page 0 is in frame ______.
Logical address 0 maps to physical address ______ = [(5*4) +0].
Logical address 0 maps to physical address ______ = [(5*4) +0].
Page size = ______ bytes.
Page size = ______ bytes.
Internal fragmentation of 2,048 - 1,086 = ______ bytes.
Internal fragmentation of 2,048 - 1,086 = ______ bytes.
On average fragmentation = ______ / 2 frame size.
On average fragmentation = ______ / 2 frame size.
Since the operating system is managing physical ______, it has to maintain allocation details.
Since the operating system is managing physical ______, it has to maintain allocation details.
Assume __________ Hit ratio.
Assume __________ Hit ratio.
If it takes 20 nSec to search the __________ and 100 nSec to access memory,
If it takes 20 nSec to search the __________ and 100 nSec to access memory,
A mapped memory access takes 120 nSec when the page number is in the __________.
A mapped memory access takes 120 nSec when the page number is in the __________.
The Effective Memory Access Time = 0.80120 + 0.20220 = 140 nSec due to a __________ of 40% slow down.
The Effective Memory Access Time = 0.80120 + 0.20220 = 140 nSec due to a __________ of 40% slow down.
One copy of read-only (reentrant) code shared among processes is called __________ pages.
One copy of read-only (reentrant) code shared among processes is called __________ pages.
A segment is a logical unit such as main program, procedure, function, method, object, local variables, global variables, common block, stack, symbol table, and __________.
A segment is a logical unit such as main program, procedure, function, method, object, local variables, global variables, common block, stack, symbol table, and __________.
Logical address consists of a two tuple: segment number, __________.
Logical address consists of a two tuple: segment number, __________.
With each entry in segment table, associate a validation bit, which is 0 for an __________ segment.
With each entry in segment table, associate a validation bit, which is 0 for an __________ segment.
Memory allocation is a __________ storage-allocation problem due to varying segment lengths.
Memory allocation is a __________ storage-allocation problem due to varying segment lengths.
The capability of operating systems that enables programs to address more memory locations than are actually provided in main memory is called __________ memory.
The capability of operating systems that enables programs to address more memory locations than are actually provided in main memory is called __________ memory.
Study Notes
Base and Limit Registers
- A pair of base and limit registers define the logical address space.
- The base register holds the smallest legal physical address, and the limit register holds the largest legal physical address.
Hardware Address Protection with Base and Limit Registers
- The base and limit registers are used to protect the address space from unauthorized access.
- The base register ensures that the program cannot access memory locations below the base address, and the limit register ensures that the program cannot access memory locations above the limit address.
Address Binding
- Address binding is the process of translating logical addresses to physical addresses.
- Address binding can occur at three stages: compile time, load time, and execution time.
- Compile-time binding is used when the memory location is known a priori.
- Load-time binding is used when the memory location is not known at compile time.
- Execution-time binding is used when the process can be moved during its execution from one memory segment to another.
Multistep Processing of a User Program
- The processing of a user program involves several stages, including compilation, loading, and execution.
- The compiler translates the source code into object code, and the linker resolves external references.
- The loader loads the object code into memory, and the operating system manages the memory allocation.
Logical vs. Physical Address Space
- The logical address space is the range of addresses that a program can generate.
- The physical address space is the range of addresses that are physically available in the computer.
- The physical address space is usually smaller than the logical address space.
Memory Allocation
- Memory allocation involves assigning physical memory to a process.
- The first-fit algorithm assigns the first available block of memory that is large enough to satisfy the request.
- The best-fit algorithm assigns the smallest available block of memory that is large enough to satisfy the request.
- The worst-fit algorithm assigns the largest available block of memory that is large enough to satisfy the request.
Fragmentation
- Fragmentation occurs when free memory is broken into small, non-contiguous blocks, making it difficult to allocate large blocks of memory.
- External fragmentation occurs when free memory is scattered throughout the memory space.
- Internal fragmentation occurs when allocated memory is larger than the requested memory, leaving unused space.
Paging
- Paging is a memory management scheme that divides physical memory into fixed-size blocks called pages.
- The logical address space is divided into fixed-size blocks called pages, and each page is mapped to a frame in physical memory.
- The page table maps logical page numbers to physical frame numbers.
Paging (Cont.)
- Calculating internal fragmentation: the page size, process size, and internal fragmentation can be calculated.
- The worst-case fragmentation is one frame minus one byte, and the average fragmentation is half a frame size.
Free Frames
- The operating system maintains a list of free frames, which are frames that are not allocated to any process.
- The operating system uses a frame allocation algorithm to allocate free frames to processes.
Shared Pages
- Shared pages allow multiple processes to share the same page of memory.
- Shared code, such as read-only reentrant code, can be shared among processes.
Segmentation
- Segmentation is a memory-management scheme that supports the user's view of memory.
- A program is divided into logical segments, such as main program, procedure, function, method, object, local variables, global variables, and common block.
Segmentation Architecture
- The logical address consists of a two-tuple: .
- The segment table maps the two-dimensional physical addresses, and each table entry has a base and limit.
- The segment-table base register points to the segment table's location in memory.
Segmentation Architecture (Cont.)
- Protection is achieved through validation bits and protection bits associated with segments.
- Code sharing occurs at the segment level, and memory allocation is a dynamic storage-allocation problem.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge on operating system concepts, including base and limit registers, hardware address protection, and address binding. Learn about logical address spaces and program execution in memory.