Which other xv6 system call(s) could be made faster using this shared page? Explain how - operating-system

When I studied MIT 6.S081 Operating System Engineering, I had met some questions about the lab of speeding up system calls. Which other xv6 system call(s) could be made faster using this shared page? Explain how.
https://pdos.csail.mit.edu/6.828/2021/labs/pgtbl.html
The lab is already finished now, but I still cannot figure this one out.
Thanks for your help!

Related

What is the best way to start programming with Real Time Linux?

Although I have implemented many projects in C, I am completely new to operating systems. I tried real time linux on Discovery board (STM32) and got the correct results for blinking LED but I didn't really understand the whole process since I just followed the steps and could not find whole description for each step on the internet.
I want to implement scheduling on real time linux. What is the best way to start? Any sites, books, tutorials available?
Complete RTLinux process description will be appreciated.
Thanks in adv.
The transition from "bare metal" to OS based programming is something that I experienced in reverse. I started out a complete software guy, totally into the OS side of things and over time I have moved to the opposite of that (even designing circuits in VHDL!). My advice would be to start simple. Linux is pretty complex, and everywhere you look there are many layers of things all working together to deliver the final product. If you are dead set on a real time linux extension, I'd be happy to suggest https://xenomai.org/ which is a real time extension for linux.
However, to more specifically address your question about implementing scheduling in Linux, you can, but it will be a large amount of work and can be very complicated. The OS uses a completely fair scheduling process ( http://en.wikipedia.org/wiki/Completely_Fair_Scheduler ) and whenever you spin up a thread, it simply gets added to the list to run. This can differ slightly if you implement your code in kernel space as a driver, rely on hardware interrupts, etc., but in general, this is how Linux works. Real time generally means that it has the ability to assign threads one of several different priorities and utilize thread preemption fully at any given time which are concepts that aren't really a part of vanilla Linux. It has some notion of this, but it has limitations that can cause problems when you are looking for real time behavior from Linux.
What may be helpful to you is an RTOS. If you are looking for a full on Real Time Operating System, check out FreeRTOS http://www.freertos.org/ . It has a large community and supports a lot of different devices out of the box with a large amount of example code. They even support your specific board with an example package, so you can give it a shot with nothing to lose! http://www.freertos.org/FreeRTOS-for-Cortex-M3-STM32-STM32F100-Discovery.html . It gives you access to many OS ish constructs like network APIs, memory management, and threading without the overhead and latency of a huge OS. With an RTOS, you create tasks and assign them priorities so you become the scheduler and are no longer at the mercy of the OS. You run the OS, not the OS runs you (if that makes sense). Plus, the constructs offered within an RTOS will feel much like bare metal code and thus will be much easier to follow, understand, and fully learn. It is a more simple world to learn the base building blocks of a full blown OS such as Linux or Windows. If this option sounds good, I would suggest looking through the supported devices on FreeRTOS website and picking one you would like to experiment with and then go for it. I would highly recommend this as a way to learn about scheduling and OS constructs in general as it is as simple as you can get and open source. Once you have the basics of an RTOS down, buying a book about Linux specifically wouldn't be a bad idea. Although there are many free resources on the web related to learning about Linux, they are commonly contradictory, and can be misleading. Pile on learning Linux specific knowledge along with OS in general, and it can feel overwhelming. Starting simpler will help keep you from getting burnt out and minimize the amount of time you spend feeling lost. Linux is definitely a learning process, but like with any learning process, start simple, keep your ultimate goal in mind, make a plan, and take small, manageable steps along that plan until you look up and find yourself exactly where you want to be. Then go tackle the next mountain!
The real-time Linux landscape is quite confusing. 99.99% of the information out there is just plain obsolete.
First, there are lots of "microkernels" that run Linux as one task. (Such as the defunct RTLinux). The problem is that you must write your real-time task to a different API, and can't depend on anything in Linux, because Linux will be frozen in the background while your task runs. So unless your task is dead-simple ("stop the motors when I press this button"), this approach will cause more pain than gain.
Next, there is the realtime Linux patch set. This hasn't been doing so well. because of the next item:
Lastly, the current Linux kernel has gotten rid of the problems that caused people to need realtime in the past. You can even turn off Linux on one of your processors to have full control of the CPU. See also this paper.
To answer your question: I see two different paths you could take:
1) Start with a normal 3.xx Linux kernel and explore the various APIs and realtime techniques (i.e. realtime priorities, memory pinning, etc.) This can get you "close enough" for 99% of what people want "realtime" for. If it's good enough for high frequency trading, it's probably good enough for you.
2) If you have a hard realtime requirement and you are worried that Linux won't cut it, then (as Nick mentioned above), just go buy a processor and write your realtime code with no OS. By splitting up your "realtime" and "non-realtime" code onto different CPUs, you will make the whole system simpler and much more robust.
If you want to learn real-time operating systems then I suggest that you get an FPGA, for example the Altera DE2, and experiment with your own operating system and ucos. You can read a good text about embedded RTOS here.
You could also get a Linux Raspberry and write your own operating system for that.

