Executing binary with demo 25

General questions related to the company.

Moderator: Moderators

Executing binary with demo 25

Postby MSPG » Sat Jun 04, 2016 4:03 am


Im new in this world of OS developing, and I want to tell you, Mike thank you for all your tutorials, Although my main language isnt English I could understand much about OS Develop.

Now back to the point:

I'm on the 25th tutorial of OSDevelo Series, and I have made some modifications and I've created my own font system, using drawing to the screen with VESA.

I created a "Loading SO Phase" with printing to the screen the perctage of load (it not loads nothing only shows a "Loading" text), Now in this point I planned to execute PE files like tutorial 24 (to prepare to enter in user mode). but there are many changes comparing tutorial 24 to tutorial 25, knowing this, How I execute the PE files using the tutorial 25 ?.

and I get a General Protection Faul when I try to enter in user mode,

Thanks for any answer
Posts: 1
Joined: Mon May 30, 2016 8:58 pm

Re: Executing binary with demo 25

Postby Mike » Sat Jun 04, 2016 9:51 pm


We provided PE loading support in Chapter 24 for demonstration purposes only. As you are aware, we removed it in Chapter 25 so we can demonstrate threading and multi-threading without the overhead of supporting user mode processes. Supporting user mode processes is still possible, however to do it properly we need address space management, which has not yet been discussed. We also need a kernel mode heap to allocate the kernel mode stacks for each thread - which we also have not discussed. So, rather then introducing two large topics in Chapter 25 and instead of hacking it to get it to work (it can certainly be done) we opted to wait until these topics are introduced first and remove the code entirely.

With that said, Chapter 26 is in a pre-release state (it is incomplete!) and discusses memory management techniques (including kernel heaps) -- for the series kernel, we will most probably stick with a free list due to its simplicity although the chapter covers more advanced topics as well. This will allow us to dynamically allocate data structures in kernel mode (including kernel mode stacks.)

We will then be covering address space management, such as segmentation, algorithms (list vs AVL tree) and, for our purposes, we will probably use the list approach to keep things simple. This may or may not be in Chapter 26 - still undecided about it. There is also another issue we never actually discussed - updating the page tables. We sort of introduced the topic of recursive page directories in the VMM chapter, however we want to cover it in more detail since we will be needing it in later chapters.

Some additional changes are very small and minor - primarily with the IRQ's - are to improve compatibility with later Visual Studio versions.
User avatar
Site Admin
Posts: 462
Joined: Sat Oct 20, 2007 7:58 pm

Return to General Questions

Who is online

Users browsing this forum: No registered users and 1 guest