Operating System Concepts: Address Space and Binding
34 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

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.

process

User programs usually go through several ______ before being run.

steps

At compile time, if memory location known a priori, _______ code can be generated.

<p>absolute</p> Signup and view all the answers

Source code addresses are usually ______ like count.

<p>symbolic</p> Signup and view all the answers

Compiled code addresses bind to ______ addresses.

<p>relocatable</p> Signup and view all the answers

If memory location is not known at compile time, compiler must generate _______ code.

<p>relocatable</p> Signup and view all the answers

If the process can be moved during its execution from one memory segment to another, binding delayed until _______ time.

<p>run</p> Signup and view all the answers

The address space of the computer starts at ______.

<p>00000</p> Signup and view all the answers

Special _______ support is needed for address maps.

<p>hardware</p> Signup and view all the answers

Binding of instructions and data to memory addresses can happen at _______ different stages.

<p>three</p> Signup and view all the answers

Address binding of instructions and data to memory addresses can happen at compile time, load time, or _______ time.

<p>execution</p> Signup and view all the answers

The best-fit method allocates the smallest ______ that is big enough.

<p>hole</p> Signup and view all the answers

First-fit and best-fit are better than worst-fit in terms of ______ and storage utilization.

<p>speed</p> Signup and view all the answers

External fragmentation occurs when total memory space exists to satisfy a request, but it is not ______.

<p>contiguous</p> Signup and view all the answers

Internal fragmentation occurs when allocated memory may be slightly larger than requested memory, resulting in ______ internal to a partition.

<p>memory</p> Signup and view all the answers

Compaction involves shuffling memory contents to place all free memory together in one large ______.

<p>block</p> Signup and view all the answers

Paging is a memory management scheme that allows physical memory space of a process to be non ______.

<p>contiguous</p> Signup and view all the answers

Logical address 0 is page 0, offset 0→ indexing into the page table we get page 0 is in frame ______.

<p>5</p> Signup and view all the answers

Logical address 0 maps to physical address ______ = [(5*4) +0].

<p>20</p> Signup and view all the answers

Page size = ______ bytes.

<p>2,048</p> Signup and view all the answers

Internal fragmentation of 2,048 - 1,086 = ______ bytes.

<p>962</p> Signup and view all the answers

On average fragmentation = ______ / 2 frame size.

<p>1</p> Signup and view all the answers

Since the operating system is managing physical ______, it has to maintain allocation details.

<p>memory</p> Signup and view all the answers

Assume __________ Hit ratio.

<p>80%</p> Signup and view all the answers

If it takes 20 nSec to search the __________ and 100 nSec to access memory,

<p>TLB</p> Signup and view all the answers

A mapped memory access takes 120 nSec when the page number is in the __________.

<p>TLB</p> Signup and view all the answers

The Effective Memory Access Time = 0.80120 + 0.20220 = 140 nSec due to a __________ of 40% slow down.

<p>memory</p> Signup and view all the answers

One copy of read-only (reentrant) code shared among processes is called __________ pages.

<p>shared</p> Signup and view all the answers

A segment is a logical unit such as main program, procedure, function, method, object, local variables, global variables, common block, stack, symbol table, and __________.

<p>arrays</p> Signup and view all the answers

Logical address consists of a two tuple: segment number, __________.

<p>offset</p> Signup and view all the answers

With each entry in segment table, associate a validation bit, which is 0 for an __________ segment.

<p>illegal</p> Signup and view all the answers

Memory allocation is a __________ storage-allocation problem due to varying segment lengths.

<p>dynamic</p> Signup and view all the answers

The capability of operating systems that enables programs to address more memory locations than are actually provided in main memory is called __________ memory.

<p>virtual</p> Signup and view all the answers

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.

Quiz Team

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.

More Like This

Use Quizgecko on...
Browser
Browser