Week 3&4 - Operating Systems Flashcards
1
Q
What is a thread?
A
A single or smallest sequence of instructions executed by the CPU.
It is a basic unit of CPU utilization comprising:
Thread ID
Program counter
Set of registers
Stack (stores local variables)
2
Q
What is multi-threading?
A
A program execution technique that allows multiple threads to be executed simultaneously.
Multiple threads within a single process.
Comprises:
ID
Program counter
Set of registers
Stack
3
Q
What are the challenges in developing multi-threaded applications?
A
Challenges in multicore or multiprocessor systems: Dividing activities Balance Data splitting Data dependency Testing and debugging