SlideShare a Scribd company logo
By: Sagar Janagonda
Linux Input & Output
Contents
Introduction
What is Device Driver?
Block Structure of Device Driver
Linux Device Driver Classes
References
Introduction
The Input & Output in Linux looks much like it does in any
Unix.
All device drivers appear as a normal files.
Devices can appear as objects in the file system.
System administrator can create special files within a file
system that contains references to a device driver.
Administrator can also set permissions for each device.
Device Driver
Also called as software driver.
Computer program allowing higher-level computer
programs to interact with a device.
Communicates with the device through the computer
bus or communications subsystem to which the
hardware is connected.
Linux device drivers can be built either as parts of the
kernel or separately as loadable modules.
Device Driver Applications
Because of the diversity of modern hardware many
ways exist in which drivers can be used.
• Printers
• Video adapters
• Network cards
• Sound cards
• Scanners and digital cameras etc.
Linux device-oriented file system accesses disk storage
through two caches:
Data is stored in the page cache, which is unified with
the virtual memory system.
Metadata is stored in the buffer cache, a separate cache
indexed by the physical disk block.
Linux splits all devices into three classes:
Block devices allow random access to completely
independent, fixed size blocks of data.
Character devices include most other devices; they don’t
need to support the functionality of regular files.
Network devices are interfaced via the kernel’s
networking subsystem.
Device-Driver Block Structure
SCSI : Small Computer System Interface
Is a set of standards for physically connecting and
transferring data between computers and peripheral
devices.
TTY
Is a Unix Command that prints to standard output the name
of the terminal connected to standard input. The name of
the program comes from teletypewriter.
Line discipline is a layer in the terminal subsystem.
It processes the data it receives from the hardware driver.
Block Devices
Provide the main interface to all disk devices in a system.
Used to store file systems.
The block buffer cache serves two main purposes:
it acts as a pool of buffers for active I/O
Collection of data
it serves as a cache for completed I/O
Fast memory holding copy of data
The request manager manages the reading and writing of
buffer contents to and from a block device driver
e.g. disk drives, CD.
Character Devices
A device driver which does not offer random access to
fixed blocks of data.
A character device driver must register a set of functions
which implement the driver’s various file I/O operations.
The kernel performs almost no preprocessing of a file read
or write request to a character device, but simply passes on
the request to the device.
The main exception to this rule is the special subset of
character device drivers which implement terminal devices,
for which the kernel maintains a standard interface.
e.g. keyboards, mouse, serial ports
Linux io
Character driver usage is done through the corresponding
character device file.
Linked through the virtual file system (VFS).
Application does the usual file operations on the character
device file.
Operations are translated to the corresponding functions in
the linked character device driver.
Those functions then do the final low-level access to the
actual device to achieve the desired results.
Network Devices
Network transaction is made through an interface.
Device that is able to exchange data with other hosts.
Network interface is in charge of sending and
receiving data packets.
Network driver handles packets.
Communication between the kernel and a network
device driver is completely different from that used
with char and block drivers.
Instead of read and write, the kernel calls functions
related to packet transmission.
References
Operating Systems by STEVEN HAND
Operating Systems by ABRAHAM SILBERSCHATZ
http://linuxjournal.com/article/2890
Thank You…!

More Related Content

PDF
RTOS - Real Time Operating Systems
PPTX
Interfacing memory with 8086 microprocessor
PDF
Presentation on linux
PPTX
Learning from imbalanced data
PPTX
Fault tolerance in distributed systems
PPT
RTOS Basic Concepts
PPT
Linux Networking Commands
PDF
Agreement Protocols, distributed File Systems, Distributed Shared Memory
RTOS - Real Time Operating Systems
Interfacing memory with 8086 microprocessor
Presentation on linux
Learning from imbalanced data
Fault tolerance in distributed systems
RTOS Basic Concepts
Linux Networking Commands
Agreement Protocols, distributed File Systems, Distributed Shared Memory

What's hot (20)

PDF
Lecture5 virtualization
PDF
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
PPT
Network servers
PPTX
Heterogeneous computing
PPTX
Case Study - SUN NFS
PPTX
3. CPU virtualization and scheduling
PPTX
Hypervisor
PPTX
CCS335 – CLOUD COMPUTING.pptx
PPTX
DNS server configuration
PPTX
OpenvSwitch Deep Dive
PPT
2.communcation in distributed system
PPTX
PPTX
Understanding the Windows Server Administration Fundamentals (Part-1)
PPT
PPTX
Server virtualization
PPTX
What is Virtualization and its types & Techniques.What is hypervisor and its ...
PPT
Shell and its types in LINUX
PPTX
Linux booting Process
PPTX
Concurrency
PPTX
Virtual Machines - Virtual Box
Lecture5 virtualization
Hypervisors and Virtualization - VMware, Hyper-V, XenServer, and KVM
Network servers
Heterogeneous computing
Case Study - SUN NFS
3. CPU virtualization and scheduling
Hypervisor
CCS335 – CLOUD COMPUTING.pptx
DNS server configuration
OpenvSwitch Deep Dive
2.communcation in distributed system
Understanding the Windows Server Administration Fundamentals (Part-1)
Server virtualization
What is Virtualization and its types & Techniques.What is hypervisor and its ...
Shell and its types in LINUX
Linux booting Process
Concurrency
Virtual Machines - Virtual Box
Ad

Viewers also liked (12)

