Skip to contentSkip to conversation

Question: In what circumstances would the enqueuer fail?

DISCUSSION Alan Huang 2 participants 4 messages May 29, 2023 – May 30, 2023

lore
Share & tools
lore

Alan Huang

author
#0 lore raw

Hi,

I’m reading 14.2.1.3 Half-NBS Queue, there is one sentence says:

The enqueuer might have failed between lines 9 and 10 of the listing, so that the element in question is only partially enqueued.

My question is: In what circumstances would the enqueuer fail between lines 9 and 10 ?

Thanks,
Alan

#1 lore raw
Quoted 7 lines · Alan Huang

Hi,

I’m reading 14.2.1.3 Half-NBS Queue, there is one sentence says:

The enqueuer might have failed between lines 9 and 10 of the listing, so that the element in question is only partially enqueued.

My question is: In what circumstances would the enqueuer fail between lines 9 and 10 ?

The following circumstances would do it:

o Someone kills the thread at that point.

o The CPU that the thread is running on takes an interrupt,
but there is an infinite-loop bug in the interrupt handler, so that the thread's execution is never resumed.

o The CPU that the thread is running on fail-stops, again
preventing that thread from resuming. (This is rare, but does occasionally happen, especially on old or thermally abused hardware.)

So nothing normal, if that is what you are asking. ;-)

Thanx, Paul

author
#2 lore raw
Quoted 20 lines

2023年5月30日 08:36,Paul E. McKenney <[email protected]> 写道:

Quoted 7 lines · Alan Huang

Hi,

I’m reading 14.2.1.3 Half-NBS Queue, there is one sentence says:

The enqueuer might have failed between lines 9 and 10 of the listing, so that the element in question is only partially enqueued.

My question is: In what circumstances would the enqueuer fail between lines 9 and 10 ?

The following circumstances would do it:

o Someone kills the thread at that point.

o The CPU that the thread is running on takes an interrupt,
but there is an infinite-loop bug in the interrupt handler, so that the thread's execution is never resumed.

Quoted 6 lines

o The CPU that the thread is running on fail-stops, again
preventing that thread from resuming. (This is rare, but does occasionally happen, especially on old or thermally abused hardware.)

So nothing normal, if that is what you are asking. ;-)

Yeah, nothing normal. I often neglect to consider these exceptional cases.

Thank you for the explanation!

Thanks,
Alan

Quoted 2 lines

Thanx, Paul

author
#3 lore raw
In reply to Paul E. McKenney
Quoted 20 lines

2023年5月30日 08:36,Paul E. McKenney <[email protected]> 写道:

Quoted 7 lines · Alan Huang

Hi,

I’m reading 14.2.1.3 Half-NBS Queue, there is one sentence says:

The enqueuer might have failed between lines 9 and 10 of the listing, so that the element in question is only partially enqueued.

My question is: In what circumstances would the enqueuer fail between lines 9 and 10 ?

The following circumstances would do it:

o Someone kills the thread at that point.

o The CPU that the thread is running on takes an interrupt, but there is an infinite-loop bug in the interrupt handler, so that the thread's execution is never resumed.

Quoted 6 lines

o The CPU that the thread is running on fail-stops, again preventing that thread from resuming. (This is rare, but does occasionally happen, especially on old or thermally abused hardware.)

So nothing normal, if that is what you are asking. ;-)

Yeah, nothing normal. I often neglect to consider these exceptional cases.

Thank you for the explanation!

Thanks,
Alan

Quoted 2 lines

Thanx, Paul