OS kernel which can be modified relatively easily by a beginner

I am new to operating system concept and know little about the things that go on at the root level in an OS. I have been given a project in my university to work on a OS and modify its source code or kernel. The fact is I don't know from where to start. I need a source code of a OS which is relatively small as compared to other OSs. I don't want to go into much detail in an OS but just want to modify some things in that code. can u please tell me which OS can i work on and from where do I begin my programming? I mean whether I need to download a Virtual machine or an emulator of any sorts to test the code that I have modified?
Try xv6. It's based on Sixth Edition Unix (aka V6). You can run it qemu/bochs. Use gdb to see code from boot itself.
It's used by many university for academic purpose. Good Documentation.
Here is the MIT's 6.828 Operating System Engineering course based on xv6 since 2002. The book is split into chapters, each will help you understand the some part of operating system like file system or process management and also explains the xv6 source code side by side, so you don't have to just scan the code to understand by yourself.
The book is really small ~80 pages: xv6 book pdf. You can obtain it's sources via git(1): $ git clone git://pdos.csail.mit.edu/xv6/xv6.git
You can also do lot of simple assignment given in some university.
Cheers

Writing a monitoring system to monitor 300 nodes

I am thinking of writing my own code (in order to practice and also to serve my company need) to monitor my 300 routers. I want to do the following
1) icmp monitoring. Email when packet loss is above 60%
2) Latency monitoring, email when latency is above 30 ms.
Now quite a time ago, when i asked similar question on cisco forum, they recommended me perl and freebsd. From that time it was in my mind that perl can do it. But i am just confused what approach shall i take. Do i need to do some multi threaded programming here ? as you know i am a little noob here, so if someone can pls guide me a little how to do it. I know there are enterprise class NMS for this but still i thought writing my own would be a good learning experience for me. Also perl is not must but i just thought perl would do it.
EDIT: I am sorry but a dear friend pointed me my mistake. Can someone tell me can i use multithreaded programming in perl ?
Thanks
Yes, multi-threaded programming is possible with e.g. threads, threads::lite and Coro.
Threads are not the only means of concurrent programming.
Perl is much stronger with the traditional Unix mechanisms building on the fork system call. Nice wrapper modules include Proc::Fork, Forks::Super and Parallel::ForkManager.
Another way to solve your problem is employing an event loop, such as AnyEvent, Reflex or POE.

