Noob Query : About RAM Disks
Hi,
I have been reading up about RAM Disks, but I don't seem to understand
how interrupts are generated for these. I mean, considering block
io(maybe I am wrong in this assumption), given a situation that the
IO(writing specifically) is done, how does, lets say the FS routines,
know of that completion? Who sends them the interrupt?
Thanks, Draw
PS: If you think I am asking a question that has been answered in
articles elsewhere, please give me links to those, would really
appreciate it.
Re: Noob Query : About RAM Disks
Draw wrote:
[color=blue]
> I have been reading up about RAM Disks, but I don't seem to understand
> how interrupts are generated for these.[/color]
They aren't. You only need an interrupt when a hardware operation might
complete or begin at an arbtirary future point in time.
[color=blue]
> I mean, considering block
> io(maybe I am wrong in this assumption), given a situation that the
> IO(writing specifically) is done, how does, lets say the FS routines,
> know of that completion? Who sends them the interrupt?[/color]
The writing routines know of the completion because they complete. It's
not like a disk where the writing routines tell the disk to do the
write and the disk finishes (or accepts) the request later. As soon as
they finish doing the write, they're done. There's nothing to notify
them of.
If for some reason the write is done by another thread or "in the
background", the code that completes the write can signal other code
using a mechanism that has the same effect as an interrupt. But I don't
see why this would be necessary because there's really no reason to
wait for the write to complete.
DS
Re: Noob Query : About RAM Disks
On 13 Oct 2006 10:23:37 -0700 Draw <drawoh@rediffmail.com> wrote:
| I have been reading up about RAM Disks, but I don't seem to understand
| how interrupts are generated for these. I mean, considering block
| io(maybe I am wrong in this assumption), given a situation that the
| IO(writing specifically) is done, how does, lets say the FS routines,
| know of that completion? Who sends them the interrupt?
RAM disk is simulated by software. The software gets called to write
to the "disk", copies the data into the RAM location the simulated disk
is in, then returns to the caller. When it's done, it's done.
--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / [email]spamtrap-2006-10-13-1514@ipal.net[/email] |
|------------------------------------/-------------------------------------|