From owner-freebsd-questions@freebsd.org Wed Oct 24 14:17:15 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28482FEB35F for ; Wed, 24 Oct 2018 14:17:15 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96BA593E8A for ; Wed, 24 Oct 2018 14:17:14 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.193.180.181]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPA (Nemesis) id 1MWSFB-1g51570Bx5-00XpgC; Wed, 24 Oct 2018 16:17:06 +0200 Received: from r56.edvax.de ([92.193.180.181]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPA (Nemesis) id 1MWSFB-1g51570Bx5-00XpgC; Wed, 24 Oct 2018 16:17:06 +0200 Date: Wed, 24 Oct 2018 16:17:05 +0200 From: Polytropon To: mayuresh@kathe.in Cc: freebsd-questions@freebsd.org Subject: Re: freebsd layered with chez-scheme Message-Id: <20181024161705.669e999e.freebsd@edvax.de> In-Reply-To: <142be589bc88406eeeade749b72d765f@kathe.in> References: <142be589bc88406eeeade749b72d765f@kathe.in> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:lhnYK64V4T70kabEi7vbRD7KiaV1MT28jdgKuzvIK+tQZTXwnz6 ULd0CU5CzjYQaGZJEAR54Hs5xwhoWcw/5JK6k/ru6fFrdF/I8HQu0GJ/oHQ2Wy8DUpBZiM8 MCOi1jJ3EmqZocza5+X5FJTQE1O1dfyyahhpKiIKr444+MZ2Jf16yEqRawndW9JbRcjVHlH ET6hxZiorllzz8nWuHceQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V01:K0:RYu8oEpUVb8=:xogun07YqDI5P+kkPkdq/y 0dPTMD9KKWW9vvxrQXpxoE9yXnrN9uW7cGaCD5GvkeBW5IaRXzANyAWKeCGblcfYpBnx/Dnp2 X87vtAHCqwaixqhUvY4Y9CpVButUa3eeS/a7WtzmfgKEvWk1mETM85MfHKSF3uyvQrvO0wZZ1 9v7GdIc01KIrX59cXK9zhhdMisUk991bOAuKmY7OIf2crWeq7CDs5rHc3/B7E8fqGyPCTLof3 LbIjHFa7SB8h9hfZPzLcDHaYr9UibhWqhdX4jKy8CbcERukOUWdOR+82op0+IVZ4gy+XSYb3I 0MdNnOcJhCZPLy7VDC+Iv+g16ykRbv638ukYDGAUc3AR3NQZh/yhxWoFGfblo18E9i8R4VApS cKlxy/CDtWovBYK5QOY/zFS4gCDL7W+TSrAp7YJhuoZDnmaM3Ebvgzi1Nd4jSKQjHxs5r9xSl WuIa63WbJzEt6op3dfVbHLy1l4CLWR9QVocRiECLV0BHRPag4tf17Cw4/wbVcKTxEAr76mR7u XsgZ7DBahhplB3AQ8ej9dqO/8vUZqghUJPFawuP8+pEr+ynt8aNHUJJWEkFIwwL40gYM3PkY+ FPDRIXAl/Hx17M/56Jiizlm3/EvPb9CP3P8gkuFGq/2xwgtyjHxMcs4nNg0HDQgEYsKJebXaS g6q/WSkDb1tPPbiBhXpQZMgm5aTNfuaN4RuIDQdvKYDxa3Ie33SGtBRjc9L92zERl5+2Usdrc PnHcz+Q+mx/uELlw X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 14:17:15 -0000 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, ...