cs
cs copied to clipboard
HW solution for question #8 for OSTEP Chapter 26
Hi Sakib, I read your solution website for OSTEP along with the book, and it helps me a lot. Thanks for the great web!👍
Anyway, I raise this issue here because I think your solution for Q8 is not complete. Yes, as you said, interrupt frequency 3 gives correct result but it should be also correct if the number is multiple of 3. Besides, for bx equals to 100, any interrupt frequency larger than or equal to 597 will ensure that two threads will not interleave with each other between the critical section. So the precise interrupt intervals which lead to a correct outcome should be i is multiple of 3 or i >= 597 from my view.
But this is only my thought. Look forward to your comment.