Logical I/O provides a general purpose record I/O capability and maintains basic data about files. Searching the Web (Microsoft Web site) describe the I/O operations in Microsoft Windows 7.
Logical I/O is an I/O which enables its users and applications to access records. It provides a general purpose record I/O capability and also maintains basic data about the files. It is a very efficient I/O to maintain data about files. Its access method is the closest to the user and reflects different file structures. It provides a standard interface between applications and the file systems and the devices which hold the data. There are various kinds of access methods vary depending on the way to access and process data for the device.
It is a well structured I/O and The file organisation and access has file directories, file sharing, record blocking secondary storage management, file system security, Unix file management, Linux virtual file system and windows file system .There are various types of file organisation. Some are discussed in brief below:
Pile: In this type, there is no particular structure, and the data is collected in the order it arrives. He main purpose is to accumulate a mass of data and then save it. The record access is by exhaustive search and the records may have different fields as well.
Sequential file: In this type of file organisation, certain fixed formats are used for records which are of the same length. All fields are the same and field names and lengths are the attributes of the file. The records are stored in key sequence and it uniquely identifies the record.
Indexed Sequential File: This maintains the key characteristic of the sequential file wherein the records are organized in sequence based on a key field. It has an index to the file to support random access and has an over flow file.
Indexed File: It uses multiple indexes for different key fields. It may contain an exhaustive index that contains one entry for every record in the main file. It may contain a partial index. When a new record is added to the main file, all of the index files must be updated.
Direct or hashed file: This directly accesses a block at a known address. Key field is required for each record.
File management refers to the logical structure of records. It is determined by the way in which files are accessed. There are various criteria for while organisation some of which are mentioned below:
- Short access time
- Ease of update
- Economy of storage
- Simple maintenance
The priority shall differ depending on the usage and some may even conflict with each other. As can be seen, logical I/O is very efficient in file organization and management. It maintains a clear file record and access system which facilitates its users.
Windows 7 offer two modes of I/O operations:
Asynchronous: This is more efficient in terms of calling thread, as it allows the thread to continue execution while the I/O operation is lined up by the I/O manager and then it is subsequently performed. However, the application which invoked this operation needs some way to determine when the operation is complete. This mode is particularly used whenever possible to optimize application performance. In this, an application initiates an I/O operation and then can continue processing while the I/O request is fulfilled.
Synchronous: In this I/O, the application is blocked until the I/O operation completes and this way it is different from the asynchronous I/O.
Windows provides the following four different techniques for signalling I/O completion:
1) Signalling a device kernel object
2) Signalling an event kernel object,
3) Alterable I/O and
4) I/O completion ports.
Also, in Windows 7, a reflector creates the following 3 types of the device objects:
- Up device object— this is at top of the kernel mode stack made for device & thus is the reflector’s target for IRPs from the I/O manager. When an IRP arrives, the reflector uses interposes communications to forward it to the User Mode Driver host process, in which the framework and driver run. UMDF interprets the request and calls methods in the driver’s event call-back interfaces to handle it. The reflector creates an up device object for each device stack in which it participates.
- Down device object—this is the reflector’s target for I/O requests that originate in the User Mode Driver and is therefore the default I/O target for the bottom driver in the user mode device stack. A User Mode Driver might issue an I/O request to perform a device I/O control operation on its own device or to retrieve data from another device to complete one of its own requests. The reflector creates a down device object for each stack in which it participates.
- Control device object—this manages I/O requests to and from the driver manager, which are not part of the normal I/O flow to the driver. Instead, the control device object enables “sideband” I/O between the reflector and the driver manager, which is independent of the normal flow of I/O, power management, and Plug and Play requests. The reflector creates only one control device object per system.
William Stallings. Operating systems: Internals and Design Principles, 6/E,: File Management
The windows operating systems: William Stallings
Microsoft website: Technical details about Windows 7.