hgruniaux / Pi-kachULM_OS

A mini OS kernel for Raspberry PI 3 and 4
Other
3 stars 1 forks source link

[feat] Support task sleeping (`sleep` syscall) #52

Closed hgruniaux closed 6 months ago

hgruniaux commented 6 months ago

Implement the sleep syscall for tasks. Most of the work is done. We only need a data structure in the scheduler that keep track of the remaining time of each sleep task. Once a task has sleep for long enough, it can be put back into its run queue (maybe using task->wake()).

To keep track of remaining time, one could use delta queues. See https://learn.osdev.org/Blocking_Process, section Sleeping.