Plz advice

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
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Plz advice

Post by DeletedAccount »

Hi fellow OS developers,
I have made a 16 bit OS.Now i would like to build 32 bit unix clone
for learning purposes.Plz advice.................................
My Skills
----------
C/C++,Java,x86asm,QBasic,Game Progarmming,html etc...
Design Details
----------------
1)Monolithic,premptitive kernel (at least partially premptetive..)
2)Scheduling Mechanism(not finailized)
3)Memory management(not finalized)
4)File Systems to be suported..ext2
5)binary format elf or a.out
6)Palform -386
7)SMP -support -n/a
8)POSIX complaint - yes

What are the other design descisions i have to make plz -help?
joke
Member
Member
Posts: 56
Joined: Sat Jul 22, 2006 6:20 am

Post by joke »

Well if you go Pmode you have one very important issue :
Are you going to use segmentation or paging?
I can't advise on which of the two is the best cause currently i program only in real mode. Also you must create drivers cause there are no bios interrupts in pmode :wink:
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
User avatar
hailstorm
Member
Member
Posts: 110
Joined: Wed Nov 02, 2005 12:00 am
Location: The Netherlands

Post by hailstorm »

@Joke: BIOS interrupts do exist in pmode, but it is extemely difficult to use them.

Design decissions you could make:

Is it going to be multi or single user?
What kind of scheduling technique are you going to implement?
Memory model
Hardware support / Device handling
joke
Member
Member
Posts: 56
Joined: Sat Jul 22, 2006 6:20 am

Post by joke »

Well BIOS calls exist BUT it is easier in pmode to make things manually than to try to call bios int from there and the point is to make life easier :lol:

About the memory model there are two basic forms:
1) Flat memory
Which means you have two segments overlapping each other
2)Segmented
you carefully divide the memory to segments , at least two for the kernel and you use other means (ex LDT) to define segments for each process
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
User avatar
hailstorm
Member
Member
Posts: 110
Joined: Wed Nov 02, 2005 12:00 am
Location: The Netherlands

Post by hailstorm »

About the memory model there are two basic forms:
1) Flat memory
Which means you have two segments overlapping each other
2)Segmented
you carefully divide the memory to segments , at least two for the kernel and you use other means (ex LDT) to define segments for each process
I wish it was always that simple, but in this case it ain't. Memory management is very underrated subject I believe and hard to implement. By just saying that there are just two basic forms which even don't mention paging is to easily put. [-(

But enough about that. It is important to decide whether to implement paging or not, or to implement full-segmented memory management. In either case, at least a few segments must be created to realize a full working protected mode environment.

Last to say, I think it is very important to make a global design on how memory is managed by your os. It doesn't have to be 500 pages containing essay ofcourse. Just global design strategies. For example, in case of paging, how are you going to keep track of all free and used pages? Paging is a wonderful concept, but it's level of abstractness can give system programmer a hard time implementing it.
joke
Member
Member
Posts: 56
Joined: Sat Jul 22, 2006 6:20 am

Post by joke »

hailstorm wrote:
About the memory model there are two basic forms:
1) Flat memory
Which means you have two segments overlapping each other
2)Segmented
you carefully divide the memory to segments , at least two for the kernel and you use other means (ex LDT) to define segments for each process
I wish it was always that simple, but in this case it ain't. Memory management is very underrated subject I believe and hard to implement. By just saying that there are just two basic forms which even don't mention paging is to easily put. [-(

But enough about that. It is important to decide whether to implement paging or not, or to implement full-segmented memory management. In either case, at least a few segments must be created to realize a full working protected mode environment.

Last to say, I think it is very important to make a global design on how memory is managed by your os. It doesn't have to be 500 pages containing essay ofcourse. Just global design strategies. For example, in case of paging, how are you going to keep track of all free and used pages? Paging is a wonderful concept, but it's level of abstractness can give system programmer a hard time implementing it.
You are right i just wanted to give a very general image :D Anyway hailstorm is right in every case. As for other OS concepts also keep in mind filesystems (eg FAT)
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Thanks everyone ,but need a litte more assistance....

Post by DeletedAccount »

Thanks everyone for your comments,
But can anyone tell me the different steps in making
unix clone so that I am implement each of them in
a clean and consistent manner......
User avatar
hailstorm
Member
Member
Posts: 110
Joined: Wed Nov 02, 2005 12:00 am
Location: The Netherlands

Post by hailstorm »

Sandeep: It's a bit difficult to answer the question you are asking. I'd like to advise you to do some research on the key aspects of the unix operating system...
Nah, what the heck am I babbling: Here's a link to a document that I found using google:
http://isabelle.in.tum.de/library/HOL/Unix/document.pdf

It is a clear document about the philosphy of unix. You can see unix as a an operating system that consists of many smaller tools.

I think nobody can pave the path you have to walk. But I am sure there are a lot of people who can guide you and answer your question...
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Thanks man,

Post by DeletedAccount »

I love this site...I almost get an instant reply to my
questions...Thanks hailstorm ...
User avatar
hailstorm
Member
Member
Posts: 110
Joined: Wed Nov 02, 2005 12:00 am
Location: The Netherlands

Post by hailstorm »

No problem, m8! 8)
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

help

Post by DeletedAccount »

Can anyone tell me some sites of interest and some
kernel which i can hack to learn the principles...
joke
Member
Member
Posts: 56
Joined: Sat Jul 22, 2006 6:20 am

Post by joke »

Minix 3 rocks and very good example
http://www.minix3.org/

The GNU Hurd, the real gnu kernel
http://www.gnu.org/software/hurd/hurd.html

linux of course :)
http://www.kernel.org

openbsd
http://www.openbsd.org/

debian is not a kernel but an example of a good unix variant
http://www.debian.org
I need someone to show me the things in life that I cant find
I cant see the things that make true happiness, I must be blind
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Thanks joke

Post by DeletedAccount »

Thanks joke....But do you have links to smaller unix like kernels...
Post Reply