Step1
Development Environment
Building a development environment consists of two machines, a development workstation and a testbed machine. The workstation needs to be a Unix variant which is able to compile GNU binutils and gcc. The testbed needs to be a 386 with at least 2 megs of RAM on a network and video card.Decide what you want your OS to do. Whether it is a fully capable OS with a GUI or something a bit more minimalistic, you'll need to know what direction you are taking it before beginning.
Step2
Compiler
Compile, build the image, and boot a basic Operating System to display "Hello World!". Then, write a text output driver to handle displaying text, numbers, addresses, and more, as well as scrolling the display.Decide on your bootstrap strategy
Step3
Debugging
In debugging method is The Assert() macro is a useful tool in all programming, not just in operating system development. However, it takes on extra importance in an operating system, since, without a conventional debugger, there are frequently no other convenient ways to fully test a system. Assert() is not much more than an if()/else macro, but therein lies most of its power. When the system is fully debugged, the Assert()s can be compiled out (taking up no code space and no time during execution) by turning off a compile-time definition.
Assert() simply takes a C expression and asserts its truth. If the expression is true, execution continues without any noticeable interruption. However, if the assertion is false, the program should print out some debugging information and halt immediately.
Step4
OS Kernal
It is essential to understand the heart of the OS,is known as kernal, is the MOST important part of an OS. Fancy graphics and SVGA coding can all come after you have developed a solid hardcore kernel. Protect the kernel from itself, by installing exception handlers that will print out debugging information (fault type, location of fault, and machine state) for all valid exceptions.Get gdb remote debugging to work.
Step5
i386
Write an application program for your OS to load and execute. Then, interface the application to the kernel via some simple system calls and write a few of the simpler calls.Use the i386's I/O address space to extend your video driver to video driver to move the cursor as you output text.Now would also be a good time to start work on the system standard library.
Step6
Intel memory map
Next decide the memory management,choose two schemes for managing memory; one for managing internal data structures in kernel memory and one for managing application memory. Lay out the address space and modify the kernel to bootstrap itself into this new model. Finally, run an application in the new address space, and handle page faults by mapping in unused pages.
Step7
Multitasking
Now go for the multitasking, Start two tasks (they may or may not be the same) and context-switch between them.
Step8
Interprocess Communication
Then do the interprocess communication ,start two dependent tasks that use this mechanism to effectively cooperate. Run the two tasks in different address spaces. Analyze the system to see if any race conditions exist or if deadlock could result if the system is interrupted at any random moment.
Step9
Device driver model
Develop a device driver model which handles both IO and Interrupts.For the adventurous try your hand at getting PCI working.In most architecture the PCI bridge handles most everything such as Memory Mapped IO, DMA, and I/O ports it you are on a PC. All that you don't have to worry too much about except for configuring it.
Step10
Symmetric multiprocessing in OS
Perform the symmetric multiprocessing. Using multiple processors which share the same physical memory in the same computer at the time.
Step11
Start small. Begin with small things such as displaying text and interrupts before moving on to things such as memory management and multitasking.
Step12
PCLinuxOS mklivecd
If you want an easy way, consider Ubuntu remastersys, Fedora Revisor, Custom NimbleX, Puppy Remaster, PCLinuxOS mklivecd and SuSE KIWI.
Comments
mithu12 said
on 9/11/2008 Hi there, I came across this site and saw few of your articles - eye care and making operation system. You have done excellent work by giving such valuable info. The easy to read and understand language and very thorough knowledge and sharing techniques. It shows from your background from Intel and research scientist. Great !! keep it up.
ChristinaEllis said
on 5/30/2008 A well written and informative article. Thank you for taking the time to share this with us.
Intelmit said
on 5/30/2008 Thanks a ton !I wish to write more good articles.take care.
MarlaineMarie said
on 5/29/2008 Great guide here...... I sent it on to my husband as well. You did a great job!
showpup said
on 5/29/2008 Great information and love all the photos you took the time to include to show these steps. 5 stars