Wk1L2 - Intro to Threads & Processes Flashcards
What is a Process in the context of computer architecture?
A process includes the code, data, and state information of a single program. Each process has its own address space in memory and is managed by the operating system.
What is a Thread?
A thread is a subset of a process. It is an independent path of execution that shares memory and code with other threads in the same process.
How do Threads differ from Processes?
Threads are lightweight, have a lower memory footprint, and share memory, making communication easier.
Processes are more resource-intensive and use separate memory spaces, offering better isolation and reliability.
What is Cache in computer architecture?
Cache is a small block of fast, expensive memory used to store frequently accessed data, reducing the time it takes to retrieve information from the main memory.
What are the two types of Locality in memory access patterns?
Temporal Locality: Programs tend to access the same data repeatedly over time.
Spatial Locality: Programs tend to access data that is close in memory to other previously accessed data.
What is Cache Coherency?
Cache coherency ensures that when multiple processors cache the same shared memory, updates to the data are properly synchronized so that all processors see the correct, consistent data.
What is Symmetric Multiprocessing (SMP)?
SMP is a memory architecture where all processors have equal access to shared memory, allowing them to communicate and collaborate efficiently.
What is the purpose of Context Switching?
Context switching refers to the process of pausing the execution of one thread and switching to another.
This allows the operating system to manage multiple threads effectively by saving the state of the current thread and loading the state of the new one.
What is the Memory Hierarchy?
The memory hierarchy organizes memory devices based on speed and cost. Faster devices (like cache and registers) are more expensive but smaller, while slower devices (like SSDs) offer larger capacities at lower costs.