OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Jan 17, 2018 7:13 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Lucy | A POSIX API server for the sel4 microkernel
PostPosted: Wed Oct 04, 2017 5:43 pm 
Offline

Joined: Sun Apr 23, 2017 4:41 am
Posts: 23
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?


Top
 Profile  
 
 Post subject: Re: Lucy | A POSIX API server for the sel4 microkernel
PostPosted: Thu Oct 05, 2017 7:47 am 
Offline
Member
Member
User avatar

Joined: Fri Feb 17, 2017 4:01 pm
Posts: 230
Location: Ukraine, Bachmut
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

_________________
future big goal: ANT - NT-like OS for mips, arm and x86.
current smaller goal: efify - UEFI for a couple of boards (mips and arm).


Top
 Profile  
 
 Post subject: Re: Lucy | A POSIX API server for the sel4 microkernel
PostPosted: Thu Oct 05, 2017 3:04 pm 
Offline
Member
Member

Joined: Mon Jul 05, 2010 4:15 pm
Posts: 504
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.


Top
 Profile  
 
 Post subject: Re: Lucy | A POSIX API server for the sel4 microkernel
PostPosted: Thu Oct 05, 2017 4:13 pm 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 424
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group