Windows NT assigns a priority to each hardware interrupt and a few software events, namely, the interrupt request level (interrupt request level-IRQL ). IRQL provides a synchronization method for activities on a single CPU Based on the following rules:
Once a CPU runs on IRQL higher than passive_level, the activity on the CPU can only be preemptible by the ac
What is IRQL?
IRQL is the interrupt request level and the interrupt request level. The processor executes the thread code on an IRQL. IRQL helps determine how a thread is interrupted. On the same processor, a thread can only be interrupted by a higher-level IRQL thread. Each
The following table summarizes the IRQL and thread context requirements for file system filter driver dispatch routines.
DriverEntryRoutines are called in the context of a system thread at IRQL = passive_level.
Most drivers 'dispatch routines are called in an arbitrary threadContext at IRQL = passive_level, with the fo
Today, let's talk about IRQL, which is a nightmare for new users. Think about how much bsod is caused by IRQL mismatch. This is also one of the most popular sputation points for * nix kernel developers. You don't have this concept in Linux, and we are not very well-behaved? Sometimes I can get some blank space and ask the same question: Is it Mao? Mao must have this thing! Later I figured it out.
Let's ta
allocate more resources to the shared buffer pool, resulting in crashes and system instability. When you activate this performance and the target computer has enough physical and virtual memory, the allocation of all drivers is automatically redirected to the special buffer pool.
Extreme Memory Pressure
Extreme Memory Pressure is set on a specific drive without affecting other drives (regardless of the system Memory size ). By indicating memory management, You can invalidate the callable code a
release a waiting thread.
Lock OperationAmong the functions that the WDM driver can call, some functions can execute arithmetic operations in a thread-safe and multi-processor-safe way. These routines have two forms,The first form starts with interlocked. They can perform atomic operations.Other threads or CPUs cannot interfere with their execution.Another form starts with exinterlocked and uses spin locks.
Table Lock Operation Service Functions
Serv
The following is a list of precautions that developers should avoid when using the Windows NT Device Driver:
Do not return status_pending through the scheduling routine without marking I/O Request Packet (IRP) suspension (iomarkirppending.
Do not call kesynchronizeexecution through the interrupt service routine (ISR. It causes a system deadlock.
Do not set deviceobject-> flags to do_buffered_io or do_direct_io. It will disrupt the system and event
The following is a list of precautions that developers should avoid when using the Windows NT Device Driver:
1.
Do not return status_pending through the scheduling routine without marking I/O Request Packet (IRP) suspension (iomarkirppending.
2.
Do not call kesynchronizeexecution through the interrupt service routine (ISR. It causes a system deadlock.
3.
Do not set deviceobject-> flags to do_buffered_io or do_direct
The following is a list of precautions that developers should avoid when using the Windows NT Device Driver:
Do not return status_pending through the scheduling routine without marking I/O Request Packet (IRP) suspension (iomarkirppending.
Do not call kesynchronizeexecution through the interrupt service routine (ISR. It causes a system deadlock.
Do not set deviceobject-> flags to do_buffered_io or do_direct_io. It will disrupt the system and even
The following is a list of precautions that developers should avoid when using the Windows NT Device Driver:
1.
Do not return status_pending through the scheduling routine without marking I/O Request Packet (IRP) suspension (iomarkirppending.
2.
Do not call kesynchronizeexecution through the interrupt service routine (ISR. It causes a system deadlock.
3.
Do not set deviceobject-> flags to do_buffered_io or do_direc
Reprinted from: http://hi.baidu.com/zhanghuikl/blog/item/845478096f6878c53bc763ae.html
One major aspect of programming involves allocating storage units. Unfortunately, the driver cannot simply call malloc and free, or new or delete. To ensure that the correct type of memory is allocated, the allocated memory must be released after use, because the kernel mode code does not have an automatic clearing mechanism.
Memory available for the
The following is a list of precautions that developers should avoid when using the Windows NT Device Driver:
1. Do not return status_pending through the scheduling routine without marking the iomarkirppending.2. Do not call kesynchronizeexecution through the interrupt service routine (ISR. It causes a system deadlock.3. Do not set deviceobject-> flags to do_buffered_io and do_direct_io. It will disrupt the system and eventually lead to fatal errors. I
processed, and initialize these routine entries in DriverEntry. A low-layer driver requires a startio, ISR, and dpcforisr routine. A synchcritsection routine may be required. If the device uses DMA, an adaptercontrol routine may be required.One or more iocompletion routines may be required for high-level drivers, at least completing the I/O status checkAnd then call iocompleterequest. If necessary, modify the data structure and content of device exte
Linux driver development focuses on content-from "embedded Linux driver template overview and project practices", embedded driver development
This article is excerpted from my lecture on Embedded Linux driver templates and project practices.
Initially, it seems that the development of Linux Device Drivers involves a lo
Linux Device Driver category, character device driver, how to add cdev to the kernel ?, Driver category cdev
1. Linux Device Driver category
By hardware of Managed Devices
Character Device
Access by byte streams, which can be accessed sequentially or at specified locations
Touch screen LCD for serial port terminals
Bl
Character Device Driver instance
With the foundation of the previous section, I will learn how to compile a character device driver and test it on the client to verify whether the character device driver has been created successfully.1. Character Device Driver
The following is the
Android system transplantation and driver development-Chapter 7-LED driver and android driver development
Implementation principle of LED Driver
Write LED driver:
Before testing the LED driver, you need to use a USB data cable to
[Video] Secrets of Embedded Linux/Android driver development (1) Touch Screen driver development and android driver development
Secrets of Embedded Linux/Android driver development (1) Touch Screen driver development
Topic Introduction: Since samurst invented the world's fi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.