Learning to program at the operating system level
I was recently reading some old LWN article[1] about a realtime workshop in which was stated that the academia doesn't prepare CS graduates for working with the development community and more over, they don't know to program at the operating system level. What does programming at the operating system level mean and what does it involve ? How's that different than what's currently happening in software development, what are the constraints and what should an engineer expect when it enters the realm of OSs ? Thanks! [1] http://lwn.net/Articles/355416/
On Fri, Jan 21, 2011 at 11:15 AM, vorad <vorad.1100@gmail.com> wrote:
I was recently reading some old LWN article[1] about a realtime workshop in which was stated that the academia doesn't prepare CS graduates for working with the development community and more over, they don't know to program at the operating system level.
I think that the critic is more that the CS graduates don't know how things works, they only know how to program in a specific computer language. In some places CS is a major that last 5 years while others reduce it to 3 years. So there is a two year gap to fill in education. The problem is not only at the OS level but also in other areas like networking, compilers, theoretical computer science and mathematics. I have meet some Phd students that don't know what a Turing Machine or a Context Free Grammar is, can't understand the different between the network and data link layer or don't know what a probability function is. This is because in some places CS is like an Engineering major while in other places is more a Developer major. So they don't know basic stuff.
What does programming at the operating system level mean and what does it involve ?
Programming at the operating system level means programming your operating system kernel. The kernel is the software that administer your computer resources (CPU, Memory, I/O) and offers services to programs so they don't have to deal with the real hardware. How's that different than what's currently happening in software
development, what are the constraints and what should an engineer expect when it enters the realm of OSs ? Thanks!
The operating system give processes an extended view of the machine. The hardware is hidden in layers that makes it easy to use it without having to worry about hardware characteristics. For example you use a file system to store data and don't have to worry if you write to a SATA disc or a USB storage device. Also many resources are virtualized to make processes believe that the are the only ones using them. For example virtual memory and scheduling creates the illusion that we can use the whole memory address space and are the only one executing on the CPU. Also in a robust operating system, no matter what a process do, it shouldn't affect other processes execution. These are luxuries that only exists in user space, someone that is developing in kernel space have less abstractions and any error can take the whole system down. Also one have to deal with concurrent access to shared resources across different CPUs and execution contexts (process and interrupt). -- Best regards, ----------------------------------------- Javier Martínez Canillas (+34) 682 39 81 69
Hi Vorad... On Fri, Jan 21, 2011 at 17:15, vorad <vorad.1100@gmail.com> wrote:
What does programming at the operating system level mean and what does it involve ? How's that different than what's currently happening in software development, what are the constraints and what should an engineer expect when it enters the realm of OSs ? Thanks! [1] http://lwn.net/Articles/355416/
First of all, I appreciate you did initial research on the topic, that helps us all to better answer it. I'd just add few of my own answers: in programming OS, you have to think "broad"...in the real sense. For example, in "usual" programming, you probably don't really bother if the "if" will hit the true most of the times, or false .... but in the low level programming, it matters.... it could introduce hell lot of latency. For better example on this like this, search for Ulrich Drepper article in LWN describing about memory architecture. Perhaps in user space, IMO the one that has near level of complexity is game programming. You need to make it fast, make it "user friendly", you need to think how each sprite interact (same like the way you think how to make VFS and VM layer interact), how to exploit the graphic card at its best etc. And it comes to one thing: you need to know your hardware.... deeply. Not just "OK I know RAM stores data....period" or "OK, I know my ethernet card allow me to send or receive data". Of course, you need to practice gradually...learn how to code in each subsystem first, for example virtual memory management...then embarks into another field. Finally, you also have to remember that programming OS is quite complex, such that we need teamwork...a real good one. Maybe you ask "Linus can did it initially, alone"...yeah, but that only produce quite "primitive" one. So if you can learn how to do all such things, I think you gradually ready to become OS developer. And, don't forget to share what you have learned in forums, like this kernelnewbies mailing list :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (3)
-
Javier Martinez Canillas -
Mulyadi Santosa -
vorad