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 waiting for characters input. Such a process is runnable for only short duration, because it is eventually blocked to wait for more I/O. On the other hand, processor-bound process spends most of the Read more…

LLVM: Compiling FreeRTOS with LLVM (Part 2)

Continue from my previous post, LLVM: Compiling FreeRTOS with LLVM (Part 1). Anybody who might have some basic skills in programming, creating Makefiles especially, must be laughing hysterically if they come across and read my previous post in this topic. When I google the phrase “Compiling freertos with llvm” or “freertos llvm”, my post comes out first in the results. I wonder how many read that post. Silly me, pity them. I was laughing at myself and feel embarrassed when Read more…

Village Base Station

Guess what? It’s powered by AESTE technology. Yeay! Shareable recently covered a group of residents of Jalalabad, Afghanistan who built their own open-source wireless network from junk and everyday household items. For the less-industrious yet DIY-inclined, the Village Base Station (pdf) is a low-power, easy to deploy tool developed by Berkeley professor Kurtis Heimerl to create a GSM cellular data network in areas with limited power and network resources. MobileActive recently got their hands on a prototype and tested it 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 voluntary to do so. As the result, process in a cooperative multitasking system can dominates processor time. Conversely, in preemptive multitasking, a running process is suspended involuntarily so that next process can be Read more…

LLVM: Compiling FreeRTOS with LLVM

It is about two more weeks before my internship at Aeste ends. Yesterday, I finished my task of cleaning up LLVM floating points instructions and cache instructions. What I did was just hunt all these unwanted instructions inside AEMB target directory files and remove it without damaging the files or disrupt any dependencies. That was it, but I am not sure its going to be working or not. Now, come the second part, testing the code by compiling FreeRTOS with Read more…

LLVM: Cleaning up instructions

My recent task is to clean up the instructions from LLVM code. One must wonder why do I need to clean up the instructions, well perhaps the definition of my recent task was not adequately explain here. AEMB is considered as binary compatible to the Xilink Microblaze (Wikipedia link), however it is not a ‘drop in’ replacement. For a quite distinctive example, AEMB does not support floating point instructions. Yet. Fortunately, due to the compatibility of their instruction-set, I was Read more…

Should You Join a Startup? The Answer Is Increasingly Yes!

Just read another interesting piece on why it is becoming increasingly more beneficial for people to join startups instead of large corporations. Quoting the main bits of the article: The Steady Income Myth In an adequately funded startup company one is guaranteed to have an interesting two year run, constantly learning more and something very valuable to walk away with afterwards regardless of what happens. The Influence In a startup you get to directly influence the product you are building. Read more…

QEMU: Carry and Carry Copy

AEMB is a family of highly-rated open-source embedded microprocessor core. All the programs for AEMB have to run in a simulation environment, because the core has not yet been implemented in silicone chip. Recently, one of the interns is assigned with the porting of AEMB for QEMU. With the QEMU ported for AEMB, it serves as a platform for application to run the embedded microprocessor. QEMU is a processor emulator that relies on dynamic binary translation to achieve a reasonable speed. The core of QEMU is Tiny Code 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(); write_seqlock(&xtime_lock); do_timer(1); update_process_times(user_mode(get_irq_regs())); profile_tick(CPU_PROFILING); write_sequnlock(&xtime_lock); return IRQ_HANDLED; } When kernel is executing timer handler, the timer is first acknowledged, followed by obtaining the xtime_lock lock, which protects access to jiffies and 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 interrupt at a fixed frequency. A dedicated code, known as timer interrupt routine is executed for each issued interrupt to update system time and perform periodic work. In hardwave abstraction, timer is implemented Read more…