Objectives

  • Understanding deferred work
  • Implementation of common tasks that uses deferred work
  • Understanding the peculiarities of synchronization for deferred work

Background information

Deferred Work

  • Definition: A class of kernel facilities that allows one to schedule code to be executed at a later timer
  • Can run either in process context or in interruption context depending on the type of the deferred work.
  • Used to complement the interrupt handler functionality since interrupts have some important requirements & limitations such as..
    • The execution time of the interrupt handler must be as small as possible
    • In interrupt context we can not use blocking calls
  • Also called as bottom-half since its purpose is to execute the rest of the actions from an interrupt handler top-half.
  • Typical Operations
    1. Initialization
      • Each type is described by a structure whose fields will have to be initialized.
      • The handler to be scheduled is also set at this time.
    2. Scheduling
      • Schedules the execution of the handler ASAP.
    3. Masking / Canceling
      • Disables the execution of the handler.
      • This action can be either synchronous or asynchronous
      • synchronous action: guarantees that the handler will not run afterh the completion of canceling

Softirqs