Skip to content
Snippets Groups Projects
  • Nagy Tibor's avatar
    bba6762d
    Various updates and fixes · bba6762d
    Nagy Tibor authored
    * Fix spelling: github -> GitHub, etc.
    * Update the GitHub team list
    * Move `null:` and `zero:` to the userspace schemes
    * Change icons from Oxygen to Faba/Moka
    * Remove statements that TFS is a ZFS implementation
    * Add Intel HDA to the supported hardware
    * Remove the `libredox` guideline
    * Add some outgoing links where I think they're necessary
    bba6762d
    History
    Various updates and fixes
    Nagy Tibor authored
    * Fix spelling: github -> GitHub, etc.
    * Update the GitHub team list
    * Move `null:` and `zero:` to the userspace schemes
    * Change icons from Oxygen to Faba/Moka
    * Remove statements that TFS is a ZFS implementation
    * Add Intel HDA to the supported hardware
    * Remove the `libredox` guideline
    * Add some outgoing links where I think they're necessary

Schemes

Schemes are the natural counter-part to URLs. URLs are opened to schemes, which can then be opened to yield a resource.

Schemes are named such that the kernel is able to uniquely identify them. This name is used in the scheme part of the URL.

Schemes are a generalization of file systems. It should be noted that schemes do not necessarily represent normal files; they are often a "virtual file" (i.e., an abstract unit with certain operations defined on it).

Throughout the whole ecosystem of Redox, schemes are used as the main communication primitive because they are a powerful abstraction. With schemes Redox can have one unified I/O interface.

Schemes can be defined both in user space and in kernel space but when possible user space is preferred.

Kernel Schemes

The kernel provides a small number of schemes in order to support userspace.

Name Description Links
: Root scheme - allows the creation of userspace schemes Docs
debug: Provides access to serial console Docs
event: Allows reading of `Event`s which are registered using fevent Docs
env: Access and modify environmental variables Docs
initfs: Readonly filesystem used for initializing the system Docs
irq: Allows userspace handling of IRQs Docs
pipe: Used internally by the kernel to implement pipe Docs
sys: System information, such as the context list and scheme list Docs

Userspace Schemes

The Redox userspace, starting with initfs:bin/init, will create schemes during initialization. Once the user is able to log in, the following should be established:

Name Daemon Description
disk: ahcid Raw access to disks
display: vesad Screen multiplexing of the display, provides text and graphical screens, used by orbital:
ethernet: ethernetd Raw ethernet frame send/receive, used by ip:
file: redoxfs Root filesystem
ip: ipd Raw IP packet send/receive
network: e1000d
rtl8168d
Link level network send/receive, used by ethernet:
null: nulld Scheme that will discard all writes, and read no bytes
orbital: orbital Windowing system
pty: ptyd Psuedoterminals, used by terminal emulators
rand: randd Psuedo-random number generator
tcp: tcpd TCP sockets
udp: udpd UDP sockets
zero: zerod Scheme that will discard all writes, and always fill read buffers with zeroes

Scheme operations

What makes a scheme a scheme? Scheme operations!

A scheme is just a data structure with certain functions defined on it:

  1. open - open the scheme. open is used for initially starting communication with a scheme; it is an optional method, and will default to returning ENOENT.

  2. mkdir - make a new sub-structure. Note that the name is a little misleading (and it might even be renamed in the future), since in many schemes mkdir won't make a directory, but instead perform some form of substructure creation.

Optional methods include:

  1. unlink - remove a link (that is a binding from one substructure to another).

  2. link - add a link.