|
|
How do you write an OS?
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
LOL, I know, silly question, but I really would like to know.
I have this old 6100/66 that I want to screw around with (erm, not that way), and I want to try out a bit of OS-writing for fun. Where do I begin? Can I use my G4 as a development machine and then transfer the OS onto a bootable CD somehow? I'd really like to do this!
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Feb 2002
Location: Fort Lauderdale, Florida
Status:
Offline
|
|
I dont have a straight answer for you, but i do know that Minix is a stripped down linux type kernel that they used to teach us in college. Might get some info by starting there.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Mar 2001
Location: somewhere in ohio
Status:
Offline
|
|
Jesus, much time on your hands?? I barely have time to write my own app let alone an OS!
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
Dust off the assembly lanuage book.
Dust off the 'c' book.
Buy a c->PPC cross-compiler.
Buy 'Modern Operating Systems' by Andrew S. Tanenbaum.
Buy lots of coffee and filters.
Have fun.
Let me know when you're done
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
|
|
|
|
|
|
|
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status:
Offline
|
|
Originally posted by KaptainKaya:
<STRONG>Jesus, much time on your hands?? I barely have time to write my own app let alone an OS!</STRONG>
I charge my time to my sleep account.
|
"Against stupidity, the gods themselves contend in vain" (Schiller)
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Jul 2001
Location: Evansville, IN
Status:
Offline
|
|
Get a CS degree. They will teach you how to make an OS
I can't wait to take my Operating Systems course in a few years. it'll be hella fun.
|
|
|
|
|
|
|
|
|
Posting Junkie
Join Date: Feb 2000
Location: Washington, DC
Status:
Offline
|
|
I got my CS degree from Carnegie Mellon University, and all I learned was how to change variables and comments.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
Originally posted by mitchell_pgh:
<STRONG>I got my CS degree from Carnegie Mellon University, and all I learned was how to change variables and comments. </STRONG>
Get the F--- outta here .
Where you sleeping when they built MACH? What about Andrew?
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
|
|
|
|
|
|
|
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status:
Offline
|
|
Originally posted by Justin W. Williams:
<STRONG>Get a CS degree. They will teach you how to make an OS
I can't wait to take my Operating Systems course in a few years. it'll be hella fun.</STRONG>
My Operating Systems course was a joke. It discussed features that existed in modern operating systems and how to implement these features, but you wouldn't be able to START an OS after that class. Things like drivers were left out. The only thing I learned from that class was about semaphores. I'm pretty sure that DOS doesn't use semaphores... and it counted as an OS at some point.
|
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
|
|
|
|
|
|
|
Junior Member
Join Date: Mar 2001
Status:
Offline
|
|
I just finished a 4th year OS course. The assignments for the course included writing a preemptive multitasking kernel and a file system / disk scheduler. The kernel itself took about two months of work. Great stuff -- you get a very good intuition about how everything fits together.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: May 2001
Location: 127.0.0.1
Status:
Offline
|
|
Originally posted by Porfiry:
<STRONG>I just finished a 4th year OS course. The assignments for the course included writing a preemptive multitasking kernel and a file system / disk scheduler. The kernel itself took about two months of work. Great stuff -- you get a very good intuition about how everything fits together.</STRONG>
That's pretty damn impressive. What school was this?
|
|
|
|
|
|
|
|
|
Forum Regular
Join Date: Oct 2000
Status:
Offline
|
|
I'm in an OS course at USC. We've learned thread basics, file systems, virtual memory, caching (TLBs), and multiprogramming. All basic Tanenbaum stuff. Apparently we can apply to take the more advanced course for graduates but I'm not really an OS guy. I'm taking it because they make me. We use NACHOS (Not A Completely Heuristic Operating System), the OS emulator some UC Berkeley people made. Basically, it's a basic, functional operating system that's a layer over a real OS (like Solaris) so whenever your OS "crashes," the computer doesn't go with it every time. It's incomplete though (hence the acronym) -- this is where the projects come in. Our four projects are what were discussed above -- implement threads, multiprogramming, virtual memory, and file systems. Basically, they give you the equivalent of DOS and they ask you to construct an extremely bare bones BSD UNIX (i.e., you're given an OS which can run one program at a time with the physical memory allotted -- at the end of the course, you have a multi-thread-capable OS with virtual memory, caching, and a complete file system). From what I understand, this is how most introductory OS courses are taught at most major universities.
A lot of people (including me) hate this course because the devil is in the details. Grasping the concepts isn't very hard at all -- the implementation, especially with NACHOS, is a pain in the ass as it's probably the first time you're forced (at least in my case) to look at someone else's code (and a lot of it) and build on it. Most of our time is spent deciphering bizarre coding schemes or our TA's assignment requirements (they're never clear or correct). Also, it irks some people that we're coding on an emulator that isn't even a real emulator -- it's like a playskool version of an OS to some. I personally couldn't care less.
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Oct 2000
Location: Cupertino, CA
Status:
Offline
|
|
Originally posted by parallax:
<STRONG>LOL, I know, silly question, but I really would like to know.
I have this old 6100/66 that I want to screw around with (erm, not that way), and I want to try out a bit of OS-writing for fun. Where do I begin? Can I use my G4 as a development machine and then transfer the OS onto a bootable CD somehow? I'd really like to do this!</STRONG>
I would recommend you start with something a little bit more primitive first, there are a lot of issues to take care of on a 6100 class Powermac. When I wanted to do this I wrote a kernel for a Gameboy (Color). Dumb, small hardware, stuff runs write out of ROM (no need to get disk loading working ;-) And, too top it off you can test it all in an emulator before you invest in flash programming hardware ;-)
If you are dead set on doing this on a 6100 I would worry about writing a bootloader before I even bother with an OS. Those machines do not have OpenFirmware, and literally have a chunk of Mac OS in their roms. Your going to have to deal with tearing down MacOS before you even start running your code. Look at Ben H.'s LinuxPPC BootX program for an example of how to do this.
Louis
|
Louis Gerbarg
Darwin Developer
These are my views, and not the views of my employer.
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: May 2001
Location: Cupertino, CA
Status:
Offline
|
|
Chaos: what a coincidence (or not really, I guess) I'm taking the OS course at UC Berkeley currently and we're also using nachos -- big surprise considering it was developed here.
The devil is indeed in the details. Most people here hate the class because they don't like testing and they're not used to doing so much error checking within the code. Really makes one realize just how some companies (Microsoft) can put out such crappy products. Haven't had a lot of difficulty deciphering the given code really, the only annoyances are when there's some function out in the middle of the machine package somewhere that we're supposed to use but are never told about.
Anyway this is the difficulty of operating systems... The concepts are not so difficult, it's just that writing an OS is a large software engineering task where you really have to take all the details into account and come up with a solid design and very thorough testing. Most people who are very "conceptually" strong in computer science end up not doing so well in the OS course while those who are more or an "engineering" mind do pretty well...
[ 04-12-2002: Message edited by: itai195 ]
|
|
|
|
|
|
|
|
|
Junior Member
Join Date: Mar 2001
Status:
Offline
|
|
That's pretty damn impressive. What school was this?
UBC up here in Vancouver.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|