{"id":22728496,"url":"https://github.com/6arms1leg/taskuler","last_synced_at":"2025-04-23T14:23:17.605Z","repository":{"id":253685474,"uuid":"397361776","full_name":"6arms1leg/taskuler","owner":"6arms1leg","description":"Simple and tiny framework of a cyclic executive, non-preemptive, cooperative scheduler for embedded systems to manage task execution","archived":false,"fork":false,"pushed_at":"2025-02-16T22:08:55.000Z","size":2519,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T00:27:27.916Z","etag":null,"topics":["cooperative","cyclic-executive","embedded","embedded-systems","framework","microkernel","nested-critical-regions","nested-critical-sections","non-preemptive","real-time","scheduler","timers"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/6arms1leg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-17T18:55:44.000Z","updated_at":"2025-03-21T13:43:48.000Z","dependencies_parsed_at":"2024-08-18T19:42:06.315Z","dependency_job_id":"8ddbd54f-a486-41a9-871f-b94c3ba2469e","html_url":"https://github.com/6arms1leg/taskuler","commit_stats":null,"previous_names":["6arms1leg/taskuler"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Ftaskuler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Ftaskuler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Ftaskuler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/6arms1leg%2Ftaskuler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/6arms1leg","download_url":"https://codeload.github.com/6arms1leg/taskuler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250448772,"owners_count":21432319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cooperative","cyclic-executive","embedded","embedded-systems","framework","microkernel","nested-critical-regions","nested-critical-sections","non-preemptive","real-time","scheduler","timers"],"created_at":"2024-12-10T17:16:21.393Z","updated_at":"2025-04-23T14:23:17.585Z","avatar_url":"https://github.com/6arms1leg.png","language":"C","readme":"\u003c!--\nKeywords:\ncooperative, cyclic-executive, embedded, embedded-systems, framework,\nmicrokernel, nested-critical-regions, nested-critical-sections, non-preemptive,\nreal-time, scheduler, timers\n--\u003e\n\n# Taskuler - Simple \"bare-metal\" task scheduling framework\n\nThis framework employs a simple and tiny\n\n*cyclic executive, non-preemtive, cooperative scheduler*\n\nto manage task execution.\n\n## Requirements specification\n\nThe following loosely lists requirements, constraints, features and goals.\n\n* Cyclic executive, cooperative (non-preemptive/run-to-completion), monotonic\n  (fixed priorities) scheduling of multiple tasks in embedded systems for\n  real-time applications\n* Preemption can be achieved through hardware interrupts\n* Provides an optional facility (separate module) to handle nested critical\n  sections\n* Timing of tasks (via task lists) is predefined at compile time\n* Switch between multiple task lists at run time\n* Tasks within a task list can individually be enabled and disabled at run time\n* Timers can be created with one-shot tasks whos time stamp of last task run is\n  updated when enbling (starting) them\n* Each task can individually be scheduled by its period and its offset to other\n  tasks\n* Task deadline overrun detection/indication with (single) counter\n* Optional task deadline overrun (recovery) action with custom hook\n* Deadline of each task can individually be defined at compile time\n* Disabled tasks are not run but their last run indication is still updated to\n  maintain schedulability\n* To eliminate drift in task invocation over time, tasks update their last run\n  to the \"ideal\" invocation time (that is, the beginning of their period/time\n  slot)\n* If a task--for whatever reason--is not executed within its period, it will\n  run \"normally\" within its next period (without impact on the schedule of\n  other tasks)\n* Works flawlessly on rollover of its relative system time tick source with\n  unsigned integer type that it is connected to\n\n\u003c!-- Separator --\u003e\n\n* Framework design\n* Deployment in embedded systems\n* Code implementation in the C programming language (\"C99\", ISO/IEC 9899:1999)\n* Interfaces with the application software through task lists and with the MCU\n  hardware (for the relative system time tick) through a pointer to\n  function--both user-provided\n\n\u003c!-- Separator --\u003e\n\n* \"Design by Contract\" approach via \"dynamic\" assertions (`assert(...)`)\n* Low impact on technical budgets\n    * Low CPU utilization\n    * Small memory footprint in ROM (text, data) and RAM (data, heap, stack)\n    * Runs (also) well on \"small\" MCUs (e.g., AVR ATmega328P/Arduino Uno)\n* Quality model\n    * \"Simple\" (low complexity of software architecture and detailed design,\n      essential features only)\n    * Modular\n    * Re-usable\n    * Portable\n    * Unit tested with 100 % coverage (LOC executed, branches taken, functions\n      called)\n    * Defined quality metrics (see table below)\n    * MISRA-C:2012 compliant\n    * Static code analysis pass\n    * No dynamic memory allocation (via `malloc()` or similar)\n    * SCM via Git with [Semantic Versioning](https://semver.org)\n* Well documented (from requirements over architecture to detailed design),\n  using Doxygen, Markdown, custom diagrams, UML\n* Traceability from requirements specification to implementation by\n  transitivity\n\nQuality metrics:\n\n| Metric                                       | Target   |\n| -------------------------------------------- | -------- |\n| No. of parameters/arguments (per func.)      | \\\u003c= 6    |\n| No. of instructions (per func.)              | \\\u003c= 60   |\n| No. of nested control structures (per func.) | \\\u003c= 5    |\n| Cyclomatic complexity number (per func.)     | \\\u003c= 10   |\n| Comment rate (per file)                      | \\\u003e= 20 % |\n| Unit test (decision) coverage                | = 100 %  |\n\n## Using timers\n\nTimers can be created by using a one-shot task that deactives itself at the end\nof its execution.\nIts period then defines the timer’s timing.\nWhen enabling such a task (i.e., starting the timer), its time stamp of last\ntask run must be updated.\n\n## Architecture\n\n![UML class diagram](./doc/arc/figures/taskuler-cd.png)\n\n![Scheduling algorithm](./doc/arc/figures/taskuler-scheduler-ad.png)\n\n![Exemplary task schedule](./doc/arc/figures/taskuler-task-schedule-example-cstmd.png)\n\n![Flow of control](./doc/arc/figures/taskuler-smd.png)\n\n![Layered architecture](./doc/arc/figures/taskuler-cmpd.png)\n\n![UML package diagram](./doc/arc/figures/taskuler-pd.png)\n\n## Coding standard\n\n### Applicable guidelines\n\nThis project aims to adhere to the following guidelines (with exceptions):\n\n* The Power of Ten - Rules for Developing Safety Critical Code (NASA/JPL; G. J.\n  Holzmann)\n* MISRA C:2012 - Guidelines for the use of the C language in critical systems\n\nIf necessary, deviations from the guidelines are allowed but must be justified\nand documented by means of inline comments.\n\n### Further style conventions\n\nFurthermore, the style is only loosely defined:\n\nNew added code should use the same style (i.e. \"look similar\") as the already\nexisting code base.\n\nSome remarks on the non-obvious points of this style convention:\n\n* Files are divided into an \"attributes\" and \"operations\" section (just like\n  classes in a UML class diagram)\n* `#include`s are placed in a module’s implementation (`*.c`) file(s), except\n  when they include header files external to the project (e.g. libc) or if a\n  module already uses another project-internal API in its own API (in both\n  exceptional cases those `#include`s are then placed in the module’s header\n  file)\n* Multiple instructions (ending with `;`) within a macro are enclosed in a\n  `do {...} while (false)` loop\n* The limit for line breaks is 80 characters (slight overshoots are acceptable\n  if it increases readability and if used sparingly)\n* Whitespace is inserted after control flow structure keywords (e.g.\n  `if/for/while/switch/return (...)`)\n* Comments\n    * ... can be placed above one or multiple line(s) (code block), addressing\n      all following line(s) until the next empty line or lesser indentation\n      level\n    * ... can be placed at the end of a line, addressing this line only\n    * ... can be placed below a long line with one additional indentation level\n      to address this one long line in a code block where a comment does not\n      fit at the end of the line\n* Far away closing brackets/keywords of control structures are commented to\n  indicate to what they belong (e.g. `#endif /* MODULENAME_H */`)\n* API functions/macros/variables (\"globals\") etc. are prefixed with their\n  module’s (abbreviated) name + `_`;  \n  if the project is intended to be included in another project (e.g. the\n  project is a library or framework), the prefix also starts with up to 3\n  characters that abbreviate the project name\n* Private, file-scope (`static`) variables are prefixed with `pv_`\n* Pointers are prefixed with `p_`\n* Types are suffixed with `_t`\n* In object-oriented code, the pointer argument to an object of a class’\n  function is named `me`\n\n## Workflow\n\nThis project uses a simple topic branch Git workflow.\nThe only permanently existing branches are \"develop\" (development status;\nunstable) and \"master\" (release status; stable).\nNew development efforts are done in separate topic branches, which are then\nmerged into develop once ready.\nFor releases, the \"develop\" branch is then merged into \"master\".\nFast-forward merges are preferred, if possible.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F6arms1leg%2Ftaskuler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F6arms1leg%2Ftaskuler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F6arms1leg%2Ftaskuler/lists"}