TAILIEUCHUNG - Linux Device Drivers-Chapter 11 : kmod and Advanced

Tham khảo tài liệu 'linux device drivers-chapter 11 : kmod and advanced', công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 11 kmod and Advanced Modularization In this second part of the book we discuss more advanced topics than we ve seen up to now. Once again we start with modularization. The introduction to modularization in Chapter 2 Building and Running Modules was only part of the story the kernel and the modutils package support some advanced features that are more complex than we needed earlier to get a basic driver up and running. The features that we talk about in this chapter include the kmod process and version support inside modules a facility meant to save you from recompiling your modules each time you upgrade your kernel . We also touch on how to run user-space helper programs from within kernel code. The implementation of demand loading of modules has changed significantly over time. This chapter discusses the implementation as usual. The sample code works as far as possible on the and kernels as well we cover the differences at the end of the chapter. Loading Modules on Demand To make it easier for users to load and unload modules to avoid wasting kernel memory by keeping drivers in core when they are not in use and to allow the creation of generic kernels that can support a wide variety of hardware Linux offers support for automatic loading and unloading of modules. To exploit this feature you need to enable kmod support when you configure the kernel before you compile it most kernels from distributors come with kmod enabled. This ability to request additional modules when they are needed is particularly useful for drivers using module stacking. The idea behind kmod is simple yet effective. Whenever the kernel tries to access certain types of resources and finds them unavailable it makes a special kernel call to the kmod subsystem instead of simply returning an error. If kmod succeeds in making the resource available by loading one or more modules the kernel continues working otherwise it returns the error. Virtually any resource can be requested .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.