lkml.org 
[lkml]   [2004]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: OS I/O operations concepts
hoi :)

On Wed, Dec 15, 2004 at 09:10:03PM +0000, tony osborne wrote:
> What about the disk bitmap and the one loaded into the memory. Will this be
> updated at each Byte write operation? This will slow down extremely the
> system speed.

no, all data is first written into the buffer cache and will be written
to disk later.

> Should the programmer force the second option (by using BufferOutputStream
> as in java) or is it done automatically by the JVM or OS?

Writing single bytes can be slow because of another reason:
system calls are expensive and it makes sense to buffer data in the
application and send it to the operating system in one big system call.

> Does the I/O controller (once the device driver installed) full privileges
> as the main CPU when on kernel mode?

I'm not sure if i understood your question correctly but yes,
The IO Controller has full access to physical memory through DMA.

> is Java system.in.read (system.out.println) synchronous or asynchronous I/O
> Op

They are synchronous. Otherwise you couldn't access your data at the
moment read() returns.

--
Martin Waitz
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.034 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site