-
Notifications
You must be signed in to change notification settings - Fork 222
Scheduler internals
The function pico_stack_tick represents the core of the currently implemented scheduler. Its role is to assign CPU time slices to all the modules previously registered. The friendliness of the scheduler strictly depends on the implementation of the processing functions for both protocols and drivers.
A typical processing function (e.g. protocols process_in / process_out or driver’s poll) receives an integer value loop_score as one of the arguments. This value indicates the maximum number of frames that can be processed during this invocation. The processing function must decrease the loop_score value by one for each frame that has been processed during the invocation, and return the remaining value. If the loop_score reaches zero, the function should stop and return zero immediately. This ensures that the central scheduler has the control over the number of frames that can be processed at every iteration by each and every module, ensuring a fair share for all the protocols and drivers awaiting to process incoming and outgoing frames. After each epoch, the scheduler calculates a new set of loop_scores for all the protocols and drivers in order to optimize the response time and the throughput of the stack.
Questions or remarks? Please contact us!
[email protected] | picotcp.altran.be | Twitter | Facebook
Getting Started
- Setting up the environment
- Testing
- Configuring and compiling
- Running picoTCP on Linux - Deprecated (see setting up)
- Running picoTCP on Windows
Porting
- Build process explained
- Porting the build to another compiler or IDE
- Porting picoTCP to your favorite embedded target
- Porting picoTCP to your favorite Operating System
- Example device driver
Development