Question

how interrupt could block other process to access the critical section ?

how interrupt could block other process to access the critical section ?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

Race condition can be defined as a condition where some shared data is read and written by more than one process at a time and the result. In order to avoid a race condition situation the threads which are involved in concurrent operations over shared data need to synchronize their turns when acting on data. Suppose if the ready queue is implemented as a linked list and if during and interrupt handling if the linked list is manipulated. The interrupts need to be disabled in order to prevent another interrupt before its work is done. If not disabled the interrupts will cause corruption to the ready queue.

One way of doing so is by implementing mutual exclusion. Basically it means that at a given point of time only one process can use the shared data for read / write purposes while other processes will be have to wait i.e. excluded from accessing the shared space. Once the process has finished executing the shared space the other processes in waiting should be allowed to start. However there will be a priority system to check that the correct process gets the chance. The primary conditions for mutual exclusion are:

  • No two threads will be able to execute their critical section at the same time
  • Apart from the thread executing its critical section, no other thread outside the critical section should be blocked
  • A thread can wait a finite amount of time in order to get the chance to enter its critical section
  • There are no considerations for processing speed of CPU or the no of cores present
Add a comment
Know the answer?
Add Answer to:
how interrupt could block other process to access the critical section ?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT