[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about translators

From: M. Gerards
Subject: Re: Questions about translators
Date: Mon, 24 Mar 2003 10:58:37 +0100
User-agent: Internet Messaging Program (IMP) 3.1

> 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:

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:

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]