uCLinux: Processes in kernel

Processes can be classified as either I/O-bound or processor-bound. As the name suggests, the former is a process where much of the time is spent in waiting for relatively slow I/O operations to complete. For instance, a process taking input for a word processor will be I/O-bound as it spends most of its time Read more…

uCLinux: Multitasking in Linux kernel

Multitasking operating system is a software that offers interleave execution of more than one process. It is capable of executing several processes concurrently and therefore giving an illusion of parallelism in the view of user abstraction. Multitasking operating systems come in two flavors: cooperative multitasking and preemptive multitasking. In cooperative multitasking, a process does not stop running until it is Read more…

uCLinux: Timer Interrupt Handler

Having the understanding of HZ, jiffies, and system timer, it is appropriate to discuss the implementation of time management. Most of the jobs in time management are handled by a dedicated function called timer handler. In Microblaze, the kernel registers timer_interrupt as the interrupt handler: irqreturn_t TIMER_TEXT timer_interrupt(int irq, void *dev_id) { timer_ack(); Read more…

uCLinux: System Timer

Time management is crucial to Linux kernel. A massive of kernel functions are time-driven and therefore it is heavily dependent on time management. In Linux kernel, time management is handled by a piece of programmable hardware, known as system timer. The main job of system timer is to generate an Read more…

uCLinux: Jiffies in the Kernel

Having the discussion of tick rate in my previous post, it is therefore appropriate to introduce jiffies in linux kernel. Jiffies is a global variable declared in <linux/jiffies.h> as: extern unsigned long volatile jiffies; Its only usage is to store the number of ticks occurred since system start-up. On kernel boot-up, jiffies is Read more…

uCLinux: Tick Rate

With a large number of kernel functions are time-driven, the time management in kernel is very important. The frequency of the system timer (tick rate) is programmed on system boot based on a static preprocessor define, HZ. The value of HZ is architecture-dependent, and it is defined in: <asm/param.h>. The tick rate Read more…

Trivial Do/While Loop

A trivial do/while loop is an useful technique in C programming to make a multi-statement macro. Consider the following multi-statement C preprocessor macro and if-statement with two branches: #define aemb(x) { do_this(x); do_that(); } if (x > y) aemb(x); // Branch 1 else aemb(y); // Branch 2 Compiling these codes Read more…

Introduction to uClinux

As mentioned in the previous post, I’ve decided to work on μClinux kernel porting as my project in AESTE. I will briefly introduce it in this post. μClinux (Micro-Controller Linux) is a linux kernel targeted for embedded devices without memory management unit. μClinux was first implemented in DragonBall integrated microprocessor, Motorola Read more…

Yick Hong: Introductions

I’m a final year student from Multimedia University (MMU), currently pursuing Bachelor of Engineering (Honours) in Electronics. As for my first post in AESTE’s blog, I’m sharing my experiences on job application to AESTE, and the work progress thus far. The job application to AESTE involved two stages. The first stage Read more…