All of lore.kernel.org
 help / color / mirror / Atom feed
* OS I/O operations concepts
@ 2004-12-15 21:10 tony osborne
  2004-12-15 22:54 ` Kyle Moffett
  2004-12-16  8:25 ` Martin Waitz
  0 siblings, 2 replies; 3+ messages in thread
From: tony osborne @ 2004-12-15 21:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: tonyosborne_a

Hello,

I wish to be personally CC'ed the answers/comments posted to the list in 
response to this post

I have some questions regarding the I/O file operations efficiency.

1-)
Consider I/O operations involving the disk. Assume that I write periodically 
one Byte in the file after executing one processing block of code. Does this 
mean that at each of these periods, that only Byte will be stored in the 
disk despite its slow access time, or instead it will be stored in the 
memory buffer (of what size?) first then moved into the disk once the buffer 
is full?

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.

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

(I am taking Java only as an example, same hold for C++ and othe r 
languages)


I have read also that writing and reading should be done on chunks of 256 
(512,1024) bytes since the disk sector is of this size. Should I specify 
explicitly the buffer size or will it be handled automatically by the JVM or 
OS?

Say I have a stream of X bytes, should write it into the disk per once, or 
instead repetitively on X/256 bytes size ?


2-)
I/O controller privileges

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

will the driver code be loaded at the top of the kernel code adress space on 
the memory?


3-)   asyncronous I/O operations

i am looking for good tutorial on how asynchrnous I/O operations is 
implemented by OS?
will there be re-ordering of the code sequence execution


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


thanks for your assistance

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo


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

end of thread, other threads:[~2004-12-16  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-15 21:10 OS I/O operations concepts tony osborne
2004-12-15 22:54 ` Kyle Moffett
2004-12-16  8:25 ` Martin Waitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.