Book Image

Mastering Linux Kernel Development

By : CH Raghav Maruthi
Book Image

Mastering Linux Kernel Development

By: CH Raghav Maruthi

Overview of this book

Mastering Linux Kernel Development looks at the Linux kernel, its internal arrangement and design, and various core subsystems, helping you to gain significant understanding of this open source marvel. You will look at how the Linux kernel, which possesses a kind of collective intelligence thanks to its scores of contributors, remains so elegant owing to its great design. This book also looks at all the key kernel code, core data structures, functions, and macros, giving you a comprehensive foundation of the implementation details of the kernel’s core services and mechanisms. You will also look at the Linux kernel as well-designed software, which gives us insights into software design in general that are easily scalable yet fundamentally strong and safe. By the end of this book, you will have considerable understanding of and appreciation for the Linux kernel.
Table of Contents (19 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Index

Time representation


Depending on the use cases, time is represented in three different ways in Linux:

  1. Wall time (or real time): This is the actual time and date in the real world, such as 07:00 AM, 10 Aug 2017, and is used for timestamps on files and packets sent through the network.
  2. Process time: This is the time consumed by a process in its life span. It includes the time consumed by the process in user mode and the time consumed by the kernel code when executing on behalf of the process. This is useful for statistical purposes, auditing, and profiling.
  3. Monotonic time: This is the time elapsed since system bootup. It's ever incrementing and monotonic in nature (system uptime).

These three times are measured in either of the following ways:

  1. Relative time: This is the time relative to some specific event, such as 7 minutes since system bootup, or 2 minutes since last input from user.
  2. Absolute time: This is a unique point in time without any reference to a previous event, such as 10:00 AM, 12 Aug...