Operating Systems Chapter 4: Threads

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

1/38

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.

39 Terms

1
New cards

Heavyweight process

Process with only one thread of control.

2
New cards

Threads

Process-tasks running concurrently, each with their own registers and stacks, sharing code, date and files. Less resource intensive and time consuming than process creation.

3
New cards

Single-threaded process

serves one client at a time, making another client wait, contains one thread and stack

4
New cards

Multi-threaded process

contains many registers and stacks, several threads of control

5
New cards

Multicore system

System with multiple cores per CPU or across CPUs.

6
New cards

Parallelism

The system can perform more than one task simultaneously.

7
New cards

Concurrency

A system that can let more than one task make progress (doesn't have to be parallel), by e.g. rapidly switching.

8
New cards

Data splitting

Data accessed and manipulated by multiple threads must be divided to run on separate cores.

9
New cards

Data dependency

Execution sometimes needs to be synchronised to make sure two or more tasks use the right data if they depend on each other.

10
New cards

Data parallelism

Distributing subsets of same data across multiple cores, and performing the same operation on each core.

11
New cards

Task parallelism

Distributing threads across multiple cores, each performing a unique operation.

12
New cards

User threads

Threads provided at user level, above kernel level (managed without kernel support).

13
New cards

Kernel threads

Threads supported and managed by the OS.

14
New cards

Many-to-one model

Mapping of user-level threads to one kernel thread. Only one thread can access the kernel at a time (no parallel execution).

15
New cards

One-to-one model

Mapping of each user thread to a kernel thread. Allows for other threads to run when one makes a blocking call, and parallel execution. Creation of a kernel thread per user-level process can cause overhead (limit possible).

provides more concurrency than the many to one model by allowing another thread to run when a thread makes a blocking system call; also allows multiple threads to run in parallel on multiprocessors

16
New cards

Many-to-many model

Multiplexing user-level threads to a smaller or equal amount of kernel threads. Corresponding kernel thread can run in parallel on processor, and there is no limit on the amount of kernel threads.

17
New cards

Two-level model

Variation of the many-to-many model that also allows the binding of a user-level thread to a single kernel thread (one-to-one model).

18
New cards

Thread library

Provides an API for creating and managing threads.

19
New cards

Asynchronous threading

Once the parent creates a child thread, it resumes operation. Children run independently, because the parent need not know when its child terminates.

20
New cards

Synchronous threading

Parent must wait until all of its created children threads terminate before it resumes (fork-join strategy). Threads execute concurrently.

21
New cards

Implicit threading

Transferring the creation and management of threading from app developers to compilers and run-time libraries.

22
New cards

Thread pool

Create a number of threads during process startup in a pool, where they wait for work, limiting the number of threads that can be created.

23
New cards

Signal

UNIX - Process notification that a certain event has occurred. Can be received (a)synchronously.

24
New cards

Synchronous signal

UNIX - Signal that notifies the process itself (division by zero, illegal memory access, ...)

25
New cards

Asynchronous signal

UNIX - Signal that notifies an external process.

26
New cards

Default signal handler

Handler for every signal, run by the kernel when the signal is handled.

27
New cards

User-defined signal handler

Overridden default action in the default signal handler for a a specific kernel action.

28
New cards

Asynchronous procedure calls (APC)

Windows - Emulation of the non-supported signalling system. Allows the specification on user functions that are to be called when the user thread receives a notification (roughly equivalent to UNIX asynchronous signals).

29
New cards

Thread cancellation

Terminating a thread before it had finished.

30
New cards

Target thread

Thread that is to be cancelled.

31
New cards

Asynchronous thread cancellation

One thread immediately terminates the target thread. Target thread updating data of other threads can cause a problem.

32
New cards

Deferred cancellation

Target thread periodically checks wether it should terminate, allowing it to terminate itself in an orderly fashion.

33
New cards

Cancellation point

Thread terminates when reaching this point. Only way a thread can end in deferred cancellation mode.

34
New cards

Cleanup helper

Function that is invoked when a cancellation request is pending, deallocates all resources from the thread before it is terminated.

35
New cards

Thread-local storage (TLS)

Thread-specific copy of certain data. Visible across all function invocations (≠ local variables).

36
New cards

Lightweight process (LWP)

Intermediate data structure in the many-to-many and two-level models between the user-level and kernel threads (± virtual processor). I/O intensive applications may require multiple LWP for each blocking system call.

37
New cards

Scheduler activation

The scheduling of LWP by the kernel (user library schedules user-level threads).

38
New cards

Upcall

Kernel informing applications about certain events.

39
New cards

Upcall handler

Handler in the thread library handling upcalls. Running on virtual processors.