Ghost Kernel

Working on SATA AHCI support 2025/01/15, 19:25:46

For a long time the system only supported ramdisk access in the virtual filesystem. The reason was mostly that for building the remaining system architecture, that was sufficient. In order to be able to install the OS from the Live ISO onto a hard disk, this is obviously a crucial feature though.

The plan is to create separate PCI, AHCI and filesystem drivers as well as a general disk management service to take care of which device is managed by whom. All of them will be privileged userspace processes.

In previous versions, there was already a userspace protocol that would allow a process to register as a filesystem driver and provide a mountpoint. This communication is mostly via the means of messaging, while for actual file reading and writing shared memory will be the preferred way. In the course of this implementation this functionality will be restored.

0 comments

A proper memory allocator 2024/09/18, 17:55:40

For a very long time now the memory allocator that was in place on kernel level was pretty crappy. When implementing this first it was one of the "I'll do that properly later" pieces of code that then are never touched again since they work well enough. Well, it actually didn't and caused a lot of issues both performance and stability wise.

The allocator is now replaced by a new one that features a mix of bucket and chunk allocation which vastly improves performance for the huge amount of tiny allocations that the kernel likes to make.

Aside from that I've updated the build script to respect library dependency (currently by just defining it there) which should avoid issues when setting the project up initially.

Try the release now.

0 comments

Docker toolchain 2023/09/12, 22:59:13

There's now a Docker image available which simplifies the process of setting up your local development system if you want to modify Ghost. Just clone the repositories, create a container and get started.

Check the documentation for more details!

0 comments

Ghost 0.12.0 and a lot of refactoring 2022/10/09, 00:10:09

After being inactive for a pretty long time (sorry :) I've recently refactored quite some parts of the system.

The wait handling has been extensively reworked so that sleeping an waiting for file I/O is way more efficient now. The scheduler was slightly improved with this change as well. I also added support for the legacy PIC again since all the code was there, so it works without the IO/APIC activated.

Many dumb performance bugs in the window server have been fixed. Here's something for the eye:

0 comments

C++ runtime & thread-local storage support 2020/01/28, 23:44:12

With the latest commits, C++ runtime features (most notably exceptions) and thread-local storage are now supported in executables and shared libraries.

The toolchain build was modified so that the shared version of libgcc libgcc_s.so.1 is now built. Using -shared-libgcc as a linker flag will now cause libgcc to be linked dynamically and therefore allow exception handling over multiple shared objects.

I've adapted the test suite to now call a runtime test program that performs multiple tests for global constructors, exception handling and TLS.

With those additions, shared library support should now be sufficient to continue work on other parts, most notably inter-process messaging will next be implemented in the new kernel implementation.

0 comments