Linked by Hadrien Grasland on Wed 25th May 2011 05:42 UTC
Hardware, Embedded Systems I'm going to become short of suitable title suffixes pretty shortly... Anyhow, I have also reviewed interrupts on the MOS 6502 for the sake of extreme completeness, bust most importantly have tried to address some very incomplete and misleading statements of the interrupt handling model about pop-up threads and service-providing processes in a rather extensive way, see this post.
Thread beginning with comment 474593
To view parent comment, click here.
To read all comments associated with this story, please click here.
Alfman
Member since:
2011-01-28

Neolander,

"Anyway, now I understand what you're talking about, but not what's the problem with mixing async and threads yet. So I move on... "

I'm having trouble parsing your sentence. Are you asking if IO async can be mixed with IO threads?

Yes, but it'd need to be somewhat indirect since the async model isn't supposed to block on semaphores/mutex.

The async process could call a variant of the mutex which polls rather than blocks, but that's not really acceptable. Ideally we'd have a variant of the mutex (compatible with the mutex used by threads) which signals when it's ready instead of blocking and waiting.

A userspace app could emulate these signals by employing a thread wrapper to grab a blocking mutex, then send a signal to the async thread upon it's acquisition. However this is totally inefficient since we're doing even more work than the pure threaded solution.

Reply Parent Score: 2

Neolander Member since:
2010-03-08

Async algorithms never use blocking locks ? But then how do unrelated async drivers synchronize with each other ?

Reply Parent Score: 1

Alfman Member since:
2011-01-28

"Async algorithms never use blocking locks ?"

The async model should only ever block when there's no IO to handle. At least in principal, it should never block at any other time.


"But then how do unrelated async drivers synchronize with each other ?"

They can communicate using the same IO mechanisms used elsewhere.

That's just a purist view, in practice it probably wouldn't be a big deal if they infrequently blocked on strictly momentary critical section locks.

Edited 2011-05-26 17:54 UTC

Reply Parent Score: 2