freebsd layered with chez-scheme

Polytropon freebsd at edvax.de
Wed Oct 24 14:17:15 UTC 2018


On Tue, 23 Oct 2018 06:04:23 +0000, Mayuresh Kathe wrote:
> would my understanding of systems (as below) be right?
> 
> there's the freebsd kernel which is layered upon with the libc
> and other supporting libraries like libm.
> this combination is layered upon with the userland with code
> in place to provide security?

That's not a very exact characterization (because, for example,
code regarding security exists in many layers, and userland
programs can access both library functions and kernel inter-
faces), but in a general sense, this understanding is correct.



> given the above, would i be right in assuming that a similar
> setup can be used, say with something like chez-scheme to
> provide the userland?
> 
> so essentially, the kernel would be layered with the libraries,
> which would support chez-scheme running in multi-threaded mode.
> then the rest of the userland would be a set of scheme programs.

Basically yes. The boot procedure of such a system would involve
loading the kernel and its modules, and upon completition, the
kernel would finally call init (or a custom equivalent). On
FreeBSD, this initializes single- and eventually multi-user mode.
A init-replacement could use the kernel interfaces too. For
accessing the libraries, there would have to exist some kind
of "ld equivalent" - a program that translates the calls to
library functions to the actual libraries, and calls the 
corresponding object code stored in them.



> obviously, that would not be unix due to it's non-posix nature
> as well as difference in philosophy, but it could be the start
> of something new.

Definitely. There would be some kind of "minimum compatibility"
(in case you don't want to re-implement functionality existing
in the system libraries, such as the libc). You also had to
create the required replacements of typical userland programs.
But you could probably use all the functionality already included
in the FreeBSD kernel, especially the access to device drivers.

If I remember correctly, there was (or still is?) a Linux version
that isn't Linux - it uses a FreeBSD kernel and a GNU userland.
This is of course much easier as Linux uses comparable calling
mechanisms.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list