#4 bi-weekly progress report

Published: Mon 02 December 2019

Good news! Thanks to JUrb contributions we can create, delete and list directories on tmpfs filesystem! We’ve got some contributions from students who do not participate in the course officially :)

More tests for process groups (setpgid, kill, killpg) (by AChud)

Some simple functional tests for syscalls related to process identity were added to test suite. The more tests, the safer we are. Good!

Fix: don’t deliver signals to zombie processes (by JMaz)

The kill syscall didn’t check target process state when posting a signal, what caused kernel panic when the target was a zombie. This issue has been fixed.

Debugging: automatically swap user program symbols (by JMaz)

As in case of other OSes, a session of Mimiker will most likely consists of multiple user process invocation. Our debug infrastructure, however, was unable to load appropriate debugging symbols from ELF file of currently running user-mode process, sticking to symbols from the first ELF file ever loaded. This defect has been repaired.

Build kernel/user-space with Clang and run tests under CircleCI (by JPiec)

These two pull requests provide full support for building Mimiker with Clang, both locally and as a Docker container in the cloud environment CircleCI. We use CircleCI to run functional tests on pushed code before merging it with master branch of Mimiker GitHub repository.

vmem allocator: simplify code and add missing functions (by JPsz)

Virtual address allocator vmem was able to allocate virtual space segments, but not to deallocate them. This has been fixed. Some polishing was also done, like the allocation strategy was changed from instant-fit to best-fit, thus decreasing likehood of fragmentation.

tmpfs: implement readdir, rmdir, rmdir v-node operations (by JUrb)

In process of developing Mimiker’s own tmpfs implementation readdir, rmdir, rmdir operations were crafted and attached to virtual file-system infrastructure.

Implement mkdir & rmdir syscall (by JUrb)

Apparently, Mimiker didn’t have mkdir & rmdir syscalls. Upto now the only filesystem available was intird, whose directory tree was fixed before system startup. With the implementation of tmpfs making these syscalls available became justified.

Import echo, mkdir, rmdir & pwd commands from NetBSD (by Cahir)

Once directory and file-manipulating syscalls and vnodeops are implemented, it remains to provide user with corresponding command-line tools. These taken from NetBSD simply work!

Use high-resolution MIPS CPU timer for system clock (by Cahir)

Current hardware platform of Mimiker, the Malta board features legacy PIIX4 south bridge with 8254 Programmable Interrupt Timer, which upto now has been used as Mimiker’s system clock. Some time ago, in order to make kernel more hardware-agnostic and to provide it with higher-resolution measuring capabilities, Cahir decided to use a timer built in the CPU and implemented it as one of Mimiker’s device. But at that time Qemu emulation of MIPS CPU was flawed, and the emulated timer failed to provide accurate measures. This has been recently fixed, and Cahir’s code started to work as expected.

Move some subsystems to kernel virtual address space (by Cahir)

Kernel thread stacks, pool allocators, physical memory allocator and other kernel subsystems are being moved to virtual space. Great!

Introduce kmem: kernel wired virtual memory allocator (by Cahir)

Brand new kernel subsystem has arrived: ‘kmem’ is a low-level kernel memory allocator serving arbitrary page-aligned virtual memory blocks. It employs, but shouldn’t be confused with, both vmem (virtual address-space manager) and pmem (page-table manager). It is, in turn, employed by pooled allocator pool and general-purpose allocator kmalloc.

Simplify kernel bootstrap: add list of physical memory segments (by Cahir)