Linux Device Drivers-Chapter 12 : Loading Block Drivers

Tham khảo tài liệu 'linux device drivers-chapter 12 : loading block drivers', 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 12 Loading Block Drivers Our discussion thus far has been limited to char drivers. As we have already mentioned however char drivers are not the only type of driver used in Linux systems. Here we turn our attention to block drivers. Block drivers provide access to block-oriented devices -- those that transfer data in randomly accessible fixed-size blocks. The classic block device is a disk drive though others exist as well. The char driver interface is relatively clean and easy to use the block interface unfortunately is a little messier. Kernel developers like to complain about it. There are two reasons for this state of affairs. The first is simple history -- the block interface has been at the core of every version of Linux since the first and it has proved hard to change. The other reason is performance. A slow char driver is an undesirable thing but a slow block driver is a drag on the entire system. As a result the design of the block interface has often been influenced by the need for speed. The block driver interface has evolved significantly over time. As with the rest of the book we cover the interface in this chapter with a discussion of the changes at the end. The example drivers work on all kernels between and however. This chapter explores the creation of block drivers with two new example drivers. The first sbull Simple Block Utility for Loading Localities implements a block device using system memory -- a RAM-disk driver essentially. Later on we ll introduce a variant called spull as a way of showing how to deal with partition tables. As always these example drivers gloss over many of the issues found in real block drivers their purpose is to demonstrate the interface that such drivers must work with. Real drivers will have to deal with hardware so the material covered in Chapter 8 Hardware Management and Chapter 9 Interrupt Handling will be useful as well. One quick note on terminology the word block as used in this book refers

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.