Go to file
rubenwardy 6d84645fec WIP 2018-04-10 19:57:02 +01:00
device Initial Commit 2017-03-13 16:22:39 +00:00
kernel Correct include, fix QEMU bug 2017-07-15 00:11:32 +01:00
tests WIP 2018-04-10 19:57:02 +01:00
user WIP 2018-04-10 19:57:02 +01:00
.gitattributes Add .gitattributes 2017-05-27 03:03:47 +01:00
.gitignore Remove and ignore image.bin 2017-03-24 02:12:20 +00:00
Makefile WIP 2018-04-10 19:57:02 +01:00
Makefile.console Initial Commit 2017-03-13 16:22:39 +00:00
Makefile.disk Increase block size to 256 2017-03-31 13:16:09 +01:00
README.md Clean things up for better presentation 2017-03-31 16:29:51 +01:00
image.ld Add non-blocking file descriptors, increase max resources 2017-03-30 14:47:26 +01:00

README.md

Rubix OS

Features

  • SYS Calls
    • yield - ends the current time slice.
    • write - writes to an open file descriptor.
    • read - reads from an file descriptor. Returns length of read, 0 on EOF. May blocking - see set_nonblocking.
    • close - closes a file descriptor.
    • dup2 - duplicates fd from old to new. new is closed if it already exists.
    • pipe - creates a pipe. fd[0] is read, fd[1] is write.
    • fopen - open file. Not quite POSIX, as it's non-blocking
    • fork - clones process. Return value is 0 if child, PID of child if parent, -1 if error.
    • exec - replaces the process with another program. PID is kept. Stack and FDs (except in/out/err) are destroyed.
    • exit - exits with exit code.
    • wait - waits for a child program to exit, and gives exit code.
    • kill - sends a kill signal to a process. Killed processes will not return an exit code. signal is not yet implemented.
    • setpriority - set priority of child process.
    • set_nonblocking - is not POSIX, unfortunately. Set pipe non-blocking.
  • LibC help functions
    • popen - opens a process and returns a FD. Uses fork, pipe, exec, and dup2.
    • wait/waitpid - both use the wait syscall.
  • Processe
    • time slicing - timer based timer slices.
    • priority-based - priority(P) = priority_base(P) + slices_since_last_ran(P)
    • blocked queue - for processes waiting for a process or file resource.
    • process ownership - processes have a parent, which can kill/wait them.
    • process groups - a limited type of process group, where all processes that share a parent and the parent itself are in a group.
  • Files
    • FiDes - File descriptor. Interacted with using function pointers. Can be blocking or not.
    • pipe - Pointed to by a FD.
    • in/out/err - these are "files" too!
    • filesystem - Files are limited to 256 bytes, maximum of 10 files.

References

All references access March 2017.

Online

Print

  • Cormen. T, Leiserson. C, Rivest. R, Stein. C. Introduction to Algorithms 3rd Edition, (Massachusetts Institute of Technology, 2009) Heapsort and Priority Queues. pp151-166