If I were to build a new operating system, what kind of features would it have? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am toying with the idea of creating an completely new operating system and would like to hear what everyone on this forums take is on that? First is it too late are the big boys so entrenched in our lives that we will never be able to switch (wow - what a terrible thought...). But if this is not the case, what should a operating system do for you? What features are the most important? Should all the components be separate installations (in other words - should the base OS really have no user functionality and that gets added on by creating "plug-ins" kind of like a good flexible tool?)
Why do I want to do this... I am more curious about whether there is a demand and I am wondering, since the OSes we use most today (Linux, Windows, Mac OS X (Free BSD)) were actually written more than 20 years ago (and I am being generous - I mean dual and quad cores did not exist back then, buses were much slower, hardware was much more expensive, etc,...), I was just curious with the new technology if we would do anything differently?
I am anxious to read your comments.
To answer the first question: It's never too late. Especially when it comes to niche market segments and stuff like that.
Second though, before you start down the path of creating a new OS, you should understand the kind of undertaking it is: it'd be a massive project.
Is it just a normal programmer "scratch the itch" kind of project? If so, then by all means go ahead -- you might learn alot of things by doing it. But if you're doing it for the resulting product, then you shouldn't start down that path until you've looked at all the current OSes under development (there are alot more than you'd think at first) and figured out what you'd like to change in them.
Quite possibly the effort would be better spent improving/changing an existing open source system. Even for your own experimentation, it may be easier to get the results you want if you start out with something already in development.
First, a little story. In 1992, during the very first Win32 ( what would become the MS Professional Developers Conference ) conference, I had the opportunity to sit with over some lunch with one Mr. Dave Cutler ( Chief Architect of what most folks would now know as Windows NT,Windows 2000, XP, etc. ).
I was at the time working on the Multimedia group at IBM Boca Raton on what some of you might remember, OS/2. Having worked on OS/2 for several years, and recognizing "the writing on the wall" of where OSes were going, I asked him, "Dave, is Windows NT going to take us into the next century or are there other ideas on your mind ?". His answer to me was as follows:
"M...., Windows NT is the last operating system anyone will ever develop from scratch !". Then he looked over at me, took a sip of his beer, and said, "Then again, you could wake up next Saturday after a particularly good night out with your girl, and have a whole new approach for an operating system, that'll put this to shame."
Putting that conversation into context, and given the fact I'm back in college pursuing my Master's degree ( specializing in Operating Systems design ), I'd say there's TONS of room for new operating systems. The thing is to put things into perspective. What are your target goals for this operating system ? What problem space is it attempting to service ?
Putting this all into perspective will give you an indication of whether you're really setting your sights on an achievable goal.
That all being said, I second an earlier commenters note about looking into things like "Singularity" ( the focus of a talk I gave this past spring in one of my classes .... ), or if you really want to "sink your teeth into" an OS in its infancy....look at "ReactOS".
Then again, WebOSes, like gOS, and the like, are probably where we're headed over the next decade or so. Or then again, someone particularly bright could wake up after a particularly fruitful evening with their lady or guy friend, and have the "next big idea" in operating systems.
Why build the OS directly on a physical machine? You'll just be mucking around in assembly language ;). Sure, that's fun, but why not tackle an OS for a VM?
Say an OS that runs on the Java/.NET/Parrot (you name it) VM, that can easily be passed around over the net and can run a bunch of software.
What would it include?
Some way to store data (traditional FS won't cut it)
A model for processes / threads (or just hijack the stuff provided by the VM?)
Tools for interacting with these processes etc.
So, build a simple Platform that can be executed on a widely used virtual machine. Put in some cool functionality for a specific niche (cloud computing?). Go!
For more information on the micro- versus monolithic kernel, look up Linus' 'discussion' with Andrew Tanenbaum.
I would highly suggest looking at an early version on linux(0.01) to at least get your feet wet. You're going to mucking about with assembly and very obscure low-level stuff to even get started (especially getting into protected mode, multi-tasking, etc). And yes, it's probably true that the "big boys" already have the market cornered. I'm not telling you NOT to do it, but maybe doing some work on the linux kernel would be a better stepping stone.
Check out Cosmos and Singularity, these represent what I want from a futuristic operating system ;-)
Edit :
SharpOS is another managed OS effort. Suggested by yshuditelu
An OS should have no user functionality at all. User functionality should be added by separate projects, which does not at all mean that the projects should not work together!
If you are interested in user functionality maybe you should look into participating in existing Desktop Environment projects such as GNOME, KDE or something.
If you are interested in kernel-level functionality, either try hacking on a BSD derivate or on Linux, or try creating your own system -- but don't think too much about the user functionality then. Getting the core of an operating system right is hard and will take a long time -- wanting to reinvent everything does not make much sense and will get you nowhere.
You might want to join an existing OS implementation project first, or at least look at what other people have implemented.
For example AROS has been some 10 or more years in the making as a hobby OS, and is now quite usable in many ways.
Or how about something more niche? Check out Symbios, which is a fully multitasking desktop (in the style of Windows) operating system - for 4MHz Z80 CPUs (Amstrad CPC, MSX). Maybe you would want to write something like this, which is far less of a bite than a full next-generation operating system.
Bottom line...focus on your goals and even more importantly the goals of others...help to meet those needs. Never start with just technology.
I'd recommend against creating your own Operating System. (My own geeky interruption...Look into Cloud Computing and Amazon EC2)
I totally agree that it would first help by defining what your goals are. I am a big fan of User Experiences and thinking of not only your own goals but the goals of your audience/users/others. Once you have those goals, then move to the next step of how to meet it.
Now days what is an Operation System any way? kernal, Operating System, Virtual Server Instance, Linux, Windows Server, Windows Home, Ubuntu, AIX, zSeries OS/390, et al. I guess this is a good definition of OS... Wikipedia
I like Sun's slogan "the Network is the computer" also...but their company has really fallen in the past decade.
On that note of the Network is the computer... again, I highly recommend, checking out Amazon EC2 and more generally cloud computing.
I think that building a new OS from scratch to resemble the current OSes on the market is a waste of time. Instead, you should think about what Operating System will be like 10-20 years from now. My intuition is that they will be so different as to render them mostly unrecognizable by today's standards. Think of frameworks such as Facebook (gasp!) for models of how future OSes will operate.
I think you're right about our current operating systems being old. Someone said that all operating systems suck. And yes, don't we have problems with them? Call it BSOD, Sad Mac or a Kernel Panic. Our filesystems fail, there are security and reliability problems.
Microsoft pursued interesting approach with its Singularity kernel. It isolates processes in software, using a virtual machine similar to .NET, and formal verification methods. Basically all IPC seems to be formally specified and verified, even before a program is ran.
But there's another problem with it - Singularity is only a kernel. You can't run application not designed for it on it. This is a huge penalty, making eventual transition (Singularity is not public) quite hard. If you manage to produce something of similar technical advantages, but with a real transition plan (think about IPv4->IPv6 problems, or how Windows got so much market share on desktop), that could be huge!
But starting small is not a bad choice either. Linux started just like this, and there are many cases when it leads to better design. Small is beautiful. Easier to change. Easier to grow. Anyway, good luck!
checkout singularity project,
do something revolutionary
I've always wanted an operating system that was basically nothing but a fresh slate. It would have built in plugin support which allow you to build the user interface, applications, whatever you want.
This system would work much like a Lua sandbox to a game would work, minus the limitations. You could build a plugin or module system that would have access to a variety of subsystems that you would use. For example, if you were to write a web browser application, you would need to load the networking library and use that within your plugin script. Need 'security' ? Load the library.
The difference between this and Linux is that, Linux is an operating system but has a windows manager that runs over top of it. In this theoretical operating system, you would be able to implement the generic "look" and "feel" of a variety of windows within the plugin system, or could you create a custom interface.
The difference between this and Windows is that its fully customizable, and by fully I mean if you wanted to not implement any cryptography at all, you can do that, or if you wanted to customize an already existing window, you can do that. Nothing is closed to you.
In this theoretical operating system, there is an OS with a plugin system. The plugin system uses a simple and powerful language.
If you're asking what I'd like to see in an operating system, I can give you a list. I am just getting into programming so I'm not sure if any of this is possible, but I can give you my ideas.
I'd like to see a developed operating system (besides the main ones) in which it ISN'T a pain to get the wireless card to work. That is my #1 pet peeve with most of the ones I've tried out.
It would be cool to see an operating system designed by a programmer for other programmers. Have it so you can run programs for all different operating systems. I don't know if that's possible without having a copy of windows and OSX but it would be really damn cool if I could check the compatablity of programs I write with all operating systems.
You could also consider going with MINIX which is a good starting point.
To the originator of this forum, my hats off to you sir for daring to think in much bolder and idealistic terms regarding the IT industry. First and foremost, Your questions are precisely the kind you would think should engage a much broader audience given the flourishing Computer Sciences all over the globe & the openness taught to us by the Revolutionary Linux OS, which has only begun to win the hearts and minds of so many out there by way of strengthing its user-friendly interface. So kudos on pushing the envelope.
If I'm following correctly, you are supposing that given the fruits of our labor thus far, the development of further hardware & Software concoctions could or at least should be less conventional. The implication, of course, is that any new development would reach its goal faster than what is typical. The prospect, however, of an entirely new OS system #this time would be challenging - to say the least - only because there is so much friction out there already between Linux & Windows. It is really a battle between open source & the proprietary ideologies. Bart Roozendaal in a comment above proves my point nicely. Forget the idea of innovation and whatever possibilities may come from a much more contemporary based Operating System, for such things are secondary. What he is asking essentially is, are you going to be on the side of profit or no? He gives his position away easily here. As you know, Windows is notorious for its monopolistic approach regarding new markets, software, and other technology. It has maintained a deathgrip on its hegemony since its existence and sadly the windows os is racked with endless bugs & backdoors.
Again, I applaud you for your taking a road less travelled and hopefully forgeing ahead and not becoming discouraged. Personally, I'd like to see another OS out there...one much more contemporary.

