1. Learn programming before you begin. Assembly language is essential; another supplementary low level language such as C is strongly recommended.
2. Decide what media you want to load your OS on. It can be a CD drive, DVD drive, flash drive, a hard disk, a floppy disk, or another PC.
3. Decide what you want your OS to do. Whether it is a fully capable OS with a graphical user interface (GUI) or something a bit more minimalistic, you'll need to know what direction you are taking it before beginning.
4. Target what processor platform your operating system will support. AI-32 and x86_64 are the two most common for personal computers so they're your best bet.
5. Decide if you would rather do it all yourself from the ground up, or if there is an existing kernel you would like to build on top of. Linux from scratch is a project for those that would like to build their own Linux distro, for example.
6. Decide if you're going to use your own boot-loader or a pre-created one such as Grand Unified Bootloader (GRUB). Since coding your own bootloader will require extensive knowledge of the hardware and the BIOS, it may push back the schedule for programming of the actual kernel.
7. Decide what programming language to use. While it is possible to create an operating system in a language such as Pascal or BASIC, you will be better off using C or Assembly. Assembly is absolutely necessary, as some vital parts of an operating system require it. C++, on the other hand, contains keywords that need another fully-built OS to run.
8. Decide on your application programming interface (API). One good API to choose is POSIX, since it is well documented. All Unix systems have at least partial support for POSIX, so it would be trivial to port Unix programs to your OS.
9. Decide on your design. There are monolithic kernels and microkernels. Monolithic kernels implement all the services in the kernel, while microkernels have a small kernel combined with user daemons implementing services. In general, monolithic kernels are faster, but microkernels have better fault isolation and reliability.
10. Consider developing and working in a team. That way, less time is required to solve more problems, which may produce a better OS more quickly.
11. Do not wipe your hard drive completely. Remember, wiping your drive will irreversibly clear out all your data! Use GRUB or another boot manager to dual-boot your system with another OS until yours is fully functional.
12. Start small. Begin with small things such as displaying text and interrupts before moving on to things such as memory management and multitasking.
13. Keep a backup of the last working source. This provides a measure of protection in case something goes terribly wrong with the current version of your OS or your development. If your PC crashes and is unable to boot, it is an excellent idea to have a second copy to work with so you can troubleshoot.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น