Chapter 7 Expected knowledge

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/14

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

Memory management is essential to

optimize system performance, resource allocation, and protection.

2
New cards

Principal Requirements for Memory Management

  • Efficient Allocation and Deallocation: Allocating memory to processes in a way that maximizes space usage and minimizes fragmentation. Deallocating memory promptly when processes are terminated.

  • Protection: Ensuring each process has access only to its assigned memory space, safeguarding against accidental or intentional interference.

  • Relocation: Allowing programs to be moved in memory during execution without disrupting their functionality, enhancing flexibility and efficiency in resource usage.

  • Sharing: Enabling processes to share memory safely and efficiently, allowing data or code to be shared across applications or users.

  • Logical and Physical Organization: Structuring memory logically (for simplicity and modularity) and physically (to optimize space allocation and speed).

3
New cards

Memory Partitioning: Purpose and Techniques

divides memory into sections to efficiently allocate space to multiple processes. It serves to:

  • Prevent processes from overlapping in memory.

  • Allow better control over memory allocation.

Techinques:

  • Fixed Partitioning

  • Dynamic Partitioning

  • Buddy Systems

4
New cards

Fixed partitioning

Divides memory into fixed-size partitions. Processes are allocated to partitions based on size, though this can lead to internal fragmentation if a process doesn’t fully use its assigned space.

5
New cards

Dynamic Partitioning

Allocates memory based on the exact size needed by a process. This minimizes internal fragmentation but can cause external fragmentation as free memory becomes scattered.

6
New cards

Buddy System

Combines aspects of both fixed and dynamic partitioning by using power-of-two sized partitions that can be split or merged as needed. This helps manage fragmentation and allows flexible partition sizes.

7
New cards

Concept of Paging

memory management technique where both logical memory and physical memory are divided into fixed-size blocks. Logical memory is divided into pages, while physical memory is divided into frames. A page table maps each page to a corresponding frame in physical memory, allowing a program to load and execute across non-contiguous frames.

8
New cards

Advantages of paging

  • Simplifies memory allocation and management.

  • Reduces external fragmentation since fixed-size pages and frames fit well together.

  • Allows processes to grow or shrink in memory more flexibly.

9
New cards

segmentation

a memory management approach that divides a program’s memory into logical segments such as code, data, and stack. Unlike paging, these vary in size, and each has a unique base and limit address. This organization aligns with the program’s logical structure and allows for modular growth.

10
New cards

Advantages of segmentation

  • Improves protection and sharing, as segments can be individually managed.

  • Aligns well with the way programs are structured, providing a more intuitive way to manage memory for complex applications

11
New cards

Paging vs. Segmentation: Relative Advantages

  • Paging:

    • Eliminates external fragmentation by using fixed-size pages and frames.

    • Simplifies memory management since each page is of a fixed size.

  • Segmentation:

    • Provides a more logical structure that reflects the program's design, allowing greater flexibility in addressing code and data separately.

    • Offers improved protection, as segments can be independently protected or shared.

In practice, segmentation and paging can be combined in systems to leverage the benefits of both approaches.

12
New cards

Loading

The process of transferring a program from storage into memory for execution.

13
New cards

Loading can be:

  • Absolute: Places a program at a fixed memory address.

  • Relocatable: Allows a program to be loaded at various locations by adjusting memory references.

  • Dynamic: Only loads necessary parts of the program into memory as needed, optimizing space.

14
New cards

linking

Combines multiple object modules (compiled code) into a single executable file, resolving references and addresses between modules.

15
New cards

Linking can be

  • Static: Occurs at compile-time or load-time, where all modules are combined before execution.

  • Dynamic: Occurs at runtime, allowing shared libraries to be loaded into memory when needed, saving memory and enabling library updates without recompiling programs.