development decisions

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
yemista
Member
Member
Posts: 299
Joined: Fri Dec 26, 2008 12:31 pm
Location: Boston
Contact:

development decisions

Post by yemista »

I am planning to take up working on my OS again. I had to stop a bit for other obligations, but Im still stuck at where I left off. Right now, I have something allows interrupts in protected mode, and has paging enabled. Here is the problem.

I need to do more work on my memory manager to make it so that it can create tables for a process and allocate memory for them. The problem though is, in order to test it and confirm it works, I would need a way to create and switch to a new process, to show that indeed the tables have been allocated correctly and allow a process to run. In order to verify that a process is working, I will at least one system call so I can at least print something to verify the process can make calls to kernel space, and it can return to user space and continue its execution. I have an idea of how to do each of these things, but the big hurdle is that it seems like I will need to develop all three alongside each other, or at the very least process management with memory management. How have people handled this in the past? Im inclined to just go for it, but if something is not working right it will be very hard to tell what it is, but on the other hand, it seems that in order to test one piece, you will need other pieces working.

Also, I forgot to add, it seems that in order to run processes, you will need to be able to read some type of filesystem so you can read in the program, or am I wrong about this and for testing you can hardcode a simple process into the main kernel code?
User avatar
Tomaka17
Member
Member
Posts: 67
Joined: Thu Oct 02, 2008 8:20 am

Re: development decisions

Post by Tomaka17 »

In fact you don't have to create a process to test your memory manager

Just make it create a page directory, manually switch to it, write to a random user-space location, read back and see if everything worked
This should be enough to tell that it is working well

Afterwards you could create several processes whose starting point would be in your kernel code and see if it works (don't forget to make your kernel space available in user mode by setting the appropriate flag)
This way you won't need any syscall, just call your kernel's printf
MysteriOS
Currently working on: TCP/IP
Post Reply