TAILIEUCHUNG - Linux Device Drivers-Chapter 9 :Interrupt Handling Although

Tham khảo tài liệu 'linux device drivers-chapter 9 :interrupt handling although', 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 9 Interrupt Handling Although some devices can be controlled using nothing but their I O regions most real-world devices are a bit more complicated than that. Devices have to deal with the external world which often includes things such as spinning disks moving tape wires to distant places and so on. Much has to be done in a time frame that is different and slower than that of the processor. Since it is almost always undesirable to have the processor wait on external events there must be a way for a device to let the processor know when something has happened. That way of course is interrupts. An interruptis simply a signal that the hardware can send when it wants the processor s attention. Linux handles interrupts in much the same way that it handles signals in user space. For the most part a driver need only register a handler for its device s interrupts and handle them properly when they arrive. Of course underneath that simple picture there is some complexity in particular interrupt handlers are somewhat limited in the actions they can perform as a result of how they are run. It is difficult to demonstrate the use of interrupts without a real hardware device to generate them. Thus the sample code used in this chapter works with the parallel port. We ll be working with the short module from the previous chapter with some small additions it can generate and handle interrupts from the parallel port. The module s name short actually means short int it is C isn t it to remind us that it handles interrupts. Overall Control of Interrupts The way that Linux handles interrupts has changed quite a bit over the years due to changes in design and in the hardware it works with. The PC s view of interrupts in the early days was quite simple there were just 16 interrupt lines and one processor to deal with them. Modern hardware can have many more interrupts and can also be equipped with fancy advanced programmable interrupt controllers APICs which can distribute .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.