[Week 5] Lock-Free Design: CacheState, PoolDriver; IdCell` to prevent user malicious corruption; Research of IPC
#6
lvyuemeng
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
The bottleneck of lock is solved by introducing lock-free data structure.
Lock-Free Design:
PoolDriver: A driver depends on lock-free object pool, automatically handling lifetime of pulled object.Then based on it, we can safely pull out cache.
CacheState: The simple op state cache withAtomicU8to achieve a lock-free state transition. State transitionensures that independent operation won't affect other.
IdCell: A cell wrap theidwhich contains the cache reference or index, which avoid intentionally corruption by user.Reading
A communication of IPC
Lock-Free Allocator
RArena: Is a lock-free allocator.
If we can isolate a independent allocator for shared memory, we can rely on the lock-free property of such allocator design
to construct a safe accessment.
The problem occurs that it can't couple with the
alloc::Allocatorapi with a consistent lock-free access.Generally, channel should be also included in such allocation.
issue crossbeam
issue async-channel
issue allocator
Then we try to communicate with author to amend this.
Current situation is that the unstable api isn't included as plan or support in nightly.
Beta Was this translation helpful? Give feedback.
All reactions