{"id":16131522,"url":"https://github.com/rubenwardy/rubix_kernel","last_synced_at":"2025-03-18T14:31:18.849Z","repository":{"id":148156938,"uuid":"84848762","full_name":"rubenwardy/rubix_kernel","owner":"rubenwardy","description":"A simple kernel for ARMv7","archived":false,"fork":false,"pushed_at":"2018-06-06T22:37:25.000Z","size":292,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T10:09:18.505Z","etag":null,"topics":["filesystem","kernel","posix"],"latest_commit_sha":null,"homepage":"https://blog.rubenwardy.com/2018/04/05/simple-kernel-in-c/","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubenwardy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-03-13T16:22:10.000Z","updated_at":"2020-12-22T17:48:15.000Z","dependencies_parsed_at":"2023-05-19T08:15:07.483Z","dependency_job_id":null,"html_url":"https://github.com/rubenwardy/rubix_kernel","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenwardy%2Frubix_kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenwardy%2Frubix_kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenwardy%2Frubix_kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenwardy%2Frubix_kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubenwardy","download_url":"https://codeload.github.com/rubenwardy/rubix_kernel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933431,"owners_count":20370986,"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":["filesystem","kernel","posix"],"created_at":"2024-10-09T22:25:31.028Z","updated_at":"2025-03-18T14:31:18.841Z","avatar_url":"https://github.com/rubenwardy.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rubix OS\n\n## Features\n\n* SYS Calls\n\t* `yield` - ends the current time slice.\n\t* `write` - writes to an open file descriptor.\n\t* `read`  - reads from an file descriptor. Returns length of read, 0 on EOF.\n\t            May blocking - see `set_nonblocking`.\n\t* `close` - closes a file descriptor.\n\t* `dup2`  - duplicates fd from `old` to `new`. `new` is closed if it already exists.\n\t* `pipe`  - creates a pipe. fd[0] is read, fd[1] is write.\n\t* `fopen` - open file. Not quite POSIX, as it's non-blocking\n\t* `fork`  - clones process.\n\t            Return value is 0 if child, PID of child if parent, -1 if error.\n\t* `exec`  - replaces the process with another program. PID is kept.\n\t            Stack and FDs (except in/out/err) are destroyed.\n\t* `exit`  - exits with exit code.\n\t* `wait`  - waits for a child program to exit, and gives exit code.\n\t* `kill`  - sends a kill signal to a process. Killed processes will not return an exit code.\n\t            `signal` is not yet implemented.\n\t* `setpriority` - set priority of child process.\n\t* `set_nonblocking` - is not POSIX, unfortunately. Set pipe non-blocking.\n* LibC help functions\n\t* `popen` - opens a process and returns a FD. Uses `fork`, `pipe`, `exec`, and `dup2`.\n\t* `wait`/`waitpid` - both use the `wait` syscall.\n* Processe\n\t* **time slicing**      - timer based timer slices.\n\t* **priority-based**    - priority(P) = priority_base(P) + slices_since_last_ran(P)\n\t* **blocked queue**     - for processes waiting for a process or file resource.\n\t* **process ownership** - processes have a parent, which can kill/wait them.\n\t* **process groups**    - a limited type of process group, where all processes\n\t                          that share a parent and the parent itself are in a group.\n* Files\n\t* `FiDes` - File descriptor. Interacted with using function pointers. Can be blocking or not.\n\t* `pipe`  - Pointed to by a FD.\n\t* `in/out/err` - these are \"files\" too!\n\t* `filesystem` - Files are limited to 256 bytes, maximum of 10 files.\n\n## References\n\nAll references access March 2017.\n\n### Online\n\n* [Linux Man-pages](http://man7.org/linux/man-pages/). Various. man7.org\n* [Wait sys call](http://pubs.opengroup.org/onlinepubs/000095399/functions/waitpid.html). The Open Group. pubs.opengroup.org\n* [Exit sys call](http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html). The Open Group. pubs.opengroup.org\n* [POSIX IPC](https://docs.oracle.com/cd/E19455-01/806-4750/6jdqdfltf/index.html). Oracle. docs.oracle.com\n* [Linux Interprocess Communications](http://tldp.org/LDP/lpg/node7.html). Goldt. S, Van der Meer. S, Welsh. M. tldp.org\n* [Interprocess Communication (IPC), Pipes](https://users.cs.cf.ac.uk/Dave.Marshall/C/node23.html). Marshall, D. Users.cs.cf.ac.uk\n* [General overview of the Linux file system](http://www.tldp.org/LDP/intro-linux/html/sect_03_01.html). Machtelt. G. tldp.org\n\n### Print\n\n* Cormen. T, Leiserson. C, Rivest. R, Stein. C. *Introduction to Algorithms 3rd Edition*,  (Massachusetts Institute of Technology, 2009) Heapsort and Priority Queues. pp151-166\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenwardy%2Frubix_kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubenwardy%2Frubix_kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenwardy%2Frubix_kernel/lists"}