6. What are the potential approaches that you would recommend in order to protec
ID: 3590943 • Letter: 6
Question
6. What are the potential approaches that you would recommend in order to protect shared resources in scenarios like this where sharing resources are being accesses inside an interrupt service routines and possibly more than one protocol tasks?
A) Just use the mutual exclusive semaphore inside the the protocol tasks but never inside the interrupt service routine because ISRs will not corrupt the data structures or cause an unexpected register value change.
B) Disable all interrupts and context switching inside both interrupt service routine and the protocol tasks before accessing the shared resources; and enable them back again when we are done with accessing the shared resources.
C) Just use the mutual exclusive semaphores inside the interrupt service routine but not the protocol tasks as long as there are no more than only one protocol task is sharing the resource.
D) Make sure that only single protocol task can access the shared resource with the interrupt service routine. Using this technique there is no need for additional provision to protect the shared resource
Explanation / Answer
Answer:-
D) Make sure that only single protocol task can access the shared resource with the interrupt service routine. Using this technique there is no need for additional provision to protect the shared resource
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.