0% found this document useful (0 votes)
18 views1 page

ch01 5

The document discusses different aspects of an operating system kernel including device control, networking, loadable modules, and classes of devices and modules. Device control and networking are core functions managed by the kernel. The kernel can also be extended at runtime through loadable modules to add or remove functionality. Modules fall into different classes like char, block, or network modules depending on the type of device or functionality they provide.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views1 page

ch01 5

The document discusses different aspects of an operating system kernel including device control, networking, loadable modules, and classes of devices and modules. Device control and networking are core functions managed by the kernel. The kernel can also be extended at runtime through loadable modules to add or remove functionality. Modules fall into different classes like char, block, or network modules depending on the type of device or functionality they provide.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

,ch01.

2168 Page 5 Thursday, January 20, 2005 9:21 AM

Device control
Almost every system operation eventually maps to a physical device. With the
exception of the processor, memory, and a very few other entities, any and all
device control operations are performed by code that is specific to the device
being addressed. That code is called a device driver. The kernel must have
embedded in it a device driver for every peripheral present on a system, from the
hard drive to the keyboard and the tape drive. This aspect of the kernel’s func-
tions is our primary interest in this book.
Networking
Networking must be managed by the operating system, because most network
operations are not specific to a process: incoming packets are asynchronous
events. The packets must be collected, identified, and dispatched before a pro-
cess takes care of them. The system is in charge of delivering data packets across
program and network interfaces, and it must control the execution of programs
according to their network activity. Additionally, all the routing and address res-
olution issues are implemented within the kernel.

Loadable Modules
One of the good features of Linux is the ability to extend at runtime the set of fea-
tures offered by the kernel. This means that you can add functionality to the kernel
(and remove functionality as well) while the system is up and running.
Each piece of code that can be added to the kernel at runtime is called a module. The
Linux kernel offers support for quite a few different types (or classes) of modules,
including, but not limited to, device drivers. Each module is made up of object code
(not linked into a complete executable) that can be dynamically linked to the run-
ning kernel by the insmod program and can be unlinked by the rmmod program.
Figure 1-1 identifies different classes of modules in charge of specific tasks—a mod-
ule is said to belong to a specific class according to the functionality it offers. The
placement of modules in Figure 1-1 covers the most important classes, but is far from
complete because more and more functionality in Linux is being modularized.

Classes of Devices and Modules


The Linux way of looking at devices distinguishes between three fundamental device
types. Each module usually implements one of these types, and thus is classifiable as a
char module, a block module, or a network module. This division of modules into dif-
ferent types, or classes, is not a rigid one; the programmer can choose to build huge
modules implementing different drivers in a single chunk of code. Good program-
mers, nonetheless, usually create a different module for each new functionality they
implement, because decomposition is a key element of scalability and extendability.

Classes of Devices and Modules | 5

This is the Title of the Book, eMatter Edition


Copyright © 2005 O’Reilly & Associates, Inc. All rights reserved.

You might also like