syswonder / ruxos

Rust Unikernel OS
https://ruxos.syswonder.org
Other
59 stars 19 forks source link

Implemented various backoffs and per-CPU rng #130

Closed Sssssaltyfish closed 4 months ago

Sssssaltyfish commented 4 months ago
  1. Modified crates/spinlock to provide support for multiple backoff strategies when encountering lock contention, including exp-backoff and rand-exp-backoff.

  2. Modified BaseSpinLock in crates/spinlock to support locking with a different guard/backoff type, providing more flexibility.

  3. Added a new module ruxrand that aims to provide support for the usage of RNGs inside kernel. Currently a per-CPU RNG and support for rand-exp-backoff in spinlock are implemented.

  4. Changed the lock type used by RunQueue.