Discussion
A spinlock is preferred to a mutex in kernel code when the critical section
Answer: B
Correct answer: is short and may be entered from interrupt context
A spinlock busy-waits, so it wastes processor time and is worth using only for a short section; and unlike a mutex it can be taken in interrupt context, where sleeping is impossible. Where the section is long or may sleep, a mutex is correct and a spinlock would be a serious fault.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development