A group of friends and I are working on designing a completely new OS from the ground up and we had a few questions that you might be able to answer:
1)For starters, What enables a language to create an OS, or more so what abilities/qualities does a language have to posses to code an OS?
2)What languages are Windows, Mac, and Linux coded in?
3)What steps should we take to make a language?
4)What would be a good resource to use to start making our own language and Operating System, as being the end goal of this project.
Any help would be great, even if it isn't relate to the questions but our current pursuit. And if you can answer one of these it would be grateful, if not all. Thanks for your time.
Operating System Construction
Started by BlackRoseAngel, Nov 04 2010 11:46 AM
7 replies to this topic
#1
Posted 04 November 2010 - 11:46 AM
|
|
|
#2
Posted 04 November 2010 - 11:52 AM
1) Any language that can handle low level operations such as memory management and bit manipulation.
2) Assembly for the boot/kernel loader and other essential basic portions, but all three have roots in C, which is the defacto standard for OS dev.
3 & 4) I am not sure what you mean by making a language, you would generally use a language rather than create one. C has no standard library to load like C++ and would be suitable for all you need.
A great resource on OS development can be found here:
Getting Started - OSDev Wiki
Although there is not too much for "beginners" as this is not a beginner topic, nor is it looked up upon for practise. Do you or your group have prior experience in programming?
2) Assembly for the boot/kernel loader and other essential basic portions, but all three have roots in C, which is the defacto standard for OS dev.
3 & 4) I am not sure what you mean by making a language, you would generally use a language rather than create one. C has no standard library to load like C++ and would be suitable for all you need.
A great resource on OS development can be found here:
Getting Started - OSDev Wiki
Although there is not too much for "beginners" as this is not a beginner topic, nor is it looked up upon for practise. Do you or your group have prior experience in programming?
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 04 November 2010 - 11:59 AM
Yes, we are all going to college for programming oriented majors. Some more off the beaten path than others, but we all have a basic fundamental knowledge of programming. But, as for your inquiry as to making our own language, that is another project we are working on. We want to design our own language, then code our OS in it. Which is why we were wanting to know what aspects of other languages that have been used to write Operating Systems have that make them good to use for OS development.
#4
Posted 04 November 2010 - 12:10 PM
The two tasks you are wanting to perform are possibly one of the most complex and underdocumented subjects in computer programming, I hate to say it but there is not much even I could think of to mention.
You will need a language lexer/grammar parser such as Yacc or Bison:The LEX & YACC Page / ANSI C grammar (Yacc) , and an extensive knowledge of the C standard library, its compiler assembly translation components and optimizations, and that is hardly touching it.
You will need a language lexer/grammar parser such as Yacc or Bison:The LEX & YACC Page / ANSI C grammar (Yacc) , and an extensive knowledge of the C standard library, its compiler assembly translation components and optimizations, and that is hardly touching it.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#5
Posted 04 November 2010 - 03:41 PM
Well we can put off the language for now, what we really would like to do for now is work on getting a rough version of the os up and running, but we need to know where to start. We all have knowledge about the basics of how a computer woks, but we just do not know where to start programming wise. Also what language would you recommend we use to get this started that we could program cross-platform with because I use Mac Os and my friends use windows.
#6
Posted 04 November 2010 - 05:36 PM
That OSDev resource I linked to is your best bet, it teaches you concepts and information on how to run your OS binary in an x86 emulator (so no need for a floppy to test it).
Expanded Main Page - OSDev Wiki
For your other question C is essentially platform agnostic, you can run it on Mac/Windows/Linux/all x86 MIPS and ARM architectures.
C is one of the only languages that can do most of what you want in the operating system off the bat, it has no "libraries" that other programming languages require, so you can build your OS from the ground up rather than based off of another language library.
You need to do the most essentials in Assembly, once the code to load the kernel is done C can be used as a rapid development tool more or less for the assembly, as it compiles directly to binary of which you can use.
You may wish to look at other people's micro operating systems, there is a somewhat fair hobby base on some forums that are oriented around low level work.
Expanded Main Page - OSDev Wiki
For your other question C is essentially platform agnostic, you can run it on Mac/Windows/Linux/all x86 MIPS and ARM architectures.
C is one of the only languages that can do most of what you want in the operating system off the bat, it has no "libraries" that other programming languages require, so you can build your OS from the ground up rather than based off of another language library.
You need to do the most essentials in Assembly, once the code to load the kernel is done C can be used as a rapid development tool more or less for the assembly, as it compiles directly to binary of which you can use.
You may wish to look at other people's micro operating systems, there is a somewhat fair hobby base on some forums that are oriented around low level work.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#7
Posted 07 November 2010 - 06:40 PM
K well first of all learning assembly/C would just be the beginning in the process of creating an OS.
You sure?
Let's hope you know the theory behind resource management, threads, tasks, fibres and their states, suspensions, context switching, interrupts, all the hardware components that need to be managed by an OS, how to optimize hardware components, memory management, timers and clocks, bootstrapping, producer/consumer relationship, multithreading, critical sections... Some may not apply depending on what TYPE (which you do not specify, before you start programming an OS it's usually helpful to know whether or not it's going to be real time) of OS you are going to create.
Maybe you should have a look at algorithms by Dekker/Peterson/Lamport (if you're going to use mutual exclusion).
Yeah.... just off the top of my head...
Quote
We all have knowledge about the basics of how a computer woks
Let's hope you know the theory behind resource management, threads, tasks, fibres and their states, suspensions, context switching, interrupts, all the hardware components that need to be managed by an OS, how to optimize hardware components, memory management, timers and clocks, bootstrapping, producer/consumer relationship, multithreading, critical sections... Some may not apply depending on what TYPE (which you do not specify, before you start programming an OS it's usually helpful to know whether or not it's going to be real time) of OS you are going to create.
Maybe you should have a look at algorithms by Dekker/Peterson/Lamport (if you're going to use mutual exclusion).
Yeah.... just off the top of my head...
#8
Posted 11 January 2011 - 11:44 PM
You guys might find processor manuals helpful, such as the Intel Architecture Software Developer's Manual (Volumes 1, 2, and 3) or other processor manuals for processors that you might direct your OS towards. I mean for things like thread management you need to read the manuals, unless you know some other way to know that.


Sign In
Create Account


Back to top









