UNIX Files - PowerPoint PPT Presentation

UNIX Files. How UNIX Sees and Uses Files. I/O: UNIX approach. The basic model of the UNIX I/O system is a sequence of bytes that can be accessed either randomly or sequentially.

Copyright Complaint Adult Content Flag as Inappropriate

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Presentation

PowerPoint Slideshow about ' UNIX Files' - jeff

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

The basic model of the UNIX I/O system is a sequence of bytes that can be accessed either randomly or sequentially.

The UNIX kernel uses a single data model, byte stream, to serve all applications. It imposes no structure on the data but instead views it as a stream of bytes. Put another way, everything to the kernel is a stream of bytes – stream I/O.

As a result an I/O stream from one program can be fed as input to any other program;

Pipelines can be formed between processes for exchanging data.

Applications may impose various levels of structure for their data, but the kernel imposes no structure on I/O.

Example: ASCII text editors process documents consisting of lines of characters where each line is terminated by ASCII line-feed character. Kernel knows nothing about this convention

Internal implementation is based on the notion of block, a minimal group of bytes that can be transferred in one operation to and from the device.

A number of blocks can be transferred in one operation (for effiiciency), but less then block bytes of data is not transferred.

To user application, the block structure of the device is transparent through internal buffering being done in kernel. User process may read/write a single byte because it works with I/O stream abstraction