LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Is Linux a kernel or an operating system? (https://www.linuxquestions.org/questions/linux-general-1/is-linux-a-kernel-or-an-operating-system-863492/)

slackist 02-18-2011 04:16 AM

Is Linux a kernel or an operating system?
 
I have been participating in a thread on another forum where some members contend that Linux is an operating system of itself and I am contending it is a kernel, and therefore not an operating system but a crucial part of one and the missing link that kind of tied the GNU project together.

I have been informed that Android has no GNU stuff (I didn't know that, apparently they replaced the GNU bits with Java or something).

Would the members here consider Linux without any GNU bits to be an OS? I have invited the members there to remove everything from their system that was not the kernel and report back, so far nobody has done it. Not much surprise there..

I have quoted the GNU.org take on this issue on the other forum, but they keep coming back with links to Linux.org which seems to claim that Linux is an OS in and of itself:

http://www.linux.com/learn/resource-...erating-system

Leaving convenient parlance aside to avoid saying {Slackware-GNU-slash-linux} etc, is Linux really considered an operating system now?

macemoneta 02-18-2011 04:24 AM

It depends on your perspective.

As a computer scientist, the kernel is the operating system. However as an end-user, the operating system is a packaged product that includes a user-space environment.

From a user perspective then, a Linux distribution is an OS, as is a non-GNU Linux plus user-space product, like Android.

Just keep in mind the audience when using terminology, as the same terms can have different meanings in different context.

syg00 02-18-2011 04:38 AM

Linux is the kernel.

Period.

macemoneta 02-18-2011 04:47 AM

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.

Users aren't required to get a CS degree when buying products, so marketing has historically used the term OS to apply to the package - kernel, user-space, applications.

It's very similar to the lay confusion over the word theory. To a lay person, a theory is a proposed explanation. To a scientist, a proposed explanation is a hypothesis, and a theory is a fact.

If you're not a computer scientist, arguing over the definition of an OS is like arguing over any terminology used to market products to a general audience.

slackist 02-18-2011 05:02 AM

Quote:

Originally Posted by macemoneta (Post 4262535)
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.

That was one argument raised against my contention, but a kernel itself as the only thing on a computer is surely pretty much useless right?

I mean, if I delete everything except the kernel on a computer it won't actually operate, therefore by definition isn't the kernel not an operating system, but simply a kernel?

H_TeXMeX_H 02-18-2011 05:09 AM

Quote:

Originally Posted by syg00 (Post 4262529)
Linux is the kernel.

Period.

I agree. However, I predict this thread will continue to dwell in technicalities...

macemoneta 02-18-2011 05:18 AM

Quote:

That was one argument raised against my contention, but a kernel itself as the only thing on a computer is surely pretty much useless right?

I mean, if I delete everything except the kernel on a computer it won't actually operate, therefore by definition isn't the kernel not an operating system, but simply a kernel?
You are using the term in the lay sense, so yes, without a user-space (which could be as simple as a single monolithic application), the computer won't operate.

Knowing the CS definition of an operating system, you can see that a user-space and other applications are not needed. Resource management, scheduling and I/O are very basic functions, far removed from an end-user interface. An operating system doesn't provide end-user functionality - it provides functionality to the other software (if any) residing on the system.

The flip side is true as well; a user-space collection of applications and libraries can't function without an operating system - the kernel. For this reason, marketing tends to refer to the package by the common term. An over-simplification of a relatively complex subject for a broad audience.

When discussing concepts with others, a little pedantry is required. If everyone in a discussion isn't using the same definition for a term, there's less discussion and more pointless arguing.

slackist 02-18-2011 05:44 AM

Quote:

Originally Posted by macemoneta (Post 4262563)
You are using the term in the lay sense, so yes, without a user-space (which could be as simple as a single monolithic application), the computer won't operate.

Firstly, I am really grateful for you for taking the time to reply, it's helping me understand where the other guy is coming from.

Quote:

Knowing the CS definition of an operating system, you can see that a user-space and other applications are not needed. Resource management, scheduling and I/O are very basic functions, far removed from an end-user interface. An operating system doesn't provide end-user functionality - it provides functionality to the other software (if any) residing on the system.
How would one give instructions to a computer with only our Linux kernel? Surely there must have to be *some* user-space stuff to interact with it and do something useful?


Quote:

If everyone in a discussion isn't using the same definition for a term, there's less discussion and more pointless arguing.
Ya got that right! But work is slow so I can waste the time and I hope to learn something. Actually I already did from your posts so it's not a complete waste of time..

macemoneta 02-18-2011 05:48 AM

Quote:

How would one give instructions to a computer with only our Linux kernel? Surely there must have to be *some* user-space stuff to interact with it and do something useful?
I think that may be the basis of your issue. An operating system doesn't do anything useful for an end user; that's not its job. Applications do useful things for users - and to an operating system, everything (not part of itself) is an application.

slackist 02-18-2011 06:01 AM

Quote:

Originally Posted by macemoneta (Post 4262583)
I think that may be the basis of your issue. An operating system doesn't do anything useful for an end user; that's not its job. Applications do useful things for users - and to an operating system, everything (not part of itself) is an application.


I am still having trouble getting my head around this.

If one wants to designate Linux as an operating system then surely it should be able to make a computer, well, operate.

If it takes a Linux kernel and a bunch of stuff from GNU or whoever to make the thing operate then how could Linux be called an operating system?

I know I am coming across as pig-headed but that is not my intention, I am merely failing to see how the GNU description of an OS is wrong.

macemoneta 02-18-2011 06:21 AM

Quote:

Originally Posted by slackist (Post 4262593)
I am still having trouble getting my head around this.

If one wants to designate Linux as an operating system then surely it should be able to make a computer, well, operate.

If it takes a Linux kernel and a bunch of stuff from GNU or whoever to make the thing operate then how could Linux be called an operating system?

I know I am coming across as pig-headed but that is not my intention, I am merely failing to see how the GNU description of an OS is wrong.

'Operating system' doesn't refer to a 'system which is operational' from a user perspective. The computer is completely operational once the kernel is loaded - from the computer's perspective.

For example, instead of telling the Linux kernel to load the usual initialization software, you can tell it to run /bin/true. The kernel will initialize hardware, allocate the memory, perform disk I/O, handle interrupts, and /bin/true will execute. The OS will do its job and, having run out of work, halt. That will probably cause a reboot or message and 'hang' (really the OS is waiting for keyboard input for a ctrl-alt-del, for example). This is a fully functioning system that has no user interaction or even perceivable function.

You generally wouldn't consider that an operating computer, but in fact it is. In this example, /bin/true (which just sets a success return code) is the workload for the OS.

slackist 02-18-2011 06:33 AM

Quote:

Originally Posted by macemoneta (Post 4262600)
'Operating system' doesn't refer to a 'system which is operational' from a user perspective. The computer is completely operational once the kernel is loaded - from the computer's perspective.

Serious question: Does the kernel load itself or does it require something else?

macemoneta 02-18-2011 06:48 AM

Quote:

Originally Posted by slackist (Post 4262605)
Serious question: Does the kernel load itself or does it require something else?

There are typically two pieces of software that get control before the kernel in a PC. The first is a BIOS, which is software residing in an EPROM. It's job is to contain a basic description of hardware and then to load a single sector from disk and pass control to it. That software is the bootloader (lilo, grub or grub2 on most Linux systems). The bootloader is responsible for finding the kernel and reading it into memory, then passing control to it.

Maybe an analogy would help in the OS discussion. Imagine that the first car hadn't yet been given an identifier. The salesman looks under the hood and says "what's that?" and the engineer replies "that's the engine". So the salesman calls the entire machine an 'Engine' instead of giving it a unique name, like 'automobile'. Now you're saying that the machine is of no use without wheels and headlights and a body, so the whole thing must be an engine. As engineers, we're left trying to point out that the only thing that's an engine is the thing under the hood, the power plant for the machine. The rest uses the engine, even if the glossy calls the whole thing an engine. See the problem?

XavierP 02-18-2011 06:48 AM

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.

macemoneta 02-18-2011 07:21 AM

Quote:

Originally Posted by XavierP (Post 4262611)
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.

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. :)


All times are GMT -5. The time now is 03:29 AM.