Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

QUESTION 1 10.00 Let X and Y be floating point variables. Which two of the follo

ID: 3701131 • Letter: Q

Question

QUESTION 1 10.00 Let X and Y be floating point variables. Which two of the following statements must be treated as critical sections? (Check both.) print"%An", X) QUESTION 2 10.00 What is the major difference betweern process context switch and thread context switch? The TLB is always flushed switch. during the process context switch and is never flushed during the thread context Thread context switch always happens at the user level and process context switch always happens at the kernel level The stack registers (the stack base and stack pointer) are replaced during the process context switch but not during the thread context switch. aced during the process context switch but not during The general purpose registers are repl context switch. the thread

Explanation / Answer

As per above image, it has 2 questions.

question 1 answer:

a) X = -X

c) X = Y

because when it enters into critical section, the value can be changed. if it changes, the other resource can be shared.

question 2 answer:

a) The TLB is always flushed during the process context switch and is never flushed during the thread context switch.

because when process context switch messes with processors caching mechanism all the memory addresses that cache remembers flushed away and becomes useless. So, when you change virtual memory spaces, the processors TLB flushed making memory accesses much more expensive.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote