COP 4600 Midterm Review Exam
Questions With Correct Answers
______ |is |a |part |of |a |process |that |has |______ |- |CORRECT |ANSWER✔✔-Thread; |
It's |own |execution |history( |can't |have |without |a |stack) |
Program |Counter |
Stack
Every |process |has |______ |threads |and |every |thread |____ |- |CORRECT |ANSWER✔✔-one |or |
more |threads;
belongs |to |exactly |one |process
Elements |that |are |unique |to |a |process |but |not |a |thread |- |CORRECT |ANSWER✔✔-
text(instructions)
data |(constants/statics)
heap( |dynamic |allocations)
Reason |to |use |multiple |threads |instead |of |process |- |CORRECT |ANSWER✔✔-Can |reduce |
overhead |and |facilitate |sharing
**Threading: |Classical |Model; |Explain |Uniprogrammed, |Multiprocess |Model, |and |Threaded |
Model |- |CORRECT |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 |- |CORRECT |ANSWER✔✔--break |up |complicated |tasks |into |simple |ones
|
-improve |efficiency
compared |to |new |processes, |threads |have |- |CORRECT |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) |- |CORRECT |
ANSWER✔✔-Specific |to |A |Thread: |
Program |Counter |
Registers |
Stack |
State |
Specific |to |A |Process:
Address |Space
Global |Variables |
Open |file |
Child |processes |
Pending |alarms |
signals |and |handlers |
Questions With Correct Answers
______ |is |a |part |of |a |process |that |has |______ |- |CORRECT |ANSWER✔✔-Thread; |
It's |own |execution |history( |can't |have |without |a |stack) |
Program |Counter |
Stack
Every |process |has |______ |threads |and |every |thread |____ |- |CORRECT |ANSWER✔✔-one |or |
more |threads;
belongs |to |exactly |one |process
Elements |that |are |unique |to |a |process |but |not |a |thread |- |CORRECT |ANSWER✔✔-
text(instructions)
data |(constants/statics)
heap( |dynamic |allocations)
Reason |to |use |multiple |threads |instead |of |process |- |CORRECT |ANSWER✔✔-Can |reduce |
overhead |and |facilitate |sharing
**Threading: |Classical |Model; |Explain |Uniprogrammed, |Multiprocess |Model, |and |Threaded |
Model |- |CORRECT |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 |- |CORRECT |ANSWER✔✔--break |up |complicated |tasks |into |simple |ones
|
-improve |efficiency
compared |to |new |processes, |threads |have |- |CORRECT |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) |- |CORRECT |
ANSWER✔✔-Specific |to |A |Thread: |
Program |Counter |
Registers |
Stack |
State |
Specific |to |A |Process:
Address |Space
Global |Variables |
Open |file |
Child |processes |
Pending |alarms |
signals |and |handlers |