A Deferred Procedure Call (DPC) is a Windows operating system mechanism which allows high-priority tasks to defer required but lower-priority tasks for later execution. This permits device drivers and other low-level event consumers to perform the high-priority part of their processing quickly, and schedule non-critical additional processing for execution at a lower priority.
| Property | Value |
| dbpprop:abstract
|
- A Deferred Procedure Call (DPC) is a Windows operating system mechanism which allows high-priority tasks to defer required but lower-priority tasks for later execution. This permits device drivers and other low-level event consumers to perform the high-priority part of their processing quickly, and schedule non-critical additional processing for execution at a lower priority. DPCs are implemented by DPC objects which are created and initialized by the kernel when a device driver or some other kernel mode program issues requests for DPC. The DPC request is then added to the end of the system-wide DPC queue. DPCs have three priority levels: low, medium and high. By default, all DPCs are set to medium priority. When the processor drops to an IRQL (interrupt request level) of Dispatch/DPC level, it checks the DPC queue for any pending DPCs and executes them until the queue is empty or some other interrupt with a higher IRQL occurs. For example, when the clock interrupt is generated, the clock interrupt handler generally increments the counter of the current thread to calculate the total execution time of that thread, and decrements its quantum time remaining by 1. When the counter drops to zero, the thread scheduler has to be invoked to choose the next thread to be executed on that processor and dispatcher to perform a context switch. Since the clock interrupt occurs at a much higher IRQL, it will be desirable to perform this thread dispatching which is a less critical task at a later time when the processor's IRQL drops. So the clock interrupt handler requests a DPC object and adds it to the end of the DPC queue which will process the dispatching when the processor's IRQL drops to DPC/Dispatch level.
- DPC (англ. Deferred procedure call — процедура отложенного вызова) в операционной системе Windows — вторая фаза обработчика прерывания, или же обработчик срабатывания таймера. В отличие от первой фазы прерывания DPC исполняется без маскирования прерываний в контроллере, но по-прежнему в режиме, когда вытесняющая многозадачность приостановлена. Такой выбор архитектуры позволяет, например, разделить блокировки на обычные и связанные с прерываниями, и не запрещать никакие прерывания при захвате обычной блокировки. DPC является той частью обработки прерывания, что имеет право захватывать обычные блокировки. В целом это решение минимизирует время, проводимое с запретом каких-либо прерываний. Практически все DPC в системе есть либо результат прерывания, либо результат срабатывания таймера. В редких случаях DPC используется при угрозе исчерпания стека режима ядра (DPC имеют свой собственный стек, один на процессор). DPC в нижележащем драйвере могут вызывать обратные вызовы в вышележащем, а также завершать операции ввода-вывода, что опять же приводит к вызову обработчика завершения в вышестоящем модуле все в том же контексте DPC. На данный контекст распространяются все правила, относящиеся к коду, исполняемому на DISPATCH_LEVEL, плюс дополнительно правило о бессмысленности понятий «текущий процесс» и «текущий поток» внутри контекста DPC (англ. arbitrary thread context). DPC ставятся в очередь всегда какому-то одному процессору — явно заданному или произвольно выбранному, они обрабатываются строго последовательно, одна DPC не может прервать другую. Использование такой архитектуры дает неизвестные и часто значительные задержки исполнения DPC, что является одной из причин того, что Windows не является операционной системой реального времени. Аналог в Linux называется «bottom half».
|
| dbpprop:hasPhotoCollection
| |
| rdfs:comment
|
- A Deferred Procedure Call (DPC) is a Windows operating system mechanism which allows high-priority tasks to defer required but lower-priority tasks for later execution. This permits device drivers and other low-level event consumers to perform the high-priority part of their processing quickly, and schedule non-critical additional processing for execution at a lower priority.
- DPC (англ. Deferred procedure call — процедура отложенного вызова) в операционной системе Windows — вторая фаза обработчика прерывания, или же обработчик срабатывания таймера.
|
| rdfs:label
|
- Deferred Procedure Call
- DPC
|
| owl:sameAs
| |
| skos:subject
| |
| foaf:page
| |