Kernel I/O subsystem
-
Upload
atika-bhatti -
Category
Presentations & Public Speaking
-
view
1.371 -
download
0
Transcript of Kernel I/O subsystem
Kernel I/O SubsystemBy
Aatiqa Bint e Ghazali(2298-BSSEF13-A)Jaweria Khalid
(2272-Bssesf13A)
What we are going to discuss??? Define kernel. I/O Services provided by kernel. Data structures in I/O subsystems. Illustration via diagrams.
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.
Kernel I/O Subsystem
Scheduling
Buffering Caching Spooling
Device reservation
Error handling
I/O protection
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.
Divice-status table
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”.
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.
.
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.
Device reservation provides exclusive access to a
device• System calls for allocation and de-allocation
• Watch out for deadlock
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
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.
Use of a System Call to Perform I/O
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 ,
KERNEL I/O SUB SYSTEM
THANK YOU FOR YOUR ATTENTIONANY QUESTIONS ????