LQ1 - Operating Systems - Threads & Concurrency

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 53

flashcard set

Earn XP

Description and Tags

54 Terms

1

heavy weight, light weight

process creation is ____ ____ while thread creation is ____ ____

New cards
2

parallelism

implies a system can perform more than one task simultaneously

New cards
3

concurrency

supports more than one task making progress

New cards
4

data parallelism

distributes subsets of the same data across multiple cores, same operation on each

New cards
5

task parallelism

distributing threads across cores, each thread performing a unique operation

New cards
6

Amdahl’s Law

identifies performance gains from adding additional cores to an application that has both serial and parallel components

New cards
7

user threads

management done by user-level threads library

New cards
8
  • POSIX Pthreads

  • Windows threads

  • Java threads

enumerate the three primary thread libraries

New cards
9

kernel threads

threads which are supported by the kernel

New cards
10

many-to-one

is a multithreading model where user-level threads are mapped to a single kernel thread

New cards
11

many-to-one

is a multithreading model where one thread blocking causes all to be blocked.

New cards
12

many-to-one

is a multithreading model where multiple threads may not run in parallel on muticore system because only one may be in kernel at a time.

New cards
13

one-to-one

is a multithreading model where each user-level thread maps to a kernel thread

New cards
14

many-to-many

is a multithreading model that allows many user level threads to be mapped to many kernel threads

New cards
15

many-to-many

is a multithreading model that allows the operating system to create a sufficient number of kernel threads

New cards
16

two-level model

is a multithreading model that is similar to M:M, except that it allows a user thread to be bound to

kernel thread

New cards
17

thread library

provides programmer with API for creating and managing threads

New cards
18
  • library entirely in user space

  • kernel-level library supported by the OS

two main ways of implementing thread libraries

New cards
19

Pthreads

A POSIX standard (IEEE 1003.1c) API for thread creation and synchronization. It be provided either as user-level or kernel-level.

New cards
20

implicit threading

Creation and management of threads done by compilers and run-time libraries rather than programmers

New cards
21
  • Thread Pools

  • Fork-Join

  • OpenMP

  • Grand Central Dispatch

  • Intel Threading Building Blocks

what are the five methods of implicit threading?

New cards
22

thread pools

An implicit threading method where a number of threads are created in a pool where they await work

New cards
23

Fork-Join Parallelism

An implicit threading method where multiple threads (task) are forked and then joined

New cards
24

Grand Central Dispatch

An implicit threading method that extends to C, C++ and Objective-C languages, API, and run-time

library.

It allows identification of parallel sections. It also manages most of the details of threading and puts blocks in “^{}”.

New cards
25

serial, main queue

____ is a type of dispatch queue where blocks are removed in FIFO order, queue is per process, called ___ ____

New cards
26

concurrent

is a type of dispatch queue where blocks are removed in FIFO order but several may be removed at a time

New cards
27

signals

are used in UNIX systems to notify a process that a particular event has occurred.

New cards
28

signal handler

is used to process signals

New cards
29

default handler

Every signal has ___ ____ that kernel runs when handling signal

New cards
30

user-defined

____ signal handler can override default

New cards
31

thread cancellation

Terminating a thread before it has finished

New cards
32

target thread

Thread to be canceled

New cards
33

Asynchronous cancellation

terminates the target thread immediately

New cards
34

Deferred cancellation

allows the target thread to periodically check if it should be cancelled. It is the default type of thread cancellation.

New cards
35

signals

On Linux systems, thread cancellation is handled through ___

New cards
36

interrupt()

Deferred cancellation uses the ____ method

New cards
37

Thread-local storage (TLS)

allows each thread to have its own copy of data

New cards
38

Thread-local storage (TLS)

Useful when you do not have control over the thread creation process

New cards
39

lightweight process (LWP)

An intermediate data structure between user and kernel threads

New cards
40

lightweight process (LWP)

Appears to be a virtual processor on which process can schedule user thread to run

New cards
41

upcalls

a communication mechanism, provided by scheduler activations, from the kernel to the upcall handler in the thread library

New cards
42

Windows API

primary API for Windows applications

New cards
43

context

The register set, stacks, and private storage area are known as the ___ of the thread

New cards
44
  • thread id

  • register set representing state of processor

  • separate user and kernel stacks for when thread runs in user mode or kernel mode

  • Private data storage area used by run-time libraries and dynamic link libraries (DLLs)

enumerate the components each windows thread has

New cards
45

ETHREAD (executive thread block)

a primary data structure of a Windows thread that includes pointer to process to which thread belongs and to KTHREAD, in kernel space

New cards
46

KTHREAD (kernel thread block)

a primary data structure of a Windows thread with scheduling and synchronization info, kernel-mode stack, pointer to TEB, in kernel space

New cards
47

TEB (thread environment block)

a primary data structure of a Windows thread with thread id, user-mode stack, thread-local storage, in user space

New cards
48

tasks

the Linux term for threads

New cards
49

clone()

system call to create a thread in Linux

New cards
50

struct task_struct

points to process data structures (shared or unique)

New cards
51

CLONE_FS

a Linux flag that indicates that File-system information is shared

New cards
52

CLONE_VM

a Linux flag that indicates that the same memory space is shared

New cards
53

CLONE_SIGHAND

a Linux flag that indicates that signal handlers are shared.

New cards
54

CLONE_FILES

a Linux flag that indicates that the set of open files is shared.

New cards
robot