Professional Documents
Culture Documents
SS Moudle1
SS Moudle1
What is meant by input buffering? Write an algorithm for look ahead code
with sentinels.
The method of reading a block of characters (1K or 4K or more bytes) from the
disk in one read operation and storing in memory (normally in the form of an
array) for further processing and faster accessing is called input buffering.
Size of each buffer is N. N is usually the size of a disk block, eg., 4096 bytes.
One system read command can be used to read N characters into a buffer,
instead of using one system call per character.
Here, buffer end test can be done by using sentinel character at the end of the
buffer. Eof is sentinel character
\