Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Timing Subsystem in deep
Rating: 4.6 out of 5(31 ratings)
726 students

Timing Subsystem in deep

Linux Kernel Programming - Timing Subsystem
Created byLinux Trainer
Last updated 4/2021
English

What you'll learn

  • Programming timing in user space
  • Timing Hardware
  • Jiffies
  • Low resolution & High resolution timers
  • POSIX Clocks

Course content

7 sections98 lectures4h 52m total length
  • date command0:48
  • uptime command5:41
  • Epoch time3:40
  • ctime1:27
  • gettimeofday3:36
  • Can gettimeofday() be used for measured elapsed time6:51
  • Monotonic clock4:04
  • CLOCK_BOOTTIME1:44
  • CLOCK_MONOTONIC_RAW1:36
  • CLOCK_REALTIME2:23
  • CLOCK_PROCESS_CPUTIME_ID2:18
  • Example to calculate time taken to increment1:22
  • Another Example using clock_gettime1:52
  • CLOCK_MONOTONIC vs CLOCK_PROCESS_CPUTIME_ID1:47
  • CLOCK_THREAD_CPUTIME_ID2:47
  • clock_settime4:34
  • clock_getres0:59
  • times3:14
  • getrusage2:09

Requirements

  • Should have a basic understanding of Linux Kernel modules
  • C Language

Description

Timing Measurements in Linux Kernel

Many computer activities are based on timing measurements.

E.g. Your Computer display is turned off, if you have not pressed a key or moved your mouse for a particular time.

Linux timing subsystem mainly handles two types of timing activities

        1. Keeping the current time and date

                a. time() , gettimeofday() and clock_gettime()

                b. Time stamps for files and network packets

        2. Maintaining Timers

                a. Mechanisms to notify kernel and user space (ex. alarm()) that a certain interval of time has elapsed.

Hardware Devices

Linux depends on hardware devices to maintain time. These devices can be basically classified into two types:

        1. Clocks/Counters:  provide precise time measurements

                Used to keep track of current time of day

        2. Timers: Issue interrupts at fixed, predefined frequency.

                Used for implementing software timers

What will you learn from this course?

  • Various timing commands: date, uptime

  • POSIX Clocks: CLOCK_BOOTTIME, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID

  • Timing System calls: ctime, gettimeofday, clock_gettime, clock_settime, clock_getres, times, getrusage

  • Setting time from userspace

  • How to measure time for a particular instruction

  • Hardware Devices used in timing measurement: RTC, TSC, Programmable Interval Timer, APIC, High Precision Event Timer

  • Jiffies

  • Low Resolution and High Resolution Timers

This course comes with a 30 day money back guaranteed!. If you are not satisfied with the course, you'll get your money back

So what are you waiting for, enroll now and take the next step in learning Timing subsystem in Linux Kernel

Who this course is for:

  • Linux Kernel Developers interested in gaining deep knowledge about timing subsystem