Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing an operating system for the x86 architecture [closed]

I am planning to develop an operating system for the x86 architecture.

  • What options of programming languages do I have?
  • What types of compilers are there available, preferably on a Windows environment?
  • Are there any good sources that will help me learn more about operating system development?
  • Is it better to test my operating system on a Virtual Machine or on physical hardware?

Any suggestions?

like image 627
Jeff Avatar asked Sep 24 '08 21:09

Jeff


People also ask

What is X86 in operating systems?

X86 is the term used to denote the microprocessor family based on the Intel 8086 and 8088 microprocessors. These microprocessors ensure backward compatibility for instruction set architectures. Initially x86 started with an 8-bit instruction set, but then grew to 16- and 32-bit instruction sets.

What is an architecture in operating system?

Operating systems architecture refers to the overall design of hardware and software components and their operational effectiveness as a whole.

Which language is used to develop OS?

Most of the operating systems are written in the C/C++ languages. These not only include Windows or Linux (the Linux kernel is almost entirely written in C), but also Google Chrome OS, RIM Blackberry OS 4.


1 Answers

For my final year project in collage I developed a small x86 OS with a virtual memory manager, a virtual file system and fully preemptive multitasking. I made it open source and the code is heavily commented, check out its source forge page at:

https://github.com/stephenfewer/NoNameOS

From my experience I can recommend the following:

You will need x86 assembly language for various parts, this in unavoidable, but can be kept to a minimum. Fairly quickly you will get running C code, which is a proven choice for OS development. Once you have some sort of memory manager available you can go into C++ if you like (you need some kind of memory manager for things like new and delete).

No matter what language you choose you will still need assembly & C to bring a system from boot where the BIOS leaves you into any useable form.

Ultimately, the primary language you choose will depend on the type of OS you want to develop.

My development environment was the Windows port of the GNU development tools DJGPP along with the NASM assembler. For my IDE I used IBM's Eclipse with the CDT plugin which provides a C/C++ development environment within Eclipse.

For testing I recommend BOCHS, an open source x86 PC emulator. It lets you boot up your OS quickly which is great for testing and can be integrated into eclipse so you can build and run your OS at the push of a button. I would also recommend using both VMWare and a physical PC occasionally as you can pick up on some subtle bugs that way.

P.S. OS development is really fun but is very intensive, mine took the best part of 12 months. My advice is to plan well and your design is key! enjoy :)

like image 51
QAZ Avatar answered Nov 13 '22 12:11

QAZ