God bless Hiran
From: "M. Gerards" <[EMAIL PROTECTED]>
To: Hiran Watson <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Questions about translators
Date: Mon, 24 Mar 2003 10:58:37 +0100
MIME-Version: 1.0
X-Originating-IP: 145.74.169.214
Received: from mail-cn.han.nl ([145.74.66.11]) by mc6-f3.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Mon, 24 Mar 2003 01:58:40 -0800
Received: from vscan-cn.han.nl (charlie.han.nl [145.74.66.9])by mail-cn.han.nl (Postfix) with ESMTPid AC6FF80A1; Mon, 24 Mar 2003 10:58:39 +0100 (CET)
Received: from mail-cn.han.nl (mail-cn.han.nl [145.74.66.11])by vscan-cn.han.nl (Postfix) with ESMTPid 4146917808; Mon, 24 Mar 2003 10:58:39 +0100 (CET)
Received: from mail.han.nl (mail.han.nl [145.74.103.11])by mail-cn.han.nl (Postfix) with ESMTPid EA267807F; Mon, 24 Mar 2003 10:58:38 +0100 (CET)
Received: from india.han.nl (india.han.nl [145.74.103.15])by mail.han.nl (Postfix) with ESMTPid D9F8CC045; Mon, 24 Mar 2003 10:58:38 +0100 (CET)
Received: by india.han.nl (Postfix, from userid 48)id 95AAD7871; Mon, 24 Mar 2003 10:58:38 +0100 (CET)
Received: from 145.74.169.214 ( [145.74.169.214])as user [EMAIL PROTECTED] by webmail.han.nl with HTTP;Mon, 24 Mar 2003 10:58:37 +0100
X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP
Message-ID: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
User-Agent: Internet Messaging Program (IMP) 3.1
X-Virus-Scanned: by AMaViS [EMAIL PROTECTED]
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 24 Mar 2003 09:58:41.0225 (UTC) FILETIME=[F2C2B390:01C2F1EB]
> Secondly, what happens when an end-user app makes a system call (ie, open
> some file, or read, or write, etc.)? Does the call get caught by the kernel
> which passes it onto the appropriate server? If so, then the layers would be
>
> end-user apps on top; they're connected to the kernel; and the kernel is
> connected to the servers; and finally the servers are connected to physical
> hardware? If so, what about servers that don't actually mess with hardware?
Mach is used for communication with the server. Ports are used for IPC and
messages can be passed around using systemcalls. So the kernel is only used for
communication, it does not understand what is in the messages.
When a program is started it gets a few portright from its parent, for example
the port of the root filesystem. This port can be used to access files and
other stuff like the socket servers.
The interface for the filesystem is defined here: http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/hurd/hurd/hurd/fs.defs
The routine dir_lookup is used to lookup a file. A port right is returned by this routine to access the file.
The interface for IO is defined here: http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/hurd/hurd/hurd/io.defs
All these operations can be implemented for files, for example io_read.
Every server can implement more interfaces. This is used for sockets, the password server, etc.
If the filesystem wants to read a block from disk currently mach is used. Mach
has interfaces that can be used for hardware access. In the future, when L4 is
used instead of Mach this will be done in userspace too :)
Perhaps I made some mistakes(like mach terminoligy), but this is how it generally works :). I don't implement servers directly on mach, the Hurd has some cool libraries that made me lazy ;). Feel free to ask more questions if something is not clear yet.
--
Marco
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
_______________________________________________ Help-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-hurd
