MLUG: Re: [MLUG] Linux time command -- "kernel mode" and "user mode"
Re: [MLUG] Linux time command -- "kernel mode" and "user mode"
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Matt Klaric wrote:
On 11/3/06, *Stephen Montgomery-Smith* <EMAIL:PROTECTED <mailto:EMAIL:PROTECTED>> wrote:

    The caching you talk of does take place, but actually it takes place in
    just about any decent file-io implementation.  For example, 'printf' in
    C has caching.  It only writes the info to the files once it has
    collected about 128 bytes to write out.  The only function that has the
    possibility to write a byte at a time is the core function 'write' (or
    printf if you first apply the function 'setbuf' which allows you to tune
    the caching behavior).


The behavior of printf (and other higher level output functions) is actually called buffering. Caching describes the process of holding recently and/or frequently accessed information for fast access in case it needs to be retrieved for additional accesses. Buffering is the processes which was described--holding data in a buffer until the buffer is full or it is manually flushed. While both of these allow for more efficient I/O, there is a distinction.


--matt

Yes. You are correct. Sorry.

(Although buffering is all Mike's program needs to make it work efficiently.)

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members