Types of APCs

Types of APCs

An asynchronous procedure call (APC) is a function that executes asynchronously. APCs are similar to deferred procedure calls (DPCs), but unlike DPCs, APCs execute within the context of a particular thread. Drivers (other than file systems and file-system filter drivers) do not use APCs directly, but other parts of the operating system do, so you need to be aware of how APCs work.

The Windows operating system uses three kinds of APCs:

  • User APCs run strictly in user mode and only when the current thread is in an alertable wait state. The operating system uses user APCs to implement mechanisms such as overlapped I/O and the QueueUserApc Win32 routine.
  • Normal kernel APCs run in kernel mode at IRQL = PASSIVE_LEVEL. A normal kernel APC preempts all user-mode code, including user APCs. Normal kernel APCs are generally used by file systems and file-system filter drivers.
  • Special kernel APCs run in kernel mode at IRQL = APC_LEVEL. A special kernel APC preempts user-mode code and kernel-mode code that executes at IRQL = PASSIVE_LEVEL, including both user APCs and normal kernel APCs. The operating system uses special kernel APCs to handle operations such as I/O request completion.

 

http://www.ddj.com/windows/184416590;jsessionid=G1F1YBKIFIP23QE1GHRSKHWATMY32JVN?_requestid=191234

 http://www.gamedev.net/community/forums/topic.asp?topic_id=522408

http://www.fixya.com/support/t36188-queue_apc_from_kernel

http://www.0ginr.com/bbs/thread-3002-1-1.html

http://bbs.driverdevelop.com/htm_data/16/0107/2217.html

http://www.microsoft.com/msj/0197/win32/win320197.aspx

http://www.eggheadcafe.com/software/aspnet/33959799/special-kernel-mode-apc.aspx

转载于:https://www.cnblogs.com/fanzi2009/archive/2010/01/28/1658777.html

你可能感兴趣的:(Types of APCs)