Expand description
Implementation of Processor
and Intersection of control flow
Here, the continuous operation of user apps in CPU is maintained, the current running state of CPU is recorded, and the replacement and transfer of control flow of different applications are executed.
Structs§
- Processor management structure
Functions§
- Get a copy of the current task
- Get the mutable reference to trap context of current task
- Get the current user token(addr of page table)
- The main part of process execution and scheduling Loop
fetch_task
to get the process that needs to run, and switch the process through__switch
- Return to idle control flow for new scheduling
- Get current task through take, leaving a None in its place