What are some resources for getting started in operating system development? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
One thing I've always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I've already done).
I'm having a hard time finding resources/guides that take you past writing a simple "Hello World" OS.
I know lots of people will probably recommend I look at Linux or BSD; but the code base for systems like that is (presumably) so big that I wouldn't know where to start.
Any suggestions?
Update: To make it easier for people who land on this post through Google here are some OS development resources:
Writing Your Own Operating System (Thanks Adam)
Linux From Scratch (Thanks John)
SharpOS (C# Operating System) (Thanks lomaxx)
Minix3 and Minix2 (Thanks Mike)
OS Dev Wiki and Forums (Thanks Steve)
BonaFide (Thanks Steve)
Bran (Thanks Steve)
Roll your own toy UNIX-clone OS (Thanks Steve)
Broken Thorn OS Development Series
Other resources:
I found a nice resource named MikeOS, "MikeOS is a learning tool to demonstrate how simple OSes work. It uses 16-bit real mode for BIOS access, so that it doesn't need complex drivers"
Updated 11/14/08
I found some resources at Freebyte's Guide to...Free and non-free Operating Systems that links to kits such as OSKit and ExOS library. These seem super useful in getting started in OS development.
Updated 2/23/09
Ric Tokyo recommended nanoos in this question. Nanoos is an OS written in C++.
Updated 3/9/09
Dinah provided some useful Stack Overflow discussion of aspiring OS developers: Roadblocks in creating a custom operating system discusses what pitfalls you might encounter while developing an OS
and OS Development is a more general discussion.
Updated 7/9/09
LB provided a link to the Pintos Project, an education OS designed for students learning OS development.
Updated 7/27/09 (Still going strong!)
I stumbled upon an online OS course from Berkley featuring 23 lectures.
TomOS is a fork of MikeOS that includes a little memory manager and mouse support. As MikeOS, it is designed to be an educational project. It is written in NASM assembler.
Updated 8/4/09
I found the slides and other materials to go along with the online Berkeley lectures listed above.
Updated 8/23/09
All questions tagged osdev on stackoverflow
OS/161 is an academic OS written in c that runs on a simulated hardware. This OS is similar in Nachos. Thanks Novelocrat!
tangurena recommends http://en.wikipedia.org/wiki/MicroC/OS-II, an OS designed for embedded systems. There is a companion book as well.
Linux Kernel Development by Robert Love is suggested by Anders. It is a "widely acclaimed insider's look at the Linux kernel."
Updated 9/18/2009
Thanks Tim S. Van Haren for telling us about Cosmos, an OS written entirely in c#.
tgiphil tells us about Managed Operating System Alliance (MOSA) Framework, "a set of tools, specifications and source code to foster development of managed operating systems based on the Common Intermediate Language."
Update 9/24/2009
Steve found a couple resources for development on windows using Visual Studio, check out BrokenThorn's guide setup with VS 2005 or OSDev's VS Section.
Updated 9/5/2012
kerneltrap.org is no longer available. The linux kernel v0.01 is available from kernel.org
Updated 12/21/2012
A basic OS development tutorial designed to be a semester's project. It guides you through to build an OS with basic components. Very good start for beginners. Related paper. Thanks Srujan!
Updated 11/15/2013
Writing a Simple Operating System From Scratch. Thanks James Moore!
Updated 12/8/2013
How to make a computer operating system Thanks ddtoni!
Updated 3/18/2014
ToAruOS an OS built mostly from scratch, including GUI
Updated Sept 12 2016
Writing your own Toy Operating System
Updated Dec 10 2016
Writing a Simple Operating System —from Scratch (thank you #Tyler C)
There are a lot of links after this brief overview of what is involved in writing an OS for the X86 platform.
The link that appears to be most promising (www.nondot.org/sabre/os/articles) is no longer available, so you'll need to poke through the Archive.org version to read it.
At the end of the day the bootloader takes the machine code of the kernel, puts it in memory, and jumps to it. You can put any machine code in the kernel that you want, but most C programs expect an OS so you'll need to tell your compiler that it won't have all that, or the bootloader has to create some of it.
The kernel then does all the heavy lifting, and I suspect it's the example kernel you want. But there's a long way to go between having a kernel that says, "Hello world" to having a kernel that loads a command interpretor, provides disk services, and loads and manages programs.
You might want to consider subscribing to ACM to get access to their older literature - there are lots of articles in the late 80's and early 90's in early computing magazines about how to create alternative OSs. There are likely books that are out of print from this era as well. You might be able to get the same information for free by looking up the indexes of those magazines (which are available on that site - click "index" near the magazine name) and then asking around for people with a copy.
Lastly, I know that usenet is dead (for so sayeth the prophets of internet doom) but you'll find that many of the craggy old experts from that era still live there. You should search google groups (they have dejanews's old repository) and I expect you'll find many people asking the same questions a decade or 1.5 ago that you're asking now. You may even run across Linus Torvalds' many queries for help as he was developing linux originally. If searches don't bring anything up, ask in the appropriate newsgroup (probably starts with comp.arch, but search for ones with OS in the name).
Minix is a lot smaller, and designed for learning purposes, and the book to go with it is a good one too.
Update: I guess Minix 3 is a bit of a different goal, but Minix 2 (and of course the first version) were for teaching purposes.
As someone who has written a real-time multi-tasking operating system from scratch...
keyboard debounce routine, keyboard driver, disk driver, video driver, file system, and finally a boot-loader - and that's just to launch it for the first time with nothing to do!
... I cannot emphasize enough how important it is to get familiar with the hardware! This is especially so if you really want to do it all yourself instead of just picking up a primitive system someone else has already laid out for you. For example, contact Intel and ask them for a CPU card for your type of CPU! This will lay it out for you - the "pin-outs", interrupts, opcodes, you name it!
Remember the hardware makes it all possible. Study the hardware. You won't regret it.
.
Write a microcontroller OS. I recommend an x86 based microcontroller. A modern OS is just huge. Learn the basics first.
I wish there was one place to get all of the info about developing your own OS. The closest to come to that is OS Dev Wiki and Forums. They offer a ton of good information regarding the setup, development, and device hardware information.
Also there are some great tutorials at BoneFide, I've used the getting started tutorial by Bran, and am now looking at a more recent one based on his called Roll your own toy UNIX-clone OS.
I second checking out: "Operating Systems : Design and Implementation"
And if you want to develop on Windows, check out jolson's blog post.
Edit:
For development on windows using Visual Studio, check out BrokenThorn's guide or OSDev's wiki.
An excellent resource is the material of the MIT course 6.828: Operating System Engineering.
XV6 - simple Unix-like teaching OS written in ANSI C for x86
http://pdos.csail.mit.edu/6.828/2012/xv6.html
XV6 source - as a printed booklet with line numbers
http://pdos.csail.mit.edu/6.828/2012/xv6/xv6-rev7.pdf
XV6 book - explains the main ideas of os design
http://pdos.csail.mit.edu/6.828/2012/xv6/book-rev7.pdf
The material is compact: 92 pages source and 96 pages commentary.
I like it more than the Minix book! It's a true gem!
you also might want to take a look at SharpOS which is an operating system that they're writing in c#.
There are good resources for operating system fundamentals in books. Since there isn't much call to create new OS's from scratch you won't find a ton of hobbyist type information on the internet.
I recommend the standard text book, "Modern Operating Systems" by Tanenbaum. You may also be able to find "Operating System Elements" by Calingaert useful - it's a thin overview of a book which give a rough sketch of what an OS is from a designer's standpoint.
If you have any interest in real time systems (and you should at least understand the differences and reasons for real time OS's) then I'd also recommend "MicroC/OS-II" by Labrosse.
Edit:
Can you specify what you mean by "more technical"? These books give pseudo code implementation details, but are you looking for an example OS, or code snippets for a particular machine/language?
-Adam
Just coming from another question. I'd like to mention Pintos... I remembered my OS course with Nachos and Pintos seems to be the same kind of thing that can run on x86.
I found Robert Love's Linux Kernel Development quite interesting. It tells you about how the different subsystems in the Linux kernel works in a very down-to-earth way. Since the source is available Linux is a prime candidate for something to hack on.
Here are some other Stack Overflow pages worth incorporating into this discussion:
Roadblocks in creating a custom operating system
Developing an operating system for the x86 architecture
My operating systems course in undergrad had us building a number of subsystems for OS/161, a simple, BSD-like kernel that provides some of the basics while leaving the freedom to explore various design space decisions in implementing higher-level services.
Start hacking away at Minix. It's a lot smaller than Linux (obviously) and it's designed with teaching purposes in mind (some, at least). Not Minix 3 though, that's a whole different story.
Already answer, but when I took Operating Systems in college we started with an early linux kernel and added simplistic modern features (basic file systems, virtual memory, multitasking, mutexes). Good fun. You get to skip some of the REALLY crazy low level assembly only stuff for mucking w/ protected mode and page tables while still learned some of the guts.
http://kerneltrap.org/node/14002
http://kerneltrap.org/files/linux-0.01.tar.bz2
I would like to include this repo How-to-Make-a-Computer-Operating-System by Samy Pesse. Is a work-in-progress. Very interesting.
You might want to look at linuxfromscratch.
Linux From Scratch (LFS) is a project
that provides you with step-by-step
instructions for building your own
custom Linux system, entirely from
source code.
A simple and basic OS development tutorial designed to be a semester's project. It guides you through to build an OS with basic components. Very good start for beginners. Related paper is here.
One reasonably simple OS to study would be µC/OS. The book has a floppy with the source on it.
http://en.wikipedia.org/wiki/MicroC/OS-II
Check out the Managed Operating System Alliance (MOSA) Project at www.mosa-project.org. They are designing an AOT/JIT compiler and fully managed operating system in C#. Some of the developers are from the inactive SharpOS project.
I've toyed with Cosmos, which is "an operating system project implemented completely in CIL compliant languages." It's written in C#, so that was right up my alley. For someone like myself who has never attempted to build an operating system, it was actually pretty cool to be able to get a "Hello World" operating system running in no time.
Check out this site: http://osix.net/modules/article/?id=359
As mentioned above, the OSDev Wiki is (by far) the best source for OS development. For those of you who speak German, the lowlevel.eu Wiki is also great. Something relatively unknown Incitatus OS, a simple kernel with a tiny set of userspace apps. It's great to use for getting into the complicated topic of OS development.
Movitz is a Lisp environment written in Common Lisp and running "on the metal". Unfortunately, some links on the Movitz main page deny access, but you can find instructions on how to download and compile the source code from the trac page. Also, a ready image can be found on the archive of this page.
IMHO this is utmost interesting, as it brings back the Lisp machine concept on the currently available hardware. It failed commercially, but this does not prove to me that the idea was bad.
The Unix haters handbook is a fun book that semi-seriously berates the concept of Unix and its derivatives. Many sections argument about how better the Lisp machine concept was.
Here's a paper called "Writing a Simple Operating System From Scratch". It covers writing a bootloader, entering x86-32 protected mode, and writing a basic kernel in C. It seems to do a good job at explaining everything in detail.
The x86 JS simulator and ARM simulator can also be very useful to understand how different pieces hardware works and make tests without exiting your favourite browser.
Intresting Question for the programmers. See it will take long long long time to build OS like Windows or Mac but if you want build a simple ones then you can try your best
You need to focus on Assembly Language,C and C++. You should be expert in these languages.
First read a good book on how OS works[Google it], then read all the info from Wiki OS
Search in youtube "How to create your own OS in Assembly Language" watch the video, Eg. Video
Download Linux OS source code and compile it yourself and try to modify the code yourself
Now you are an experienced OS editor now download Minix and QNX and start developing with them and get their docs from here Minix Doc and QNX Doc
Now you have gained the master degree(Not completely just a little more to go) in creating OS now distribute this knownledge to your freinds and with their help try to create an OS as powerful as Mac, Linux or Windows
When you have made a basic operating system it's actually hard to continue because there isn't many ressources on making GUIs or porting libraries. But i think taking a look at ToAruOS would help a lot!
The code under the surface of that OS is so damn simple! but at the same time he has ported things like cairo, python, (not yet but soon) sdl, made share memory and he has also made his own widget toolkit. It's all written in C.
Another interesting OS would be pedigreeOS. It's made by JamesM (the man behind jamesM's kernel tutorial. While it has more features than ToaruOS it's also bigger and more confusing.
But anyway these 2 OS will help you a lot especially ToAruOS.
When I started working on my basic operating systems I needed a basic guide like Stepping stones for a basic operating system. It helped me not loose my head.
That if you want to make it from absolutely nothing (pure assembly code)