Select Page

All Posts

Traversing a VMA red-black tree in Linux

void dfs(struct rb_node *node) { struct vm_area_struct *vma; vma = rb_entry(node, struct vm_area_struct, vm_rb); trace_printk("VMA: [0x%px - 0x%px]", (void *)vma->vm_start, (void *)vma->vm_end); if (node->rb_left) dfs(node->rb_left); if (node->rb_right)...

read more

6.828/2018 Homework: User-level Threads

If a concurrent thread causes the condition to be true, that thread must either hold the lock on the condition before the sleeping thread acquired it, or after the sleeping thread released it in sleep. If before, the sleeping thread must have seen the new condition...

read more

PC Assembly Language: Chapter 1, 2

In my last post, I published my solution for the first exercise in the xv6 book for 6.828's 2019 version. Unfortunately, I somehow found it hard getting familiar with RISC-V instructions and, at the same time, trying to understand all these O/S concepts. Moreover,...

read more