Deferrable functions in linux is a mechanism to delay the execution of any piece of code later in the kernel context. Can be implemented using Tasklet and work queues
This course gets you started with writing device drivers in Linux by providing real time hardware exposure. Equip you with real-time tools, debugging techniques and industry usage in a hands-on manner. Dedicated hardware by Emertxe's device driver learning kit. Special focus on character and USB device drivers.
Covers the basics of Direct Memory Access (DMA). Further to this, the generic Linux DMA engine is covered along with steps to initiate the DMA transfer
This course gets you started with writing device drivers in Linux by providing real time hardware exposure. Equip you with real-time tools, debugging techniques and industry usage in a hands-on manner. Dedicated hardware by Emertxe's device driver learning kit. Special focus on character and USB device drivers.
Covers the basics of Direct Memory Access (DMA). Further to this, the generic Linux DMA engine is covered along with steps to initiate the DMA transfer
It is the File system that is contained on the same partition on which the "Root directory" is located. It is the File system on which all the other file systems are mounted
A tutorial for beginners who are curious to learn about the Linux boot process. If you have any more doubts, you can contact me through my email given in the slide, or through my blog: mastro77.blogspot.in
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Data...The Linux Foundation
Linaro has published VM System specification for ARM Processors, which provides a set of guidelines for both guest OS and hypervisor implementations, such that building OS images according to these guidelines guarantees that those images can also run on hypervisors compliant with this specification.
One of the spec requirements is that the hypervisor must provide an emulated PL011 UART as a serial console which meets the minimum requirements in SBSA UART as defined in ARM Server Base Architecture Document. In this presentation, Bhupinder Thakur will cover the motivation behind VM System spec requirements and the work done for adding support of PL011 emulation in Xen.
Getting started with setting up embedded platform requires audience to understand some of the key aspects of Linux. This presentation deals with basics of Linux as an OS, Linux commands, vi editor, Shell features like redirection, pipes and shell scripting
Linux kernel has a special feature called Watchdog timer which would reset the system in case of any software faults | system hangs | or any application crashes after a timeout has reached.
Linux Kernel Booting Process (1) - For NLKBshimosawa
Describes the bootstrapping part in Linux and some related technologies.
This is the part one of the slides, and the succeeding slides will contain the errata for this slide.
Part 02 Linux Kernel Module ProgrammingTushar B Kute
Presentation on "Linux Kernel Module Programming".
Presented at Army Institute of Technology, Pune for FDP on "Basics of Linux Kernel Programming". by Tushar B Kute (http://tusharkute.com).
U-Boot project has evolved in the time span of over 17 years and so as its complexity and its uses. This has made it a daunting task in getting started with its development and uses. This talk will address all these issues start with overview, features, efforts created by community and future plans.
The U-Boot project has evolved in the time span of over 17 years and so as its complexity and its uses. This has made it a daunting task in getting started with its development and uses. This talk will address all these issues and share development efforts created by the U-Boot community.
In this talk Jagan Teki(Maintainer for Allwinner SoC, SPI, SPI FLASH Subsystems) will introduce U-Boot from scratch with a brief overview of U-Boot history, U-Boot Proper, SPL, TPL, Build process and Startup sequence. He will talk about other preliminaries such as Image booting, Falcon Mode, Secure Boot and U-Boot features like device tree, device overlays, driver model and DFU, etc.
Once giving enough introduction, he will also talk about steps to port U-Boot to new hardware with a demo, along with U-Boot testing process. Finally, he will address and review ongoing development work, issues and future development regarding U-Boot.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Learn python in easy steps. This presentation will cover followings
1. Python basics
2. How to write a python code
3. Variable usage & their syntax
4. Strings handling
5. Files handling
6. How to use loops and others.
7. Python Vs C language.
It provides details about what is Kernel, what is a Module and what is device driver. How device gets registered and how a storage volume gets mounted if it is inserted on android system. Details on Allocation of memory in Kernel.
It is the File system that is contained on the same partition on which the "Root directory" is located. It is the File system on which all the other file systems are mounted
A tutorial for beginners who are curious to learn about the Linux boot process. If you have any more doubts, you can contact me through my email given in the slide, or through my blog: mastro77.blogspot.in
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Data...The Linux Foundation
Linaro has published VM System specification for ARM Processors, which provides a set of guidelines for both guest OS and hypervisor implementations, such that building OS images according to these guidelines guarantees that those images can also run on hypervisors compliant with this specification.
One of the spec requirements is that the hypervisor must provide an emulated PL011 UART as a serial console which meets the minimum requirements in SBSA UART as defined in ARM Server Base Architecture Document. In this presentation, Bhupinder Thakur will cover the motivation behind VM System spec requirements and the work done for adding support of PL011 emulation in Xen.
Getting started with setting up embedded platform requires audience to understand some of the key aspects of Linux. This presentation deals with basics of Linux as an OS, Linux commands, vi editor, Shell features like redirection, pipes and shell scripting
Linux kernel has a special feature called Watchdog timer which would reset the system in case of any software faults | system hangs | or any application crashes after a timeout has reached.
Linux Kernel Booting Process (1) - For NLKBshimosawa
Describes the bootstrapping part in Linux and some related technologies.
This is the part one of the slides, and the succeeding slides will contain the errata for this slide.
Part 02 Linux Kernel Module ProgrammingTushar B Kute
Presentation on "Linux Kernel Module Programming".
Presented at Army Institute of Technology, Pune for FDP on "Basics of Linux Kernel Programming". by Tushar B Kute (http://tusharkute.com).
U-Boot project has evolved in the time span of over 17 years and so as its complexity and its uses. This has made it a daunting task in getting started with its development and uses. This talk will address all these issues start with overview, features, efforts created by community and future plans.
The U-Boot project has evolved in the time span of over 17 years and so as its complexity and its uses. This has made it a daunting task in getting started with its development and uses. This talk will address all these issues and share development efforts created by the U-Boot community.
In this talk Jagan Teki(Maintainer for Allwinner SoC, SPI, SPI FLASH Subsystems) will introduce U-Boot from scratch with a brief overview of U-Boot history, U-Boot Proper, SPL, TPL, Build process and Startup sequence. He will talk about other preliminaries such as Image booting, Falcon Mode, Secure Boot and U-Boot features like device tree, device overlays, driver model and DFU, etc.
Once giving enough introduction, he will also talk about steps to port U-Boot to new hardware with a demo, along with U-Boot testing process. Finally, he will address and review ongoing development work, issues and future development regarding U-Boot.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Learn python in easy steps. This presentation will cover followings
1. Python basics
2. How to write a python code
3. Variable usage & their syntax
4. Strings handling
5. Files handling
6. How to use loops and others.
7. Python Vs C language.
It provides details about what is Kernel, what is a Module and what is device driver. How device gets registered and how a storage volume gets mounted if it is inserted on android system. Details on Allocation of memory in Kernel.
This PPT shares some information on what is booting process and different stages in it. Importance of BIOS and BootROM. Steps involved for loading kernel into RAM. What is the importance of init RAM disk (initrd), when 1st user space application is started and who will create init process.
This ppt describes network security concepts and the role of cryptography. Difference in Symmetric Key Cryptography and Public Key Cryptography. Uses of Digital Certificates. What is the use of Digital Signature and how it ensure authenticity, Integrity and Non-repudiation. How security features should be ensured for any transactions using cryptography.
This presentation gives an overview of Linux kernel block I/O susbsystem functionality, importance of I/O schedulers in Block layer. It also describes the different types of I/O Schedulers including the Deadline I/O scheduler, Anticipatory I/O Scheduler, Complete Fair queuing I/O scheduler and Noop I/O scheduler.
This presentation covers Python most important data structures like Lists, Dictionaries, Sets and Tuples. Exception Handling and Random number generation using simple python module "random" also covered. Added simple python programs at the end of the presentation
A presentation on how and when to use a WorkManager in Android. This presentation gives deep insight into what type of background service we can use in the background.
We delve deep into working and functionalities provided by WorkManger and see how we can add One-Time and Periodic tasks along with various constraints we can set to initialization of a worker.
Flink Forward SF 2017: Feng Wang & Zhijiang Wang - Runtime Improvements in Bl...Flink Forward
In 2016, we introduced Alibaba’s compute engine Blink which was based on our private branch of flink. It enalbed many large scale applications in Alibaba’s core business, such as search, recommendation and ads. With the deep and close colaboration with the flink community, we are finally close to contribute our improvements back to the flink community. In this talk, we will present our key contributions to flink runtime recently, such as the new YARN cluster mode for Flip-6, fine-grained failover for Flip-1, async i/o for Flip-12, incremental checkpoint, and the further improvements plan from Alibaba in the near future. Moreover, we will show some production use cases to illustrate how flink works in Alibaba’s large scale online applications, which includes real-time ETL as well as online machine learning. This talk is presented by Alibaba.
SMP4: Thread Scheduler
======================
INSTRUCTIONS
============
1. OVERVIEW
===========
In this MP, you will write a user-mode thread scheduler. The basic purpose
of a scheduler is to multiplex use of the computer across several threads
of execution. This MP deals with two different scheduling policies: FIFO
and Round Robin. You will implement both, for use in a simple cooperative
multi-threading system. Along the way, you'll also learn about implementing
object-oriented constructs in low-level procedural languages like C.
This assignment consists of implementing the core functionality of the
scheduler (Step 4) and answering 10 questions (Step 5). Code for
Step 4 goes in sched_impl.c and sched_impl.h.
2. THEORY OF OPERATION
======================
The given code in the MP defines the skeleton of a scheduler together with a
parameterized dummy workload. The idea is when you run the MP, you specify
a scheduling policy, scheduler queue size, some number of worker threads to
create, and, optionally, the number of iterations for which the worker
threads should run. The basic code that parses command line arguments and
creates these worker threads is provided in the MP, but you must implement
the core synchronization and scheduling operations.
As provided, the MP only includes the "dummy" scheduling algorithm, which
doesn't even try to do anything. You can run it like this:
make
./scheduler -dummy 0 N # where N is some number of worker threads
All threads run right away regardless of the queue size (even zero!), and
are scheduled by the operating system. The goal of this MP is to create
scheduler implementations which are a bit more controlled and predictable.
For example, once you have completed the MP, the following should work:
./scheduler -fifo 1 2 3
Main: running 2 workers on 1 queue_size for 3 iterations
Main: detaching worker thread 3075984304
Main: detaching worker thread 3065494448
Main: waiting for scheduler 3086474160
Thread 3075984304: in scheduler queue
Thread 3075984304: loop 0
Thread 3075984304: loop 1
Thread 3075984304: loop 2
Thread 3075984304: exiting
Thread 3065494448: in scheduler queue
Thread 3065494448: loop 0
Thread 3065494448: loop 1
Thread 3065494448: loop 2
Thread 3065494448: exiting
Scheduler: done!
The command line options used above specify:
-fifo Use FIFO scheduling policy
1 One thread can be in the scheduler queue at a time
2 Create 2 worker threads
3 Each thread runs for 3 time slices
Here's another example:
./scheduler -rr 10 2 3
Main: running 2 workers on 10 queue_size for 3 iterations
Main: detaching worker thread 3075828656
Main: detaching worker thread 3065338800
Main: waiting for scheduler 3086318512
Thread 3075828656: in scheduler queue
Thread 3065338800: in scheduler queue
Thread 3075828656: loop 0
Thread 3065338800: loop 0
Thread 3075828656: loop 1
T.
Similar to Tasklet vs work queues (Deferrable functions in linux) (20)
Writing Character driver (loadable module) in linuxRajKumar Rampelli
It covers the step by step approach on how to write a simple loadable character device driver in linux. What are Device files in linux detail. How user application interact with character driver using a device file.
I have prepared this document during my Python course from sololearn "Learn Python" course. This document contains fundamentals of python. Aimed for python beginners.
It describes the MMC storage device driver functionality in Linux Kernel and it's role. It explains different type of storage devices available and how they are handled from MMC driver point of view. It describes eMMC (internal storage) device and SD (external storage) devices in details and SD protocol used for communicating with these devices in Linux.
This ppt shows more details on Higher education (M.Tech/MS/MBA) role and its importance. B.E/B.Tech students should think twice before choosing next level (Higher studies or JOB). There are so many benefits with higher studies today. GATE is a All India entrance test used for admission for MS/MTECH/Phd in Indian Institute of Technologies (IITs). GRE entrance test is for admission in other countries.
This ppt will demonstrate the compilation process stages in C language. C compilation process has 4 stages. They are pre-processor, compiler, assembler and linker. Each stage has its own functionality. The final outcome of these stages would be a C executable file. GCC tool is used in linux platform to compile C code. And It will generate *.out files as an executable.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
3. Deferrable function
• Mechanism for supporting the delayed execution of any function in
Interrupt handlers (Interrupt context)
• Interrupt Context
– Kernel enters Interrupt context when hardware interrupt received
– Kernel enters Process/Kernel context from Interrupt context after
servicing the hardware interrupt
– Execution of tasks in Interrupt context should be minimized
• Why - Majority of Interrupts are disabled, therefore latency to handle other
interrupts will be increased
• Solution: Move execution of not urgent function (piece of code) into process
context (Deferrable function)
• Add deferrable functions in Interrupt Handlers
• Deferrable functions: can be executed in process context
– Tasklet
– Work queues
12/6/2013
Raj Kumar Rampelli
3
4. Top Half Vs Bottom Half
Top Half
Bottom Half
Processing of tasks in Interrupt Handler
(Interrupt context)
Processing of tasks in Kernel context
Interrupts are disabled
Interrupts are not disabled
Add Deferrable functions for delayed
execution
Handles Deferrable functions
Processing time should be less
-NA-
Uses Tasklets and work queue APIs for deferrable mechanism
12/6/2013
Raj Kumar Rampelli
4
5. Tasklet: To schedule the work (function) to run later point of time
so that reducing the amount of work done in interrupt handlers.
Tasklet Initialization APIs
Usage
void tasklet_function (unsigned
long data);
Deferrable function i.e. actual Task
DECLARE_TASKLET
(tasklet_name,
tasklet_function, tasklet_data);
• Initializes the tasklet structure (tasklet_struct)
with passing argument list
• Tasklets are enabled by default
• Next step: Schedule the task
DECLARE_TASKLET_DISABLED
(tasklet_name,
tasklet_function, tasklet_data);
• Initializes the tasklet structure
• Tasklets are disabled
• Next step: Enable Tasklet before schedule the
task
void tasklet_init(struct
tasklet_struct *, void (*func)
(unsigned long), unsigned long
data);
• Initializes the tasklet structure (tasklet_struct)
with passing argument list
12/6/2013
Raj Kumar Rampelli
5
6. Tasklet (contd.)
Tasklet Enable/Disable APIs
Usage
void tasklet_enable (struct tasklet_struct *);
/* Enable normal priority scheduling */
void tasklet_disable (struct tasklet_struct *);
/* returns after disabling the tasklet */
void tasklet_hi_enable (struct tasklet_struct *); /* Enabling High priority scheduling */
void tasklet_disable_nosync (struct
tasklet_struct *);
12/6/2013
/* May returns before termination i.e.
no synchronization with disabling of
tasklet */
Raj Kumar Rampelli
6
7. Tasklet (contd.)
Tasklet Schedule APIs
Usage
void tasklet_schedule (struct tasklet_struct *);
/* Normal priority scheduling */
void tasklet_hi_schedule (struct tasklet_struct *);
/* Higher priority scheduling */
CPU maintains the normal and high priority softirq vectors lists (normal priority vector
list and high priority vector list) where these functions are queued.
If the function is higher priority function then it is en-queued in higher priority softirq
vector list and similar case for normal priority functions.
Kill a Tasklet
Usage
void tasklet_kill (struct tasklet_struct *);
/* Kill a tasklet */
void tasklet_hi_kill (struct tasklet_struct *);
/* Kill the tasklet and ensure they
would never run */
12/6/2013
Raj Kumar Rampelli
7
8. Work queue
• Added in linux kernel 2.6 version
• Use two data structures
– struct workqueue_struct
• Work is queued here in Interrupt context
• The same work is executed in Kernel context
– struct work_struct
• Identifies the work and deferrable function
• Kernel threads named "events/X" will extract work from the core work
queue and activates the work's handler function.
Tasklet
Added in linux kernel 2.3
version
In 2.6 kernel version
Sleep in Handler function
Not possible
12/6/2013
Work queue
Possible.
Latency is less
Raj Kumar Rampelli
More compared to Tasklet
8
9. Work queue APIs
Create and destroy work queue structure
Usage
struct workqueue_struct
*create_workqueue(name);
/* Creates core workqueue */
void destroy_workqueue(struct
workqueue_struct *);
/* Destroy the workqueue */
Initialization of work structure
Usage
INIT_WORK(work, function);
/* Initializes the work structure with
function handler */
INIT_DELAYED_WORK(work, function);
/* Add any delay before adding this work
INIT_DELAYED_WORK_DEFERRABLE(work, into work queue structure */
function);
12/6/2013
Raj Kumar Rampelli
9
10. Work queue APIs (contd.)
•
Add work on to work queue
– int queue_work (struct workqueue_struct *wq, struct work_struct *work);
– /* specify the CPU on which the handler should run */
int queue_work_on (int cpu, struct workqueue_struct *wq, struct work_struct *work);
– /* Queue specified work on to specified work queue after delay */
int queue_delayed_work (struct workqueue_struct *wq, struct delayed_work *work, unsigned
long delay);
– int queue_delayed_work_on (int cpu, struct workqueue_struct *wq, struct delayed_work
*work), unsigned long delay);
•
The below functions doesn't require workqueue structure defined. Since, they
uses kernel-global work queue. So, no need to pass workqueue_struct in the
argument list.
–
–
–
–
12/6/2013
int schedule_work (struct work_struct *):
int schedule_work_on (int cpu, struct work_struct *):
int scheduled_delayed_work (struct delayed_work *, unsigned long delay);
int scheduled_delayed_work_on (int cpu, struct delayed_work *, unsigned long delay);
Raj Kumar Rampelli
10
11. Work queue APIs (contd.)
• Cancel work
/* terminate work in the queue, which is not already executing in the handler */
int cancel_work_sync (struct work_struct *);
int cancel_delayed_work_sync (struct delayed_work *);
• Flush work
Below functions are used to flush the work and works in the specified workqueue.
/* Flush a particular work and block until it is completed */
int flush_work (struct work_struct *);
/* Flush all works in given workqueue and block until it is completed */
int flush_workqueue (struct workqueue_struct *);
/* Flush kernel-global work queue */
void flush_scheduled_work (void);
• Status of work
We can use below two functions to know whether the given work is pending i.e. its handler function is
not yet started.
work_pending(work);
delayed_work_pending (work);
12/6/2013
Raj Kumar Rampelli
11
12. Conclusion
• Reduce the execution time in Interrupt context by using deferrable
function mechanism
• Top Half: Processing of tasks in Interrupt Handler (Interrupt
context)
• Bottom Half: Processing of tasks in Kernel/Process context
• Two type of deferrable functions
– Tasklet
– Work queue
• Aim: To schedule the work/function (not urgent piece of code) in
interrupt handler to run later point of time (in bottom half) so that
reducing the amount of work done in interrupt handlers.
• Tasklet and Work queue both do the above task using their own set
of APIs
• For more details visit: www.practicepeople.blogspot.com
12/6/2013
Raj Kumar Rampelli
12