Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

CECS326 Midterm 2 Study Guide Spring 2025 California State University, Long Beach

Beoordeling
-
Verkocht
-
Pagina's
16
Cijfer
A+
Geüpload op
29-05-2025
Geschreven in
2024/2025

CECS326 Midterm 2 Study Guide Spring 2025 California State University, Long Beach/CECS326 Midterm 2 Study Guide Spring 2025 California State University, Long Beach

Instelling
CECS326
Vak
CECS326

Voorbeeld van de inhoud

📘 CHAPTER 3: MEMORY
MANAGEMENT (Outline)

1. 💭 What is Memory Management?
●​ “Programs expand to fill the memory available to hold them” – a play on Parkinson’s
Law.​

●​ Memory is a limited resource. Even though modern computers have much more
memory than earlier ones (e.g., IBM 7094 from 1960s), we still need to manage it
wisely.​




2. ❌ No Memory Abstraction
Early computers did not have memory abstraction. "No memory abstraction" is the
simplest type of abstraction, meaning the operating system doesn’t try to hide or organize
memory in a way that simplifies or protects it for the user. In this setup, memory is
physically divided, no flexibility, protection, or multitasking capabilities.

●​ Without abstraction, memory is divided between:​

○​ Operating system (OS)​

○​ One user program​

●​ Fig 3-1 shows three ways to organize memory:​

○​ Whole memory used by OS and one user process.​

○​ Variable-sized partitions for multiple jobs: more dynamic but has external
fragmentation (need paging/compaction to fix).​

○​ Fixed-size partitions: rigid and has internal fragmentation (need
paging/segmentation to fix)​

●​ Shared Issue:
○​ Rigid: can’t adapt to different program sizes
○​ Inefficient: Wastes memory due to unused space (fragmentation).
○​ No Protection: A buggy program could overwrite OS memory

, ○​ No Multitasking: only one process runs at a time.

What Is Memory Abstraction Then?

Abstraction hides complexity from programs and users:

●​ Each program thinks it has its own private memory.​

●​ The OS manages memory using techniques like paging, segmentation, or virtual
memory.





3. Running Multiple Programs Without a Memory
Abstraction The Relocation Problem
●​ The relocation problem occurs when a program is designed to run starting at
memory address 0, but in reality, the OS loads it somewhere else in memory —
and now all its memory addresses are wrong.​

●​ Fig 3-2:​

○​ (a) 16 KB program.​

○​ (b) Another 16 KB program.​

○​ (c) When loaded together, addresses clash unless relocated.​

●​ This means the OS needs a way to relocate memory references.


🛡️ How Do We Solve It?
The OS uses relocation techniques like:

●​ Base and limit registers: Adjust the address at runtime (e.g., add base address to
all memory accesses).​

●​ Relocation during linking/loading: Rewrite addresses in the program when it’s
loaded into memory.​

●​ Virtual memory + MMU: Use address translation to automatically map virtual
addresses to correct physical addresses.



, 4. 🔒 Base and Limit Registers
●​ Protect memory with base and limit registers:​

○​ Base = starting address.​

○​ Limit = length of allowed memory.​

●​ Fig 3-3: Ensures each process stays in its lane (no illegal memory access).​




5. 🔁 Swapping (Freeing and Reusing Memory)
●​ OS swaps processes in and out of memory to make room for others.​

●​ Fig 3-4:​

○​ Shows how memory changes as processes come and go.​

○​ Shaded areas = unused (free) memory.​

●​ Fig 3-5:​

○​ (a) Allocating space for a growing data segment.​

○​ (b) Allocating for both a growing stack and data segment.​

○​ Issue: Segments may grow into each other if not planned carefully.​




6. 🧮 Allocation with Bitmaps and Linked Lists
✅ Bitmaps (Fig 3-6)
●​ Memory divided into small units.​

●​ Bitmap tracks if each unit is free (0) or used (1).​

●​ Easy to find space, but slow when memory is large.​



🔗 Linked Lists (Fig 3-7)

Geschreven voor

Instelling
CECS326
Vak
CECS326

Documentinformatie

Geüpload op
29 mei 2025
Aantal pagina's
16
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$27.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
VEVA2K Self
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2854
Lid sinds
5 jaar
Aantal volgers
2413
Documenten
4314
Laatst verkocht
4 dagen geleden
Affordable, Up-to-date-Quality Nursing Papers

Here, you'll find a wide range of Nursing Papers at an affordable rate. Every student deserves a friendly environment for study. Always message me for any concern and help. My email is

4.1

688 beoordelingen

5
378
4
128
3
101
2
24
1
57

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen