thewrongchristian wrote:
I've had a look, and I think it's very cool. FiwixOS is one of the OSes I've looked at before, in awe. Such a neat little system.
Thank you very much. I appreciate your words.
thewrongchristian wrote:
Do you have plans on generalising it though?
i386 is very ingrained, so it looks like it'd be a lot of work to port to another CPU.
Yes, I know, well, I really love old computers (386, 486 and pentium).
In the near future, I'd like to include support of at least one architecture more to help to reorganize the code. So in this aspect, I plan to include support for a RaspberryPi card.
thewrongchristian wrote:
Kernel memory allocation is purely page based, regardless of allocation size. While simple, it must waste an absolute ton of memory!
Yes, it's as simple as you said. This is because I wanted to focus on functionality before than efficiency.
It doesn't waste so much memory because most of the arrays in kernel have fixed size in the code, so the kernel don't need to requests dynamic memory all the time. Almost only for buffers.
Nevertheless, this will 'partly' change soon because in the last weeks before the release of this new version, I have been working to include the buddy algorithm to manage kernel requests smaller than a page size (4096). I've been testing it on an isolated environment and it looks promising. In the next days I'll include it in the kernel and will change some fixed sized arrays to dynamic.
I said 'partly' because all the structures that require more than a page size will continue use fixed size arrays. This will definitely change when a new kernel memory allocator can be able to manage contiguous page frames, perhaps using also the buddy algorithm on top of the current buddy algorithm used for requests smaller than a page size.