How is a “kernel” different from a “desktop environment”, “window manager”, “X Windows”, “GNU”, and “shell”?
What would the Microsoft Windows equivalent components be?
How is a “kernel” different from a “desktop environment”, “window manager”, “X Windows”, “GNU”, and “shell”?
What would the Microsoft Windows equivalent components be?
The kernel is something in all operating systems, even Windows. It’s the VERY low level system that is the closest to the hardware. The Kernel provides the abstraction necessary to utilize your computer in a way that won’t drive you insane, the kernel is the thing that makes it so that, say, all storage devices act the same, despite the fact that they may have completely different formatting or internal specifications, or make it so that monitors are compatible with different hardware (another part of this is drivers, but the abstraction for programming applications is the kernel’s job).
Shell is kind of a soft terminology, theoretically it’s something that provides user-level access to kernel functions, i.e. give the ability to do input/output or manipulate files or the hard drive. In practice it USUALLY refers to the command prompt (in windows) or terminal (in unix), and when it’s not referring to that it’s a fun game to figure out exactly WHAT they mean when the application developer is saying “shell.”
In theory, most programs operate through the shell into the kernel, in reality, applications often will bypass the shell completely and interact directly with the kernel (of course, it’s possible to bypass the kernel too, but I’d wager that’s even rarer than bypassing the shell due to the complexity and infeasibility).
Desktop Environment is usually that OS’s unique brand of GUI, it’s your icons and your ability to navigate by double clicking on things, basically. Whenever you’re in a folder and double click on an application to run it, you’re using your desktop environment. I think in Linux GNOME is the most popular right now.
The Window Manager is a component of the Desktop Environment GUI, it essentially allows you to position windows on your screen, what they look like, how the folder contents are listed, how to navigate through it etc.
X Windows is basically a program that will allow you to access a desktop through a network, it’s essentially a protocol that will translate the specific GUI output of whatever you’re looking at into some general “language” which your computer can then translate to its unique GUI output. I’m not sure there’s really a “Windows equivalent” to this, it’s just a program that happens to (usually) come loaded default on Linux installations.
GNU is a full operating system and software suite, so it rolls its own Linux kernel, desktop environment etc into one package and makes it work together. GNU is basically Windows, though a lot of times when people say “GNU” they’re referring to their software packages (which includes the GCC compiler, binutils and a number of other useful programs) instead of the GNU OS itself.
The kernel is the core of the operating system. It is the thing that schedules tasks to run and manages resources like memory and devices. Windows has a kernel, they just don’t talk much about it (and you can’t customize it or install a different one). The kernel is not a user interface. You as a user do not interact directly with the kernel. The kernel is operating behind the scenes.
A shell is a user interface. Windows has only one shell, the windows explorer (not internet explorer), which is also your desktop environment. Older versions of windows booted to a DOS shell, which was in itself a complete user interface, but was only a command line, not graphical. The command shell in modern windows is just a user program. It mimics the old DOS shell, but it isn’t really a shell. It just looks like one. Windows does have the recovery shell, which is a bit like the DOS shell, but it’s less generic in purpose and isn’t used under normal circumstances.
Linux has the same thing. It has numerous command line types of shells (such as the Bourne shell and the C shell and all of their many variants) and it also has numerous graphical shells as well, the most popular of which are Gnome and KDE.
Graphical shells like Gnome, KDE, and the Windows Explorer, are all “desktop environments”. The desktop environment is what you look at when you look at the screen. It’s your icons, menu bars, etc. The shells contain more than just the desktop environment. The shells also contain interfaces to various things, which you don’t see since they are activated by programs and not by you directly.
A window manager is what controls what windows you see on the screen and that sort of thing. In linux, you can install custom window managers that work within your desktop environment to manage the windows. The default windows manager for windows 7 is called Windows Aero. There are third party windows managers available for windows, but most users just use what comes with their system.
X-windows is the core graphical interface for linux. It is actually a cross-platform standard (you could have X-windows on a Vax, for example, back when Vax computers were still being made). Your desktop environments like KDE and Gnome run on top of X-windows. X-windows has networking functionality built into it which Windows does not have any direct equivalent of. The closest windows equivalent would be a remote desktop, but that is much more limited than an X-windows remote session.
GNU is a free software collaboration project started at MIT. You will often hear of linux things being “GNU” when they are really talking about it conforming to the GNU software license (also known as the General Public License, or GPL). The term GNU is used (and misused) a lot of ways these days, so it’s hard to explain this without knowing what context you heard it in.
Listen to him, not me, I got a few things mixed up/forgotten (I forgot the command prompt was software, and that GNOME is a shell). Been a while since I had to have any detailed knowledge of this lower level stuff. I stand by my statement of the kernel being used for device abstraction though.
It’s the X Window System or just X, at least according to the people who know. Anyone who says otherwise is deeply ignorant.
This actually makes a difference if you want to understand it: X is a window system, which means it provides low-level interface between application programs and graphics hardware, possibly over a network. (This means you can run a program on another machine as if it were on your machine, and it actually works.) There are other window systems, such as MGR, but none in widespread use. It doesn’t have a Windows equivalent: Everything X does is in the Windows kernel, or low-level systems code, and it doesn’t do networks very well. This makes Windows less stable.
Very few programs use the interface X provides directly. Most of them are built on more convenient subsystems, like the one GNOME provides. GNOME allows programmers to create programs that look like ‘normal’ desktop applications (with text boxes, buttons, scroll wheels, etc.) and co-operate within a shared desktop environment. GNOME also provides the desktop, menus, and icons in a lot of Linux systems. Other options are KDE, another desktop environment, and things like Blackbox and Window Maker, which are window managers which don’t provide everything GNOME and KDE do. This makes Linux systems much more configurable; it’s easy to find a different look and feel just by starting a new desktop environment or window manager. In Windows, pretty much all of this is, again, in the kernel. If you don’t like how Windows does things, pound sand.
The usual model of an operating system is a layered system, like an onion, or fruit. In the middle of the entire thing, is the core or using the fruit model - the kernel (clearly a stone fruit.) In conventional operating systems design, part of the job of the kernel is to abstract away from the underlying hardware. This model is part of the reason you can get many operating systems running on a very wide variety of hardware, usually with minimal effort - except in the kernel. Usually the kernel is the only layer that sees the bare hardware, and part of its job is to make useful abstractions of hardware functionality available, and to protect and manage access to the hardware. Some parts of the operating system might reside within the kernel or not, depending upon need, and to some extent religion. The file system for instance does not need to be in the kernel. Usually it is, and there are good engineering reasons to have it there, but there are systems where it resides outside of the kernel. The Mach kernel, which forms the basis of Darwin, which underpins the Mac’s OSX operating system was designed to allow significant unbundling of traditional kernel functionality.
One key point about a general purpose OS, is that it will implement a protection model. This requires that a combination of hardware and operating system code implement a solid barrier that prevents ordinary user code from performing arbitrary actions, and prevents access to the raw hardware. The processor implements a system whereby the instructions needed to access hardware, raw memory, and other critical functions are only available in a special protected mode. This mode is usually termed kernel mode. It is the mode that the kernel usually runs in. The kernel is the only part of the operating system that runs in kernel mode. And thus it is the only part of the system that is able to perform these protected operations - because the processor architecture enforces this.
This two layer model is pretty much the default now. Even though hardware often provide more. It wasn’t always so. There have been much richer models in the past. The VAX architecture provided four layers, and VMS used them, and the Data General Eclipse provided 8. The Multics operating system was critically dependant upon rings as a core design idea. That said, it isn’t clear that you really need more than two.
I don’t think that’s right - the GDI is the only kernel-level service that interacts with output devices, and it’s a low-level service. It’s not responsible for windows, menus and so forth.
Nevermind. I misunderstood.
Correct. The analogy to GNOME or KDE in Linux would be Luna in Windows XP or Aero in Windows 7 and Vista, although Windows confuses things by also having themes of the same name. (To be fair, Apple does this, too, with Aqua.)
A good pedant would also point out that “Linux” is the name of the kernel only; the name of the operating system as a whole is somewhat controversial, with a significant faction arguing for “GNU/Linux”. However, in practice, most people call GNU/Linux (or whatever name you consider most correct) just “Linux”, and most people call the X Window System “X Windows” at least some of the time. Even X developers have been using that colloquialism for decades.
I was trying to simplify a complex topic, and I badly confounded two things: The libraries provided as part of GNOME and the GNOME environment. The libraries do indeed give applications linked against them a consistent look and feel (all menus go that way, all scroll bars scroll this way, etc.) but they are not, as you say, meaningfully on the path to the interface to the OS; they’re just part of the decorations any usable application window is likely to have, and you can use the applications that link against them in any other desktop environment or window manager you want.
BigT: I didn’t know that about Windows. Can you stop Luna or Aero without taking the system down?
I think the name of the operating system would be the same as the name of the distribution-- Ubuntu, Fedora, etc. I don’t see how it would work otherwise.
If there’s no distinction between “operating system” and “distribution”, why use separate terms? The distribution is just that: a particular packaging of the operating system. Just about any GNU/Linux program will run fine on any GNU/Linux distribution; the only difference is usually how it’s packaged.
Years ago, a lot of CS Majors studied Linux as an example operating system for their Operating System class. Back then it was still small enough to actually study. Like anything developed for pc’s it’s gotten bloated over the years.
We still use Linux to a degree, at least with the basics, but nowadays it’s mostly focused on some sort of lightweight “theory OS” that’s run on a simulator. Of course, this theory OS is based on earlier versions of Linux…
Or Minix. Tannenbaum literally wrote the book on operating systems for undergraduates. Minix ported to an enhanced DLX simulator isn’t such a bad thing.
People tend to forget that the name “Linux” is not derived from “Linus” and “Unix”.
I program on Linux almost exclusively and I’d be surprised if the majority of programmers were interacting directly with the kernel.
Actually, in researching to answer this question, I discovered that my previous statements were incomplete. While Aero/Luna describes both the GUI itself and the theme, there is a better name for the Window Manager itself. This is Windows USER in all versions of Windows since 3, and the aptly named Desktop Window Manager in Windows 7 and Vista. Yes, Vista and 7 have two different window managers, with USER being a fallback WM of DWM is disabled.
Technically, USER is more than just a window manager. You can read about all of its functions (and how many were eventually taken over by other processes) in the Windows USER - Wikipedia. WDM is strictly a WM, however. This makes it different from GNOME or KDE, which also provide libraries.
Now that that’s clear, I’ll answer your question. As far as I know, shutting down the Aero or Luna UIs causes the system to restart, since there is no longer any way for the user to interact with the system. I am not aware of any ability to shutdown USER by itself, since it is more of a library than an application, and shutting down DWM just automatically restarts it unless you configure Windows to use USER instead.
Not the majority, it’s just that it’s common enough that it bears mentioning. Of course, most of the people I talk to do academic research…
We may be talking at cross purposes here. I was referring to the Windows component called GDI, not any aspect of GNOME. I defer to your superior knowledge when it comes to GNOME.