Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If one wants to designate Linux as an operating system then surely it should be able to make a computer, well, operate.
Let me try and come at this from a different angle for you. I'm willing to bet you have a router sitting somewhere nearby, or at the least, you know what a router is and what it does.
So, let me ask this: does the router "operate?" Does it do something useful for the end user? Could you plug devices into a router and get a useful benefit without issuing any commands to the router? Unless you have very different routers than me in your household, your answer to all those questions should be "yes."
Now, you may want to say that you need to go through a web interface to customize settings. But don't confuse that with issuing commands to the router. Customizing settings is much more akin to changing a configuration file than issuing commands. I could add more to why the web interface is not issuing commands, but I don't want to get off track.
So, would you feel uncomfortable saying that a router has an "operating system?" There is a chunk of code that tells the router what to do, when to do it, and how to do it. If you are uncomfortable calling it an "operating system," then what would you call it?
The point is, as macemoneta has been saying, that the meaning of "operating system" depends on your perspective. Your perspective is bundled together with the concept of an user-interactive appliance/device. User interaction is not a prerequisite of an operating system. For embedded devices (e.g. routers, traffic lights, battery rechargers, etc.), a kernel is all that is necessary to qualify as an "operating system."
The way it was explained to me, years ago, is this: Linux is the kernel. Gnu/Linux is the OS (that is, kernel plus tools). The tools don't run without a kernel and the kernel needs the tools.
A distro is simply Gnu/Linux (or Gnu/Hurd) packaged and made pretty.
That is the way I always understood it too.
The people at Debian's website seem to describe it that way also:
Quote:
Debian is a free operating system (OS) for your computer. An operating system is the set of basic programs and utilities that make your computer run. Debian uses the Linux kernel (the core of an operating system), but most of the basic OS tools come from the GNU project; hence the name GNU/Linux.
It's a pointless argument, but I was nevertheless interested to get LQ's take on it. Thanks people.
The point is, as macemoneta has been saying, that the meaning of "operating system" depends on your perspective. Your perspective is bundled together with the concept of an user-interactive appliance/device. User interaction is not a prerequisite of an operating system. For embedded devices (e.g. routers, traffic lights, battery rechargers, etc.), a kernel is all that is necessary to qualify as an "operating system."
OK, great answer, but how would one interact with the traffic light in your example, or how would the lights interact with the kernel for that matter?
Surely (and I'm not calling anybody Shirly ) there must be some intervening layer that interprets the lights and sends signals to the kernel to react upon?
OK, great answer, but how would one interact with the traffic light in your example, or how would the lights interact with the kernel for that matter?
Surely (and I'm not calling anybody Shirly ) there must be some intervening layer that interprets the lights and sends signals to the kernel to react upon?
Not required at all. Linux (the kernel) is modular and extensible. When used in an embedded application (such as a traffic light), a kernel module can be created which initializes the needed functions on load (scheduling timers, performing I/O to physical pins, etc.). The traffic application would then be part of the kernel, and it would always have an (internal) workload. This type of functionality isn't hard to implement, but most shy away because of the GPL requirement to open source kernel code. By placing the same code in an application, the GPL issue is avoided.
The nucleus of an operating system. It is the closest part to the machine level and may activate the hardware directly or interface to another software layer that drives the hardware. The kernel orchestrates the entire operation of the computer by slicing time for each system function and each application as well as managing all the computer's resources. It typically resides in memory at all times. See microkernel, monolithic kernel, kernel space and kernel panic
Nonproprietary operating system (OS) for digital computers. In 1991 Linus Torvalds of Finland began asking for volunteer programmers over the Internet to collaborate on the development of a UNIX-like OS for personal computers; the "1.0" release of Linux was in 1994. A true multiuser, multitasking system, Linux contained features (e.g., virtual memory, shared libraries, memory management, and TCP/IP networking) formerly only found on mainframe computers. With its source code freely available, thousands of volunteers, as well as several companies that sell prepackaged Linux products, have contributed to the OS. A reliable, fast-performing system with good security features, Linux is popular for corporate computer network and Web servers.
Notice the differences in the above three definitions for 'Linux'. Audience! Simple one liner for concept of kernel: 'the core of an operating system - must exist or os goes nowhere'.
So for a CS major to define 'Linux' as being a OS or not then one must first define the operations to be performed and how. Then the problem can be addressed via the kernel and application.
The problem with that set of definitions is Android. It's certainly a pretty packaged version of Linux, but it doesn't use the GNU tools. So the kernel is Linux, there's no OS, and it's not a distribution.
Clearly, Android is ... Android. It uses a modified Linux kernel, but as the OS does not market itself a Linux variant, beyond putting the kernel in the credits they don't have to call it a Linux variant at all.
Quote:
via Wikipedia
Android's kernel was derived from Linux but has been tweaked by Google outside the main Linux kernel tree.[130] Android does not have a native X Window System nor does it support the full set of standard GNU libraries, and this makes it difficult to port existing GNU/Linux applications or libraries to Android.[131] However, support for the X Window System is possible.[132] Google no longer maintains the code they previously contributed to the Linux kernel as part of their Android effort, creating a separate version or fork of Linux.[133][134] This was due to a disagreement about new features Google felt were necessary (some related to security of mobile applications).[135] The code which is no longer maintained was deleted in January 2010 from the Linux codebase.[136]
<snip>
Furthermore, Greg Kroah-Hartman, the current Linux kernel maintainer for the -stable branch, said in December 2010 that he was concerned that Google was no longer trying to get their code changes included in mainstream Linux[139] Some Google Android developers hinted that "the Android team were getting fed up with the process", because they were a small team and had more urgent work to do on Android.[140]
The kernel is the essential center of a computer operating system, the core that provides basic services for all other parts of the operating system. A synonym is nucleus. A kernel can be contrasted with a shell, the outermost part of an operating system that interacts with user commands. Kernel and shell are terms used more frequently in Unix operating systems than in IBM mainframe or Microsoft Windows systems.
...
Some kernels have been developed independently for use in any operating system that wants to use it. A well-known example is the Mach kernel, developed at Carnegie-Mellon University, and currently used in a version of the Linux operating system for Apple's PowerMac computers.
I believe the answer is both.
Linux is an OS (or at least a class of related OSs), but it is also the name applied to the kernel commonly used in Linux.
Actually, linux can operate on its own. say we have a shell sh. We put it in initrd and boot the kernel with the argument init=/bin/sh. This way you'll get a working shell with no GNU stuff.
In my opinion, a monolithic kernel is an operating system, while a microkernel is not. You can use the kernel with busybox, or with X11 and not need the GNU stuff at all. In fact most users don't use the GNU stuff directly as much as they used to. Modern utilities have overtaken the original tools in terms of ease of use and features. Today, we don't mount. We let the HAL daemon pass the information to d-bus and mount it via GNOME-VFS.
The problem with that set of definitions is Android. It's certainly a pretty packaged version of Linux, but it doesn't use the GNU tools. So the kernel is Linux, there's no OS, and it's not a distribution.
There is an OS.
Just becasue it doesn't use the GNU userland doesn't mean it couldn't use a different one. In this case, one custom made for Android.
The way I have always thought of it is the kernel is the OS. Applications add functionality for the user.
Just because it isn't attached to anything doesn't mean an engine ceases to be an engine. It may be it is of no use to someone that wants to drive a car, but it is still an engine. Plug in an ignition system, throw it in a frame with some wheels and a steering system (applications) and you have a basic vehicle (distribution).
Add in all the extras and call it the Ubuntu or Slack car, or windows, or Mac.
And, by computer science definition, the kernel is the operating system. An operating system is defined as the software which performs resource management, scheduling and I/O. That's the kernel.
Your definition is horribly dated and proven to be wrong.
Are you honestly claiming that a monolithic kernel can't add anything in user-pace?
Pure tech, any monolithic kernel can work as a (utterly useless) OS.
In a modern (GNU/)Linux distribution, Linux is indeed the kernel but not the full OS (not even in your definition).
How is this relevant anyway?
The OP is clearly using a gnu-linux system and not some alternative.
OK, great answer, but how would one interact with the traffic light in your example, or how would the lights interact with the kernel for that matter?
Surely (and I'm not calling anybody Shirly ) there must be some intervening layer that interprets the lights and sends signals to the kernel to react upon?
A user (meaning a living, breathing person) would not interact with the traffic light aside from observing its state (i.e. red, green, yellow). The lights wouldn't interact with the kernel either--they are passive. So that begs the question: what would interact with the kernel? In the simplest example: a timer.
At my first job, we were working with PowerPC processors. The PowerPC had some interrupt pins. When a signal to any of those pins was activated, the processor would stop what it was doing (as quickly as possible) and "service the interrupt." I imagine virtually every processor out there has at least one such interrupt pin.
So, to tie this back to the traffic light, you have a timer of some sort (crystal oscillation, radio receiving NIST timing signals, a simple counter, whatever). When the timer reaches a certain value, the interrupt pin is activated*. The kernel is responsible for identifying what caused the interrupt and switching control to the appropriate driver to service the interrupt. In this case, identifying what caused the interrupt is easy: the timer--only one component is capable of causing the interrupt. Servicing the interrupt may be as simple as writing values to two locations in memory: (1) to change the state (i.e. which color is currently lit) and (2) to disable/clear the interrupt until the next timer event.
* - Both of these activities (i.e. comparing the timer against a certain value and activating the interrupt) can be implemented directly in hardware--no software necessary.
All of the above creates a traffic light that displays each color for a fixed amount of time. It could be refined to change how long each light is displayed, to change the display time of each color depending on the time of day, to respond to pressure sensors buried beneath the roadway, etc. Where to implement the added capability--in hardware or software--is a design decision, but some things (such as the pressure sensors--an external source of information) must include some some hardware-level changes at a minimum.
So, I think that answers your last two questions at the same time: that the lights don't interact with the kernel, but a timer does, and the interaction doesn't require any intermediate software at all--just straight hardware signals.
Quote:
Surely (and I'm not calling anybody Shirly )
Then you must be calling all of us "nobodies!" or you think you're talking to yourself.
Lastly, if I may be so presumptuous, the reason your question has caused so much back and forth is because defining "Linux" as a kernel or an operating system depends on your definition of "kernel" and "operating system." And has been shown in this thread, "operating system" is open to some interpretation. As I stated in my first response, I think you were coming at the question from a background that an operating system must include some element of user interaction. And I think jens falls in that camp more or less.
The purpose of my traffic light example was to illustrate a situation that doesn't have user interaction, but would also fit your concept of a device with an operating system. A diagram of which, in ASCII art, might be represented as:
Code:
|---- User Interaction (X) ----|
+---------------+------------------------------+
| Kernel (K) | User space |
+---------------+------------------------------+
|---------- Operating System (K + X) ----------|
Where, depending on the role of the device, X > 0 (desktop computer, smartphone) or X = 0 (traffic light). So, again depending on the role of the device, this implies that an operating system can include the kernel and "user space" tools, or an operating system can be limited to the kernel alone (in which case the two terms would be synonymous/reflexive).
Last edited by Dark_Helmet; 02-19-2011 at 04:32 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.