How to know linux scheduler time slice?

The quantum allocated for a particular process may vary: You can tune “slice” by adjusting sched_latency_ns and sched_min_granularity_ns, but note that “slice” is not a fixed quantum. Also note that CFS preemption decisions are based upon instantaneous state. A task may have received a full (variable) “slice” of CPU time, but preemption will be triggered … Read more

How to compile dts Linux device tree source files to dtb?

Device trees do not need to be compiled with “architecture-aware” tools. The dtc compiler on your ubuntu machine is probably current enough to compile your device tree. Or you can download the latest source and compile it yourself. The dtc compiler can be found here: https://git.kernel.org/pub/scm/utils/dtc/dtc.git There are some good documents in that package that … Read more

How does the linux kernel manage less than 1GB physical memory?

Not all virtual (linear) addresses must be mapped to anything. If the code accesses unmapped page, the page fault is risen. The physical page can be mapped to several virtual addresses simultaneously. In the 4 GB virtual memory there are 2 sections: 0x0… 0xbfffffff – is process virtual memory and 0xc0000000 .. 0xffffffff is a … Read more

Learning Kernel Programming [closed]

**TODO** +editPic: Linux Kernel Developer -> (Ring Layer 0) +addSection: Kernel Virtualization Engine KERN_WARN_CODING_STYLE: Do not Loop unless you absolutely have to. Recommended Books for the Uninitialized void *i “Men do not understand books until they have a certain amount of life, or at any rate no man understands a deep book, until he has … Read more

What is the difference between RTOS and Embedded Linux? [closed]

Linux is a general-purpose OS (GPOS); its application to embedded systems is usually motivated by the availability of device support, file-systems, network connectivity, and UI support. All these things can be available in an RTOS, but often with less broad support, or at additional cost or integration effort. Many RTOS are not full OS in … Read more

Working of __asm__ __volatile__ (“” : : : “memory”)

asm volatile(“” ::: “memory”); creates a compiler level memory barrier forcing optimizer to not re-order memory accesses across the barrier. For example, if you need to access some address in a specific order (probably because that memory area is actually backed by a different device rather than a memory) you need to be able tell … Read more

Image vs zImage vs uImage

What is the difference between them? Image: the generic Linux kernel binary image file. zImage: a compressed version of the Linux kernel image that is self-extracting. uImage: an image file that has a U-Boot wrapper (installed by the mkimage utility) that includes the OS type and loader information. A very common practice (e.g. the typical … Read more