PPT
Input output in linux
ODP
Memory management in Linux
PDF
Ui disk & terminal drivers
PPT
Chap2 hdd1
PPT
Linux/DB Tuning (DevSumi2010, Japanese)
PPT
Disk scheduling
PPT
Input output systems ppt - cs2411
PPT
Chapter 13 - I/O Systems
PPT
Disk scheduling
PPTX
Device Drivers
PDF
Linux File System
Input output in linux
Memory management in Linux
Ui disk & terminal drivers
Chap2 hdd1
Linux/DB Tuning (DevSumi2010, Japanese)
Disk scheduling
Input output systems ppt - cs2411
Chapter 13 - I/O Systems
Disk scheduling
Device Drivers
Linux File System
Ad

Similar to Linux io (20)

PDF
Driver Programming Report
PPT
Ch07 system administration
PPT
Linux Device Driver,LDD,
PPT
linux device driver
PPT
Linux architecture
ODP
Linux internal
PPT
Linux architecture
PPTX
Device drivers and their applications
PPT
Linux fundamentals Training
PPSX
linux kernel overview 2013
PDF
Solid-State diskA solid-state drive also known as a solid-state di.pdf
PPTX
Introduction to computer
PPT
Network operating systems
PPTX
Essential Knowledge of Computers.pptx
PPSX
Introduction to embedded linux device driver and firmware
PDF
Chapter 1.pdf erre334444433443344444443r
PPT
Ch02
PPTX
DICTIONARY
PPT
Device drivers tsp
DOCX
Technical language
Driver Programming Report
Ch07 system administration
Linux Device Driver,LDD,
linux device driver
Linux architecture
Linux internal
Linux architecture
Device drivers and their applications
Linux fundamentals Training
linux kernel overview 2013
Solid-State diskA solid-state drive also known as a solid-state di.pdf
Introduction to computer
Network operating systems
Essential Knowledge of Computers.pptx
Introduction to embedded linux device driver and firmware
Chapter 1.pdf erre334444433443344444443r
Ch02
DICTIONARY
Device drivers tsp
Technical language

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Modernizing your data center with Dell and AMD
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Digital-Transformation-Roadmap-for-Companies.pptx
cuic standard and advanced reporting.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
NewMind AI Monthly Chronicles - July 2025
NewMind AI Weekly Chronicles - August'25 Week I
Dropbox Q2 2025 Financial Results & Investor Presentation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Understanding_Digital_Forensics_Presentation.pptx
Modernizing your data center with Dell and AMD
Review of recent advances in non-invasive hemoglobin estimation
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Spectral efficient network and resource selection model in 5G networks
Diabetes mellitus diagnosis method based random forest with bat algorithm

Linux io

  • 1. By: Sagar Janagonda Linux Input & Output
  • 2. Contents Introduction What is Device Driver? Block Structure of Device Driver Linux Device Driver Classes References
  • 3. Introduction The Input & Output in Linux looks much like it does in any Unix. All device drivers appear as a normal files. Devices can appear as objects in the file system. System administrator can create special files within a file system that contains references to a device driver. Administrator can also set permissions for each device.
  • 4. Device Driver Also called as software driver. Computer program allowing higher-level computer programs to interact with a device. Communicates with the device through the computer bus or communications subsystem to which the hardware is connected. Linux device drivers can be built either as parts of the kernel or separately as loadable modules.
  • 5. Device Driver Applications Because of the diversity of modern hardware many ways exist in which drivers can be used. • Printers • Video adapters • Network cards • Sound cards • Scanners and digital cameras etc.
  • 6. Linux device-oriented file system accesses disk storage through two caches: Data is stored in the page cache, which is unified with the virtual memory system. Metadata is stored in the buffer cache, a separate cache indexed by the physical disk block.
  • 7. Linux splits all devices into three classes: Block devices allow random access to completely independent, fixed size blocks of data. Character devices include most other devices; they don’t need to support the functionality of regular files. Network devices are interfaced via the kernel’s networking subsystem.
  • 9. SCSI : Small Computer System Interface Is a set of standards for physically connecting and transferring data between computers and peripheral devices. TTY Is a Unix Command that prints to standard output the name of the terminal connected to standard input. The name of the program comes from teletypewriter. Line discipline is a layer in the terminal subsystem. It processes the data it receives from the hardware driver.
  • 10. Block Devices Provide the main interface to all disk devices in a system. Used to store file systems. The block buffer cache serves two main purposes: it acts as a pool of buffers for active I/O Collection of data it serves as a cache for completed I/O Fast memory holding copy of data The request manager manages the reading and writing of buffer contents to and from a block device driver e.g. disk drives, CD.
  • 11. Character Devices A device driver which does not offer random access to fixed blocks of data. A character device driver must register a set of functions which implement the driver’s various file I/O operations. The kernel performs almost no preprocessing of a file read or write request to a character device, but simply passes on the request to the device. The main exception to this rule is the special subset of character device drivers which implement terminal devices, for which the kernel maintains a standard interface. e.g. keyboards, mouse, serial ports
  • 13. Character driver usage is done through the corresponding character device file. Linked through the virtual file system (VFS). Application does the usual file operations on the character device file. Operations are translated to the corresponding functions in the linked character device driver. Those functions then do the final low-level access to the actual device to achieve the desired results.
  • 14. Network Devices Network transaction is made through an interface. Device that is able to exchange data with other hosts. Network interface is in charge of sending and receiving data packets. Network driver handles packets. Communication between the kernel and a network device driver is completely different from that used with char and block drivers. Instead of read and write, the kernel calls functions related to packet transmission.
  • 15. References Operating Systems by STEVEN HAND Operating Systems by ABRAHAM SILBERSCHATZ http://linuxjournal.com/article/2890