Simple Kernel???

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.
Locked
KernelX
Posts: 7
Joined: Wed Feb 15, 2012 9:48 am

Simple Kernel???

Post by KernelX »

I am a new to Osdevelopment.I have no idea where to start with, I know C.
What must a kernel have?
What must be it functions?
What knowledge do I need to make my own kernel?
Can anyone please list out some common stuff required for developing a Kernel.

Thanks in advance. :D :)
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Simple Kernel???

Post by AJ »

Hi,

This stuff is all on the wiki and has been asked on the forums (recently) too. Start with Getting Started and work from there. If you have programmed with C you will have used a libc and API calls. Think about the support you get from the host OS when you are developping applications. If you are writing an OS, that's the sort of framework your application developpers will expect you to provide.

Cheers,
Adam
KernelX
Posts: 7
Joined: Wed Feb 15, 2012 9:48 am

Re: Simple Kernel???

Post by KernelX »

Oh yea! Got it.Going through the site.

Thank You, looks these forum are a good place to get through.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Simple Kernel???

Post by Brendan »

Hi,
KernelX wrote:What must a kernel have?
What must be it functions?
There's major differences between "must" and "should". There is nothing that a kernel must have.

A kernel should have a description that describes what type of kernel it is. For example, an exo-kernel is very different to a monolithic kernel (with radically different functions).
KernelX wrote:What knowledge do I need to make my own kernel?
I'd recommend learning about various kernel types (exo-kernel, micro-kernel, monolithic kernel) and various ways of doing IPC (messages, pipes, etc); plus understanding what "real-time" means. These things tend to have a large impact on the nature of the kernel.
KernelX wrote:Can anyone please list out some common stuff required for developing a Kernel.
The Required Knowledge list might help here. I'd probably add some more to it - some sort of goal that makes the OS/kernel unique, a lot of spare time for development, and pizza. ;)


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
KernelX
Posts: 7
Joined: Wed Feb 15, 2012 9:48 am

Re: Simple Kernel???

Post by KernelX »

My list of the things what a basic 32-bit PMode kernel must have.
1)Enable A_20
2)GDT,LDT,IDT
3)Screen Functions(printf,cursor,clrscr,etc)
4)Interrupt Management(ISRS too)
5)Memory Manager
6)Timer
7)Keyboard

Thats All!!!!
Also a good bootsector.
Hope that's enough for a day of hardware work!!!
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: Simple Kernel???

Post by turdus »

KernelX wrote:My list of the things what a basic 32-bit PMode kernel must have.
Neither a "must have" really.
1)Enable A_20
It could've been done already (e.g. by grub)
2)GDT,LDT,IDT
LDT is definitely not a must.
3)Screen Functions(printf,cursor,clrscr,etc)
What about serial consoles?
4)Interrupt Management(ISRS too)
You can skip ISRs for IRQs (see polling).
5)Memory Manager
You can allocate all necessary memory for the kernel at boottime, so no kernel memory manager needed.
6)Timer
You can left it out if you choose cooperative multitasking.
7)Keyboard
Again, what about serial consoles? As a matter of fact, neither of my servers have any screens or keyboards, yet I'm able to communicate with them.
Thats All!!!!
Also a good bootsector.
Hope that's enough for a day of hardware work!!!
A good bootsector doesn't exists either. Simply because it has one purpose: load the kernel. That cannot be done in good or bad way. If it's get loaded, the bootsector is functional, regardless of how it's accomplished.

I think you should spend more time on theory first. Read Tanenbaum's book at least (focusing on theory, not implementation details).
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Simple Kernel???

Post by Combuster »

Are you Yashas?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Locked