Threads, Concurrency, and CPU Scheduling

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

1/20

flashcard set

Earn XP

Description and Tags

A set of flashcards covering key terms and concepts related to threads, concurrency, CPU scheduling, and synchronization in computing.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

21 Terms

1
New cards

Trap

Software-generated interruption, such as a system call.

2
New cards

Exception

An unexpected error, for example, division by zero.

3
New cards

User-Level Threads

Threads managed in user space, faster and more lightweight (Blocking Affects All).

4
New cards

Kernel-Level Threads

Threads managed by the operating system, providing true parallelism (Blocking Affects One).

5
New cards

Turnaround Time (TT)

The time from arrival to completion, calculated as TT = Completion – Arrival.

6
New cards

Waiting Time (WT)

The time a process waits in the ready queue, calculated as WT = Turnaround – Burst = Start Time – Time executed before start - Arrival.

7
New cards

Dispatch Latency

Time to switch context between processes (scheduling overhead).

8
New cards

Critical Section (CS) Problem

The problem of ensuring that only one process executes in a critical section at any given time.

9
New cards

Mutual Exclusion

Only one process in Critical Section at a time.

10
New cards

Progress

Guarantees only 1 process can enter the critical section if no other processes are in it.

11
New cards

Bounded Waiting

A requirement that limits the time a process can wait to enter the critical section.

12
New cards

Semaphores

Synchronization tools that can be binary (acting like a lock) or counting (controlling access to a resource pool).

13
New cards

Test-and-Set Model

A technique for ensuring mutual exclusion that uses atomic instructions to manage locks (Returns previous value; sets lock to true).

14
New cards

Busy Waiting

A scenario where a process spins in a loop, wasting CPU time while waiting for a condition to be met.

15
New cards

Spinlock

A type of lock that uses busy waiting, efficient for short waits.

16
New cards

Peterson’s Solution

A method to ensure mutual exclusion for 2 threads using shared flags and a turn variable.

17
New cards

First-Come, First-Served (FCFS) Scheduling

A simple scheduling algorithm that can cause convoy effects.

18
New cards

Shortest Job First (SJF) Scheduling

An algorithm that selects the process with the shortest burst time next.

19
New cards

Shortest Remaining Time First (SRTF) Scheduling

A preemptive version of SJF that selects the process with the shortest remaining time.

20
New cards

Round Robin (RR) Scheduling

A fair scheduling algorithm that uses time quantum to allocate CPU.

21
New cards

Priority Scheduling

An algorithm that may cause starvation, which can be mitigated through aging.