9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Re: 9P, procedure calls, kernel, confusion. :(
@ 2008-02-05 13:43 Anant Narayanan
  2008-02-05 14:22 ` erik quanstrom
  0 siblings, 1 reply; 7+ messages in thread
From: Anant Narayanan @ 2008-02-05 13:43 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hi,

> One more point, I googled a lot on "kernel resident file systems and
> non kernel resident file systems", but I could not find a single
> useful link. It would be great if you could specify the difference
> between the two. I wish that eases up the situation a bit.

I don't claim to know much about how 9P or Plan 9 work, but I will
attempt to answer.

9P is very much like Linux's VFS. It defines how user-space
applications can access files; whether they are stored locally, or on
the network, or whether the information is generated on-the-fly by the
kernel from its internal data-structures is of no consequence - 9P
abstracts all that.

Accessing files from within the kernel is a different ball-game
(that's true for every kernel). Since you don't have the 9P style
access anymore - The 'Dev' structure essentially replaces it. These
structures point to methods are quite analogous to the 9P operations.
The methods do the work of implementing the file operations - and
these would all be different for files depending on whether they are
stored on local disk, produced synthetically or accessed over a
network. This makes it easier to work with files in the kernel since
all the operations are delegated further to the 'Dev' structures, each
one doing what it knows best; quite similar to what happens with 9P in
user-space.

Charles mentions one such 'Dev', the mount driver, which merely passes
on the received request as 9P messages to the file descriptor
(possibly connected to a remote 9P server).

"Kernel resident filesystem" in this context simply means a filesystem
which was created for use by the kernel; this may or may not be
visible to user-space applications - I'm not too sure. To sum up, you
use the 9 primitive operations provided by each 'Dev' when you work
with kernel-resident filesystems, while all other filesystems are
dealt with using regular 9P.

I hope I'm right, and that this helps.

--
Anant


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [9fans] 9P, procedure calls, kernel, confusion. :(
@ 2008-02-05  9:56 Siddhant
  2008-02-05 12:59 ` [9fans] " Siddhant
  0 siblings, 1 reply; 7+ messages in thread
From: Siddhant @ 2008-02-05  9:56 UTC (permalink / raw)
  To: 9fans

Greetings!
I have started reading this documentation of plan9, the main paper.
And I am stuck at one point. It would be really kind if someone could
answer these questions, however silly they might look. :)

>>>" for each fid, the kernel maintains a local representation in a data structure called a channel, so all operations on files performed by the kernel involve a channel connected to that fid"
Q. Can I visualise it like a fid connected to channels which define
operations within them? How exactly can I visualise this 'channel'?

>>>"9P has two forms: RPC messages sent on a pipe or network connection and a procedural interface within the kernel. Since kernel device drivers are directly addressable, there is no need to pass messages to communicate with them; instead each 9P transaction is implemented by a direct procedure call."
Q. Does it mean that every RPC message essentially has to end up being
implemented via that procedural interface?

>>>"A table in the kernel provides a list of entry points corresponding one to one with the 9P messages for each device."
Q. Can I relate this 'table in the kernel' to the 'representation in a
data structure called a channel'? And does 'for each device' refer to
individual fids? Moreover, I am totally confused between the
'conversions' between 9P messages, procedure calls, system calls and
operations on fids. What is being converted to what, and when, and
how.

I'd really appreciate if someone could take time out and reply.
Thanks.
Regards,
Siddhant


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-02-06  9:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-05 13:43 [9fans] Re: 9P, procedure calls, kernel, confusion. :( Anant Narayanan
2008-02-05 14:22 ` erik quanstrom
2008-02-05 15:18   ` roger peppe
  -- strict thread matches above, loose matches on Subject: below --
2008-02-05  9:56 [9fans] " Siddhant
2008-02-05 12:59 ` [9fans] " Siddhant
2008-02-05 16:41   ` Charles Forsyth
2008-02-05 16:35     ` erik quanstrom
2008-02-06  9:45     ` Siddhant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).