Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Ocawesome101

Cynosure 2 - OpenComputers' most Unix-like kernel

Recommended Posts

In September of 2021 I started investigating what it would take to write a LuaPosix compatibility layer for the original ULOS.  While it is indeed possible, ULOS's Cynosure kernel simply wasn't designed around that sort of API—it would at best have required a large amount of work and been difficult to accurately reproduce LuaPosix's behavior.  There were also a few idiosyncrasies with the system as a whole, and it doesn't work on 256KB of memory, which is unfortunate.

Cynosure 2 is my answer to this problem.  Its features include, but are not limited to:

 - Fully pre-emptive multitasking without requiring the `debug` API

 - Full, secure kernel-user separation, complete with removal of the `component` API.

 - Support for full POSIX file permissions, even on regular managed filesystems!

 - System calls performed through `coroutine.yield("syscall", "name", ...)` with no performance overhead.

 - A subset of POSIX standard system calls, some with slightly different behavior to account for Lua's advantages (`ioctl`, `open`) and limitations (`fork`).

 - The fastest VT100 emulator ever written for OpenComputers - comparable in speed to the original Cynosure's, and not limited by a poorly-written buffering library, Cynosure 2's VT100 emulation leaves its competition in the dust.  It's accurate, too - with (almost) all the features of Linux's VT100 emulator!

 - Sessions, process groups, character devices, line disciplines, VT100, oh my!  All the features you'd expect from a Unix-like kernel, implemented the right way.  System calls follow the Linux manual pages as closely as is reasonably possible.

 - True Unix-like multiuser support, with real and effective user and group IDs as well as saved-set-user-and-group-IDs.

DIsclaimer: Cynosure 2 is still in heavy development and not all of these features are fully implemented yet. Please contribute!  Also, yes, just writing the LuaPosix compatibility layer would have been less work, but ULOS 1 had some other idiosyncrasies / weak points - and this was the more fun route :)

You can find Cynosure 2's source code at https://github.com/oc-ulos/oc-cynosure-2.  I'm looking for bug-testers, contributors, and userspace developers.  Join my Discord server for development updates and for any questions/comments/concerns you may have!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.