Stuart
Stuart
For option 3, it means that we return coarse clock time when the user wants high-resolution clock time. e.g., return CLOCK_MONOTONIC_COARSE when the user wants CLOCK_MONOTONIC. In Linux, the resolution...
The results of the discussion with @tatetian : 1. **idle vcpu (the thead of the async runtime) should sleep and wakeup later.** When the vcpu's run_queue is empty, the vcpu...
#### Related Work - **async-executor** - **global queue + local queues + steal**. All tasks will be firstly pushed to global queue. When a thread tries to get a task,...
### Our Design Goals A Rust async runtime with `no_std`, for LibOS, In particular, for SGX LibOS. Take ngo as an example, ngo need rust async runtime with following features:...
### Design Overview Firstly, thanks to tokio's blog https://tokio.rs/blog/2019-10-scheduler, those ideas are very usefull. #### Basic Idea - **local queues**: each thread has a local queue, in particular, a bounded...
#### Assign tasks to threads When accept one task, we need to decide which thread to run the task. In the assign algorithm, we consider following factors: - **If the...
#### Select one task to run 1. high probability: select from high_priority queue. 2. medium probability: select form mid_pri queue. 3. low probability: select from low_pri queue. 4. very low...
#### Optimization: Temporarily increase priority - If a **mid_pri** **default_type** task is wake up, insert it to **high_pri** quue temporarily to reduce delay. #### Optimization: Throttle stealing (tokio's opt) -...
## Implement `Timeout` Timeout is a decorator future that can wrap any future to make a new future that completes until the internal future completes or the timeout expires. Timeout...
## Integrate timeout support for async_rt crate To support timeout fully in async_rt crate, we need: - Time Expression: `no_std`. e.g., `Instant`, `Duration`. `Instant::now()` is supported through the interface of...