{"repo":"BradenEverson/thoth","free":true,"listed":false,"github":"https://github.com/BradenEverson/thoth","clone":"git clone https://github.com/BradenEverson/thoth.git","description":"Really small preemptive scheduler :)","language":"Zig","stars":17,"topics":["operating-system","scheduler","zig","round-robin"],"license":"MIT","category":"workflow-automation","readme_excerpt":"Thoth - Tiny Preemptive Scheduler I'm a great artist. Overview Thoth is a very simple task registration and scheduling runtime. It supports both cooperative concurrency through tasks choosing to yield their control, or the potential for preemptive scheduling by forcing a yield through a timer or interrupt. Usage The root of Thoth is the ThothScheduler struct. A configurable scheduler that allows specification of each Task's heap size. It performs no allocations and uses a super simple round robin scheduling algorithm, therefore making it deterministic. It currently supports x86-64, ARM32(UNTESTED, but thumb works so it probably does) and Thumb architectures. In the same style that many Zig functions require an Allocator to be passed, Thoth requires a Scheduler to be specified at compile time, any struct that provides access to start() Task , getNext() Task , getTaskType() type and register(TaskFn) !void methods. This allows fully customizable scheduling algorithms, dynamic or static task storage, priority queues and anything else you can think of. Cooperative Scheduling Preemptive Scheduling (using linux timers + signals to give the illusion of an interrupt driven time quantum) I hope you enjoy my first dive into RTOS scheduling :D","default_branch":null,"files":null,"tree":[],"storefront":"/r/BradenEverson","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/BradenEverson/thoth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}