Simple learning-propose OS.
Simple learning-propose OS.
Hi,
I'm looking for a simple operating system. I tried to understand some projects I found in this wiki page (http://wiki.osdev.org/Projects) but I think the OSes listed here are really complex and wide.
I also looked at the sources of ancient UNIX (Sixth and Seventh edition) and the Lions' Commentary to V6. I found them really useful, but they did not satisfied me: since they are for PDP-11 I could not mess on the code or modify it, or even see it running outside of an vm.
Instead of complete and featureful kernels, I'd like to see and understand a simple, basic OS for learning proposes.
I'd like to learn something with:
- Simplest multitasking.
- Example I/O functions: buffered stdio, file I/O (which implies: FS, hd/fd drivers)
- Simple exec() syscall that runs static executables on hdd.
- Shell
Can anyone point me to some code that may enlighten me about the given points?
--mghis
PS: Sorry for my poor English...
I'm looking for a simple operating system. I tried to understand some projects I found in this wiki page (http://wiki.osdev.org/Projects) but I think the OSes listed here are really complex and wide.
I also looked at the sources of ancient UNIX (Sixth and Seventh edition) and the Lions' Commentary to V6. I found them really useful, but they did not satisfied me: since they are for PDP-11 I could not mess on the code or modify it, or even see it running outside of an vm.
Instead of complete and featureful kernels, I'd like to see and understand a simple, basic OS for learning proposes.
I'd like to learn something with:
- Simplest multitasking.
- Example I/O functions: buffered stdio, file I/O (which implies: FS, hd/fd drivers)
- Simple exec() syscall that runs static executables on hdd.
- Shell
Can anyone point me to some code that may enlighten me about the given points?
--mghis
PS: Sorry for my poor English...
Re: Simple learning-propose OS.
You might find xv6 interesting and course materials at OCW . See : http://pdos.csail.mit.edu/6.828/xv6/
--Thomas
--Thomas
Re: Simple learning-propose OS.
A Sixth Edition x86 port? Fascinating! Thanks a lot, I'll read that.Thomas wrote:You might find xv6 interesting and course materials at OCW . See : http://pdos.csail.mit.edu/6.828/xv6/
I compiled it. It panic()s. I don't understand why...
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Re: Simple learning-propose OS.
Works fine for me. Are you cross compiling it? Are you sure you're not compiling 64bit versions of the files?
-JL
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Re: Simple learning-propose OS.
I compiled it with the standard Makefile and gcc 4.6.1. I'm on a 32bit linux system and I'm not cross compiling the kernel.piranha wrote:Works fine for me. Are you cross compiling it? Are you sure you're not compiling 64bit versions of the files?
-JL
Re: Simple learning-propose OS.
I tried the version on the GIT repository, that works fine (after tweaking the makefile to get -Werror out from CFLAGS). It seems very interesting. Although there are a lot of differences between Sixth Edition and xv6 sources, it is really promising!
Faithfully awaiting for further suggestions...
Faithfully awaiting for further suggestions...
Re: Simple learning-propose OS.
I'm in the same position as you. Xv6 looks like a fantastic resource. Wish I could take the course.
I'm thinking about biting the bullet and shelling out $130 for Operating Systems: Design and Implementation by Andrew Tanenbaum.
I'm thinking about biting the bullet and shelling out $130 for Operating Systems: Design and Implementation by Andrew Tanenbaum.
Re: Simple learning-propose OS.
Hi mghis and bonch ,
Sorry for late response, has been busy lately. I would you guys to read the minix source code , or even XINU ( http://www.cs.purdue.edu/homes/dec/xsoft.html ) - You can keep your 130$ with yourself. Reading the source code is a good to have skill -- I am a maintenance software engineer my profession. It requires patience , but with perseverance you will understand it finally.I do read plenty of source code daily .
--Thomas
Sorry for late response, has been busy lately. I would you guys to read the minix source code , or even XINU ( http://www.cs.purdue.edu/homes/dec/xsoft.html ) - You can keep your 130$ with yourself. Reading the source code is a good to have skill -- I am a maintenance software engineer my profession. It requires patience , but with perseverance you will understand it finally.I do read plenty of source code daily .
--Thomas
Re: Simple learning-propose OS.
You want a simple, basic OS, at the same time you want:
- Simplest multitasking.
- Example I/O functions: buffered stdio, file I/O (which implies: FS, hd/fd drivers)
- Simple exec() syscall that runs static executables on hdd.
- Shell
Hell no, the above four items implies a lot of features behind the scene, and thus not simple for learning.
- Minimal Multitasking requires memory management(either shared space or virtual space), and you'll soon find it boring without IPC.
- I/O function requires you have some sort of VFS, driver interface, and drivers
- syscall on its own is a non-trival design to separate kernel and user-land, and it is not easy to understand "the why" just by staring at code.
- exec() requires mature task/address space/resource management and probably some sort of libc.
- then, what you expect with shell? it can be as simple as a silly chat-bot or as complex as being able to cross-compile bash...
My recommendation is to read all the items listed on the osdev wiki, I read every single page too and think it is too valuable.
Just don't jump into code directly. It doesn't help learning by just modifying some sample code.
- Simplest multitasking.
- Example I/O functions: buffered stdio, file I/O (which implies: FS, hd/fd drivers)
- Simple exec() syscall that runs static executables on hdd.
- Shell
Hell no, the above four items implies a lot of features behind the scene, and thus not simple for learning.
- Minimal Multitasking requires memory management(either shared space or virtual space), and you'll soon find it boring without IPC.
- I/O function requires you have some sort of VFS, driver interface, and drivers
- syscall on its own is a non-trival design to separate kernel and user-land, and it is not easy to understand "the why" just by staring at code.
- exec() requires mature task/address space/resource management and probably some sort of libc.
- then, what you expect with shell? it can be as simple as a silly chat-bot or as complex as being able to cross-compile bash...
My recommendation is to read all the items listed on the osdev wiki, I read every single page too and think it is too valuable.
Just don't jump into code directly. It doesn't help learning by just modifying some sample code.
-
- Member
- Posts: 50
- Joined: Sun Sep 20, 2009 4:03 pm
Re: Simple learning-propose OS.
My 512 byte OS demo almost does all that
http://forum.osdev.org/viewtopic.php?f=2&t=23696
Of course it is meant as coding example and is extremely slow
because of IPC server routing and no yielding etc...
http://forum.osdev.org/viewtopic.php?f=2&t=23696
Of course it is meant as coding example and is extremely slow
because of IPC server routing and no yielding etc...