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

Re: Receiving Network Packets with Mirage/kFreeBSD



On Sun, Aug 19, 2012 at 07:19:00PM +0100, Richard Mortier wrote:
> out of curiosity, and from a *very* naive viewpoint [..], how applicable
> would the same structures be to supporting disk/other io access?

As far as I know [1], handling I/O is implemented by two asynchronous halves
in the kernel.  The lower half sits on interrupt services and places the
received data in (per-device) queues.  In parallel with this, the upper half
reads the shared queues and processes their elements.  (Sending data is just
the opposite.)

In this particular case, the lower half is implemented in C while the upper
half is in OCaml.  I do not see any difficulties in adapting this to other
I/O devices, but Robert or Anil may prove me wrong :-)


[1] Section 6.1, Design and Implementation of the FreeBSD Operating System
    (1st Ed.)



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.