OSDev.org
https://forum.osdev.org/

Lucy | A POSIX API server for the sel4 microkernel
https://forum.osdev.org/viewtopic.php?f=2&t=32470
Page 1 of 1

Author:  gungomanj [ Wed Oct 04, 2017 5:43 pm ]
Post subject:  Lucy | A POSIX API server for the sel4 microkernel

While reading the documentation of sel4 and some discussion here about how microkernels for a POSIX subsystem are unsuitable, I was curious about if it's possible to write a POSIX API for a microkernel with low overhead and removing the obvious problems such as synchronous calls.

I've come to the conclusion that by giving the POSIX API less control over the execution flow these problems could be solved (the UNIX server behaving asynchronously despite the demands by the POSIX API) preserving the benefits of the microkernel.

I'm going to start with writing a pthreads implementation first but it'll progress into more and more things. I'll have a sample POSIX threads app dynamically linked with liblucy in QEMU and do some benchmarks. The features I have in mind right now:

process isolation
translation of POSIX calls into an optimized form of sel4 calls
emulation of certain UNIX interfaces such as the /dev folder, groups, signals, and other things
IPC management on behalf of the applications

At the end of the day I'm looking for a fast UNIX server that takes over alot of the things that would be done by the POSIX kernel.

Thoughts?

Author:  zaval [ Thu Oct 05, 2017 7:47 am ]
Post subject:  Re: Lucy | A POSIX API server for the sel4 microkernel

Good luck.

I only could say that it's somewhat close to my goals, my plans are to make a POSIX environment subsystem for my NT-like kernel.
It would consist of
1) dynamic libraries implementing posix calls either directly or doing needed preprocessing and passing them farther, to the "default" WinAPI-like subsystem (always on subsystem) libraries, or "native" dll (ntdll.dll).
2) support processes dealing with making the environment look like unix for posix programs. this could involve many tasks I am not even aware of right now.
3) kernel extension driver implementing the needed system services (syscalls) too foreign for NT (fork() or whatever() x^D). as well as kernel part for signals (APC).

NT is highly asynchronous in its nature so I might face similar problems you mentioned. I am planning to make my PussyX (the name :^D) as posix-compliant as possible, but not more. :) It's all dreams for now. *sigh

Author:  OSwhatever [ Thu Oct 05, 2017 3:04 pm ]
Post subject:  Re: Lucy | A POSIX API server for the sel4 microkernel

One thing that might be difficult for some microkernels is the inheritance of resources. As programs rely much on user space services, the access to those services and the associated resources might not be that straight forward as with a monolithic kernel. The services must simply know that a new process is a child of a previous one. QNX supports this but I'm not sure how it is handling the inheritance.

Author:  Korona [ Thu Oct 05, 2017 4:13 pm ]
Post subject:  Re: Lucy | A POSIX API server for the sel4 microkernel

I'm writing a microkernel with a POSIX user space and fully asynchronous drivers (github). Most POSIX calls can easily be translated in the C standard library but others (e.g. ioctls that modify the memory map, create file descriptors or access arbitrary memory) are quite a mess.

I can elaborate on that if I have time. Let me know if you want to know about something specific.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/