Operating System Concepts: Concurrency and Memory Management

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

1/37

flashcard set

Earn XP

Description and Tags

Flashcards covering key concepts around concurrency, deadlock, memory management, virtual memory, and scheduling algorithms in operating systems.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

38 Terms

1
New cards

Deadlock

Occurs when processes are permanently blocked, each holding a resource the other needs.

2
New cards

Coffman’s Conditions

Four necessary conditions for deadlock: Mutual Exclusion, Hold and Wait, No Preemption, Circular Wait.

3
New cards

Mutual Exclusion

Resources are non-sharable.

4
New cards

Hold and Wait

A process holds one resource while requesting another.

5
New cards

No Preemption

Resources cannot be forcibly taken from a process.

6
New cards

Circular Wait

A closed chain of processes, each holding a resource the next needs.

7
New cards

Deadlock Prevention

Ensure at least one of the four Coffman’s conditions cannot occur.

8
New cards

Deadlock Avoidance

Use algorithms to ensure the system stays in a safe state.

9
New cards

Banker’s Algorithm

An algorithm that ensures resource allocations do not lead to unsafe states.

10
New cards

Starvation

A process never acquires the resources it needs, even though they are available intermittently.

11
New cards

Aging

Increasing a process’s priority the longer it waits to prevent starvation.

12
New cards

Memory Management Requirements

Include relocation, protection, sharing, logical and physical organization.

13
New cards

Fixed Partitioning

Divide memory into fixed-size regions at startup, leading to internal fragmentation.

14
New cards

Dynamic Partitioning

Create partitions dynamically to fit processes, leading to external fragmentation.

15
New cards

Paging

Divide logical address space into equal-sized pages and physical memory into frames.

16
New cards

Page Table

Maps each page to a specific frame in memory.

17
New cards

TLB (Translation Lookaside Buffer)

A cache that speeds up page-table lookups.

18
New cards

Segmentation

Break a program’s memory into segments corresponding to logical program structures.

19
New cards

External Fragmentation

Occurs because segments can vary in size, leaving unusable free memory.

20
New cards

Virtual Memory

The OS presents a large, uniform address space to each process, even with limited physical memory.

21
New cards

Page Fault

Triggered when a page not in memory is accessed.

22
New cards

FIFO (First-In, First-Out)

Replace the oldest loaded page; simple but can lead to Belady’s anomaly.

23
New cards

LRU (Least Recently Used)

Replace the page that has not been used for the longest time.

24
New cards

Optimal Page Replacement

Replace the page that will not be used for the longest time in the future.

25
New cards

Thrashing

Excessive paging when a process does not have enough frames for its working set.

26
New cards

Working Set Model

Tracks the set of pages a process is currently using.

27
New cards

Long-Term (Job) Scheduling

Controls how many processes enter the system.

28
New cards

Medium-Term Scheduling

Swaps processes in and out of memory.

29
New cards

Short-Term (CPU) Scheduling

Chooses which process in the ready queue runs next.

30
New cards

FCFS (First-Come, First-Served)

Simplest scheduling algorithm, can lead to the convoy effect.

31
New cards

Round Robin (RR)

Uses time slices of equal length for each process, good for interactive systems.

32
New cards

SJF (Shortest Job First)

Minimizes average waiting time but can cause starvation for long jobs.

33
New cards

Priority Scheduling

Process with the highest priority runs first, risking starvation if unmanaged.

34
New cards

Symmetric Multiprocessing (SMP)

All CPUs share a global ready queue for scheduling tasks equally.

35
New cards

Hard Real-Time

Missing a deadline is catastrophic, e.g., flight control systems.

36
New cards

Soft Real-Time

Missing a deadline is undesirable but not catastrophic, e.g., multimedia applications.

37
New cards

Priority Inversion

A lower-priority task holds a resource needed by a higher-priority task.

38
New cards

Priority Inheritance

Temporarily boosts the priority of a lower-priority task to avoid long delays.