No-Wait Queues and Memory

Assignment rules and the reference rules for no-heap threads are important to wait-free queues. The queue object itself is created in some memory area. The queue itself is created in the same memory area as the queue object. The object references passed through the queue can be in any area allowed by the reference rules.

If all objects are in heap memory, there is no problem. But a major application for wait-free queues is communication with no-heap threads. A no-heap thread would be unable to reference the queue object or any of its contents if they were in heap.

If all objects are in immortal memory, the queue will work without a hitch and can be used by any type of thread. The problem here is that all resources consumed ...

Get Real-Time Java™ Platform Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.