Question:
how an orerating system can be designed?
geniusguy_k
2006-09-27 20:32:28 UTC
i have some functions for boot loader, kernel, and system calls....i want to design an non-GUI OS. how can i link these functios?
Four answers:
Michael Darnell
2006-09-28 00:26:53 UTC
There are some good resources here;

http://dmoz.org/Computers/Programming/Operating_Systems/



This is a site where you can look at the achitecture of projects and solutions by other people who have attempted to tackle the problem. After you look at their work perhaps you may come up with an idea of your own or decide to follow someone else's vision.



The basic idea that you need to tackle first is what do -you- think your OS design should do?



Usually the architecture of the hardware shapes the design of the OS to a greater or lesser degree, so I owuld recommend that you think about the physical hardware constraints of the problem first and work back from that to the organizing structure and architecture of the OS. It can be done to make an OS completely independent of the hardware - as a Java OS for example - But it would be interesting to see what happems if you independently define your own specification and requirements.
Balk
2006-09-27 20:59:59 UTC
Uh, the problem here is that we can't see what files you have to work with. Even then, why would you want to make a project like that if you don't know how to stitch the parts together?



I don't want to discourage you, but how about starting in a modular fashion?

My suggestion:

I would suggest starting off with a 3 1/2 " disk with your bootloader on it. Create a simple DOS first. Start by building a simple command prompt. Your boot loader calls the command prompt program. It's simple, yet you should start off slow. Then you have to design functions which other programs can call (via interrupt - just like DOS function 0x21) for file reading, writing, file seek, file open, etc.

Once your DOS is complete, then you can have your bootloader load the DOS module and then call your command.com program. You must also decide on how the data is going to be formatted on the disk. Perhaps the first 2 tracks can be dedicated to the disk directory.

You'll also need to design a sort of FAT table.

As you can see, creating your own DOS is quite challanging in itself.

After you have your DOS all ready, then try adding another module for additional features, such as memory allocation, or device drivers. The bootloader starts loading the different modules one after another, until it gets to the command.com program.



There is one problem though. If you use a DOS compiler or Assembler to create programs, the compiler and Assembler will create a DOS program. That is, the programs will have an .exe header. Your own DOS must be able to read it - unless you want to make time consuming modifications to the compiled .exe file. For experimenting around, I don't recommend creating your own style of .exe files. Read up on how the DOS .exe files are created, and the data structure of the .exe header.
2006-09-27 20:59:10 UTC
I'm not a computer science or a computer engineer major. I am a computer information system major. I have done some studying on how an operating system works.



It seems to me that a bootloader is going to have to know how to load everything into memory. So somehow, you are going to have to write code that will know how to execute the kernal and make calls to the system. Your bootloader is going to have to be written in a way that acts like an editor. When you are working in your programming editor, you have your code write before your eyes. With the code right in front of you, you press the execute button, or compile button and it will launch the code that you just written. So you are going to have to figure out how to make the bootload carry out the instructions that are written for the kernel.



I think you are going to have to read the kernel line by line in binary and place it into memory. Once it is in memory, maybe you can use it in conjunction with the bootloader to make it work.
2006-09-27 20:35:13 UTC
first we gotta figure out just what the heck an orerating system is


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...