Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Linux Timers Implementation & Design in C
Rating: 4.6 out of 5(111 ratings)
1,848 students

Linux Timers Implementation & Design in C

Data Structure & Algorithm to Schedule future events, Linux System Programming, Operating systems, C/C++ programming
Last updated 3/2022
English
English [Auto],

What you'll learn

  • Design and Implementing Timers
  • Schedule and Trigger events in Future
  • Solve concurrency problem with Timers, Develop Timer Library
  • Develop Scalable and hierarchical Timers

Course content

7 sections41 lectures3h 48m total length
  • Agenda and Pre-requisites2:39

    Explore posix timers on Linux, learn to create, update, delete, restart, resume, and reschedule timers, and implement periodic and exponential backoff timers while building a custom timer library.

  • Join Telegram Group0:13

    Explore Linux timers implementation and design in C, and join the Telegram group to discuss concepts, share code, and collaborate on timer mechanisms.

  • Timer Relevance2:08

    Explore the relevance of timers across networking and security contexts, and learn to implement Linux and POSIX timer APIs to build custom, controllable timers.

  • Timer Types2:57

    Explore three timer types and how Linux APIs implement one-shot, periodic, and exponential backoff timeouts to build a versatile timer library.

  • Posix APIs for Timers2:10

    Learn POSIX timer APIs by creating, starting and stopping, querying remaining time, and deleting timer objects, then build a custom timer library while clarifying start, alarm, fire, and expire.

  • Timer Design7:00

    Explains how the operating system implements timers by creating a new thread and invoking a timer callback after expiration. Describes one-shot, periodic, and exponential backoff timers and resource cleanup.

  • Timer Creation Steps - Theory9:44

    explains creating linux timers in c with a three-argument api, detailing timer types, a sigev notifier function, and arming timers using itimerspec and timer_settime.

  • Timer Implementation and Demo14:15

    Learn to implement and demonstrate Linux timers in C, including creating timers, configuring callback functions, starting countdowns, and converting one-shot timers to periodic with an interval.

Requirements

  • C coding language, Linux Operating System only
  • You should familiar with basic data structures such as linked list and function pointers.
  • Basics of Multi-threading - to start a thread
  • Must know Callbacks (function pointers)

Description

O Ghosh !! I just cannot shout-out more how important TIMERS are in almost all applications or projects. Timers are used to schedule events to be triggered or fired in future. How have you been doing this till now ?

Timers Use case Scenarios :

1. Firing One time future Event : Delete something after 100 seconds

2. Firing Repeated Regular future Events : Send packet to machine X after every 5 seconds

3. Periodic Waits : Try something 5 times at an interval of 3 seconds


How would you design a timer ?   PET Question for interview. So better prepare for it.


About this Course This is short project based course, yet important course to cover Data Structures and Algorithms involved in designing efficient timers.  We shall be using C as a programming language, but you are free to use your favorite programming language. This course is Programming language agnostic.


Course Pre-requisite

If you can code in any programming language, that suffice.

You should familiar with basic data structures such as linked list and function pointers.

Basics of Multi-threading


Also, Please just do not sit and watch my codes. Write your own codes, even if it is same as mine !


No Third Party libraries

Whatever logic you implement, you need to implement it from scratch. This course do not suggest taking help of any third party library to get the jobs done. Use of external libraries completely defeats the purpose of the course. However, it is recommended to use third party libraries for commonly used data structures such as linked lists/Trees/Queues etc which saves a lot of time implementing these data structures.


Warning : This course has auto system-generated subtitles which may not be perfect. Please disable subtitles as per your convenience.

Who this course is for:

  • Beginners, Intermediates and Professionals
  • Those who want to grow as Champ Developers
  • Ace interview Design Questions