Demi OS
Home
History
Download
About
Links
10-23-05: Managed Virtual Memory

It took me a few days of pondering. Then after that, it took me about an hour to code. Finally, after all that work, it took until 2:16am to get it debugged. Turns out you need the physical address of page tables and directorys, not the virtual address. After I thought about it, it made sense - How would it know the virtual translation of the address if it had to know it to access it? Rather interesting problem. However, it's made my life a lot easier not having to do that useless conversion.

Also, I've changed the memory manager. Instead of a bitmap-based one, I'm using a stack-based one. The cool thing about this one is you can calculate the amount of free memory without having to search through a huge list of free pages. Instead, you can take the current stack pointer and subtract the stack start, divide by four, and you have the amount of available pages in memory! Of course, one page is 4k, so the divide-by-4 is useless. I just don't divide by 4, and that way I can return the number of kilobytes of free memory

My basic setup for the virtual memory is posted under the Download->Documents section. I've also added all the other current finished/pending documentation. Two are microsoft word 2003 documents, but the other two are standard plain-text format.

Latest Screenshot:
10-23-05: More memory, managed virtually :)
The Demi-OS version 0.0.6a Kernel, four threads running in parrallel, and more available memory
10-17-05: Multi-Threading

After a couple of coding rants, and small to major design changes, I've got something cool to show for it! I've got two completly seperate threads, running in parrallel. I had to patch my printing functions a little to do it, though. It only kept track of one set of cursor locations, so it would print half of task 1's data then move to task 2's, creating a jumbled mess. But I did a little patch for that, though it is a little bit cut and paste of one. However, here you are:

Latest Screenshot:
10-17-05: Yay! Two threads
The Demi-OS version 0.0.5c Kernel, two threads running in parrallel (almost)

In this picture, two tasks (threads) are running: Each has one line of the console. Task one has the line with the 1, and task two has the line with the 2. They are only doing one thing - Counting from 0 to 0xFFFFFFFF!