Free Online Flashcard Deck

3 Threads and Multithreading Free Online FlashCards

Study 3 Threads and Multithreading with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What is a process?

Back

A process is a running program together with operating-system resources such as a virtual address space and access to files.

02
Front

What execution state does each thread maintain independently?

Back

Each thread has its own execution state, including its program counter, CPU registers, and stack.

03
Front

What do threads in the same process share?

Back

Threads in one process share the process's code, global data, heap, and many process resources.

04
Front

How does memory isolation differ between processes and same-process threads?

Back

Processes typically have separate address spaces, while threads in one process share an address space. A faulty thread write can therefore affect its fellow threads.

05
Front

How can multithreading improve responsiveness?

Back

Multithreading can improve responsiveness: one thread can continue working while another waits for input or file access.

06
Front

What does concurrency mean?

Back

Concurrency is progress on tasks during overlapping periods; on a single core, the operating system can interleave them.

07
Front

What is a race condition?

Back

A race condition occurs when threads update the same value without coordination, allowing overlapping operations to produce an incorrect result.

08
Front

What can a blocking system call do in the many-to-one model?

Back

In the many-to-one model, many user threads map to one kernel thread. A blocking system call can stop that kernel thread and prevent the other user threads from running.

09
Front

What is the main trade-off of the one-to-one model?

Back

In the one-to-one model, each user thread maps to a kernel thread, enabling independent scheduling and potential parallel execution. The trade-off is greater resource use for creating and managing kernel threads.

10
Front

How does the many-to-many model map user threads to kernel threads?

Back

Many-to-many multiplexes many user threads over a set of kernel threads, allowing more user threads than kernel threads while retaining the potential for parallel execution.

11
Front

What additional option does the two-level model provide?

Back

A two-level model is a many-to-many variation that also allows some user threads to be bound to particular kernel threads.

12
Front

What is a thread?

Back

A thread is a sequence of execution within a process. A process can contain one thread or several.