16
Kernel I/O Subsystem By Aatiqa Bint e Ghazali(2298-BSSEF13-A) Jaweria Khalid (2272-Bssesf13A)

Kernel I/O subsystem

Embed Size (px)

Citation preview

Page 1: Kernel I/O subsystem

Kernel I/O SubsystemBy

Aatiqa Bint e Ghazali(2298-BSSEF13-A)Jaweria Khalid

(2272-Bssesf13A)

Page 2: Kernel I/O subsystem

What we are going to discuss??? Define kernel. I/O Services provided by kernel. Data structures in I/O subsystems. Illustration via diagrams.

Page 3: Kernel I/O subsystem

What is kernel ?

The essential center of a computer operating system, the core that provides basic services for all other parts of the operating system.

Page 4: Kernel I/O subsystem

Kernel I/O Subsystem

Scheduling

Buffering Caching Spooling

Device reservation

Error handling

I/O protection

Page 5: Kernel I/O subsystem

I/O scheduling It means to determine a good order

in which to execute input/output.

Often called disk scheduling.

Scheduling I/O requests can greatly improve overall efficiency. Priorities can also play a part in request scheduling.

Page 6: Kernel I/O subsystem

Divice-status table

Page 7: Kernel I/O subsystem

Buffering

store data in memory while transferring between devices.

Buffering is done for three reasons :• To cope with device speed mismatch.• To cope with device transfer size

mismatch.• To maintain “copy semantics”.

Page 8: Kernel I/O subsystem

Caching Caching involves keeping a copy of

data in faster access location than where the data is normally stored.

Buffering and caching are very similar, except that a buffer may hold the only copy of a given data item, whereas a cache is just a duplicate copy of some other data stored elsewhere.

.

Page 9: Kernel I/O subsystem

Spooling hold output for a device such as a

printer that cannot accept interleaved data streams.

In a device that can serve one request at time.

Page 10: Kernel I/O subsystem

Device reservation provides exclusive access to a

device• System calls for allocation and de-allocation

• Watch out for deadlock

Page 11: Kernel I/O subsystem

Error Handling...

OS can recover from disk read , device unavailable, transient write(when a buffer becomes overloaded) failures.

Most return an error number or code when I/O request fails

System error logs hold problem reports

Page 12: Kernel I/O subsystem

I/O protection User process may accidentally or

purposefully attempt to disrupt normal operation via illegal I/O instructions .

To prevent user from doing so• All I/O instructions defined to be privileged• I/O must be performed via system calls.

Page 13: Kernel I/O subsystem

Use of a System Call to Perform I/O

Page 14: Kernel I/O subsystem

Kernel Data Structures..

The kernel needs to keep state information about the use of I/O components .It does so through a variety of in-kernel data structures such as open file table .The kernel uses similar structures to track network connections, character-device communications and other I/O activities ,

Page 15: Kernel I/O subsystem

KERNEL I/O SUB SYSTEM

Page 16: Kernel I/O subsystem

THANK YOU FOR YOUR ATTENTIONANY QUESTIONS ????