Threads and Concurrency in Operating Systems

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

1/9

flashcard set

Earn XP

Description and Tags

A set of flashcards covering key concepts about threads and concurrency relevant to operating systems.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

What is the difference between concurrency and parallelism?

Concurrency is dealing with lots of things at once (time-sharing), whereas parallelism is doing lots of things at once (actual simultaneous execution on multiple CPUs).

2
New cards

What system call is used in Linux to create threads?

The clone(2) system call is used to create threads in Linux.

3
New cards

What is Amdahl's Law?

Amdahl's Law states that the maximum speedup of a process is limited by the proportion of the process that must be done serially.

4
New cards

What is the primary benefit of using threads over processes?

Threads have lower memory usage and faster context switching compared to processes.

5
New cards

What are thread-local storage (TLS) and its use?

Thread-local storage allows each thread to have its own copy of global data, which is unique to each thread.

6
New cards

What is the main advantage of using thread pools?

Thread pools allow pre-created threads, which means no setup time and better management of task dispatching.

7
New cards

What is a common issue when debugging multi-threaded applications?

Debugging is often harder due to shared state leading to race conditions.

8
New cards

What happens when a thread crashes in a multi-threaded process?

If one thread crashes, the entire process may be affected; in contrast, a crashing process does not affect others.

9
New cards

What is the role of a CPU Scheduler in operating systems?

The CPU Scheduler is responsible for determining which process runs at any given time, optimizing CPU utilization and response time.

10
New cards

What is the definition of a thread ID?

A thread ID is a unique identifier assigned to each thread in a process.