Page 1 of 1
Implementing tasks
Posted: Wed Jul 11, 2007 8:31 pm
by artrecks
I'm trying to implement task ( processes , threads, etc.. ) in my OS, but I got some doubts and I would be very happy if somebody helps me. I want to know if I need a thread for my kernel ( since it's the main console ) ??
Posted: Thu Jul 12, 2007 5:21 am
by LaurensR1983
Well I'm pretty new to OS development, but after some reading it became clear to me that your kernel and your console should be 2 different things. A console is usually a seperate process that calls kernel functions for executing commands/programs.
I'm currently figuring out memory management stuff, which is one of the most important things you must do before implementing threads, etc.
So if you haven't done that already, I suggest you start working on a good memory manager that supports Segmentation and/or paging. These mechanisms help you protect one process from another + it gives you some flexibility in loading your application.
Posted: Thu Jul 12, 2007 6:02 am
by artrecks
ok, thx for the reply
so, I'll need to write a console in another file that can be loaded and executed by the kernel ?
Posted: Thu Jul 12, 2007 6:32 am
by JamesM
It is normal (I say normal here meaning UNIX-like) to spawn your first process, which will fork and spawn other processes (drivers, daemons etc) , one of which is a shell. That would provide console support by interacting with your kernel through syscalls.