COP4600 Midterm Review
Questions With Correct Answers
______ is a part of a process that has ______ - ANSWER✔✔✔-Thread;
| | | | | | | | | | | |
It's own execution history( can't have without a stack)
| | | | | | | | |
Program Counter | |
Stack
Every process has ______ threads and every thread ____ -
| | | | | | | | | |
ANSWER✔✔✔-one or more threads; | | |
belongs to exactly one process
| | | |
Elements that are unique to a process but not a thread - ANSWER✔✔✔-
| | | | | | | | | | | |
text(instructions)
data (constants/statics)
|
heap( dynamic allocations)
| |
Reason to use multiple threads instead of process - ANSWER✔✔✔-Can
| | | | | | | | | |
reduce overhead and facilitate sharing
| | | |
, **Threading: Classical Model; Explain Uniprogrammed, Multiprocess
| | | | | |
Model, and Threaded Model - ANSWER✔✔✔-Uni: One process at at
| | | | | | | | | |
time, wait for a process to finish;
| | | | | | |
Multiprocess:Process switch in and out. | | | | |
Threaded switch between threads within a process. ( this reduces
| | | | | | | | | |
context switch times)
| |
Why do we use threads - ANSWER✔✔✔--break up complicated tasks
| | | | | | | | | |
into simple ones
| | |
-improve efficiency |
compared to new processes, threads have - ANSWER✔✔✔--lower
| | | | | | | |
memory cost(shared segments)
| | |
-information sharing ( through shared data) | | | | | |
-reduced creation, | |
destruction time (allocation, copying) | | | |
-reduce context time ( to another thread in the same process only)
| | | | | | | | | | |
What's in a thread? (Give Process Specific versus Thread Specific
| | | | | | | | | |
Components) - ANSWER✔✔✔-Specific to A Thread: | | | | | |
Program Counter | |
Questions With Correct Answers
______ is a part of a process that has ______ - ANSWER✔✔✔-Thread;
| | | | | | | | | | | |
It's own execution history( can't have without a stack)
| | | | | | | | |
Program Counter | |
Stack
Every process has ______ threads and every thread ____ -
| | | | | | | | | |
ANSWER✔✔✔-one or more threads; | | |
belongs to exactly one process
| | | |
Elements that are unique to a process but not a thread - ANSWER✔✔✔-
| | | | | | | | | | | |
text(instructions)
data (constants/statics)
|
heap( dynamic allocations)
| |
Reason to use multiple threads instead of process - ANSWER✔✔✔-Can
| | | | | | | | | |
reduce overhead and facilitate sharing
| | | |
, **Threading: Classical Model; Explain Uniprogrammed, Multiprocess
| | | | | |
Model, and Threaded Model - ANSWER✔✔✔-Uni: One process at at
| | | | | | | | | |
time, wait for a process to finish;
| | | | | | |
Multiprocess:Process switch in and out. | | | | |
Threaded switch between threads within a process. ( this reduces
| | | | | | | | | |
context switch times)
| |
Why do we use threads - ANSWER✔✔✔--break up complicated tasks
| | | | | | | | | |
into simple ones
| | |
-improve efficiency |
compared to new processes, threads have - ANSWER✔✔✔--lower
| | | | | | | |
memory cost(shared segments)
| | |
-information sharing ( through shared data) | | | | | |
-reduced creation, | |
destruction time (allocation, copying) | | | |
-reduce context time ( to another thread in the same process only)
| | | | | | | | | | |
What's in a thread? (Give Process Specific versus Thread Specific
| | | | | | | | | |
Components) - ANSWER✔✔✔-Specific to A Thread: | | | | | |
Program Counter | |