Google Answers Logo
View Question
 
Q: Kernels ( Answered 5 out of 5 stars,   2 Comments )
Question  
Subject: Kernels
Category: Computers > Operating Systems
Asked by: igwt007-ga
List Price: $50.00
Posted: 14 Oct 2002 07:20 PDT
Expires: 13 Nov 2002 06:20 PST
Question ID: 76394
Can anyone help me out with getting these questions answered? What are kernels?
Who writes them? What function do they preform? How important are
they? What do they interface with? What do they control? Can you
replace them? How many are there? I have to answer these questions and
write an eight page essay about it.
Answer  
Subject: Re: Kernels
Answered By: ericynot-ga on 14 Oct 2002 12:27 PDT
Rated:5 out of 5 stars
 
Hi igwt007,

There is a wealth of Internet information available which speaks to
your question(s). Let's start with the basics. A good definition of  a
kernel is this from webopedia.com:
A kernel is "The central module of an operating system. It is the part
of the operating system that loads first, and it remains in main
memory. Because it stays in memory, it is important for the kernel to
be as small as possible while still providing all the essential
services required by other parts of the operating system and
applications. Typically, the kernel is responsible for memory
management, process and task management, and disk management. "
 http://www.webopedia.com/TERM/k/kernel.html

Since I don't know your level of understanding of computer
terminology, let me suggest that, if you want more information about
the terms of that definition (such as "main memory", "operating
system", "applications", etc.), go to the link above where you will
find good basic explanations of those terms (and any others you may
need in the course of writing your paper).

Now that we've defined what kernels are, let's take a look at each of
your questions:

    1) Who writes them? In simple terms, systems programmers who write
computer operating systems write them. One of the most popular and
widely used/discussed kernels in the world today was originally
created about ten years ago by a Finnish student named Linus Torvalds.
It's called Linux and has, since its release, been distributed freely
to and improved by hundreds of thousands of programmers worldwide.
This has made Torvalds the most famous programmer in history. Others
who have written kernels are considerably less renowned. Here's an
easy-to-read history of Linux:
http://ragib.hypermart.net/linux/#In%20The%20Beginning

   2) What function do they perform? Applications programs, which are
programs such as word processors or games which are designed for
end-users, must have some basic program instructions they can call
upon in order to interact with a computer's hardware resources such as
disk drives, keyboards, video monitors, etc. In the most general
sense, the applications program calls the operating system (OS) for
those services.

Obviously, in order to understand and discuss the OS kernel, one needs
an understanding of what an OS is and, in general terms, how it works.
Rather than rewrite the world here, I suggest going to this link,
which provides as good an explanation of those topics as anything I've
seen (this copywrited material is furnished by James Mohr and is
oriented toward Unix/Linux, but is very top-down and useful for the
size paper you will be writing):
http://www.linux-tutorial.info/cgi-bin/display.pl?2&0&0&0&3

Since the OS kernel is the most basic part of an OS, Mr. Mohr has
provided on his site a separate web page discussing that concept:
http://www.linux-tutorial.info/cgi-bin/display.pl?82&99980&0&3

You should also review Mr. Mohr's page on Operating System Layers
(paying particular attention to the second paragraph's discussion of
the kernel and its device drivers):
http://www.linux-tutorial.info/cgi-bin/display.pl?5&0&0&0&3

Reading the pages referenced above (and others on that site that have
convenient links from those pages) will give you an excellent
grounding in the basics. Just keep in mind that the information, while
generalizable, is oriented toward Linux.

Here's the description of  what the Linux kernel does as described by
the Linux International website: "The Linux Kernel (the core, much
like a popcorn kernel) contains all of the features that you would
expect in any Operating System. Some of the features included are:
Multitasking (a technique for sharing a single processor between
several independent jobs)
Virtual Memory (allows repetitive, extended use of the computer's RAM
for performance enhancement)
Fast TCP/IP Drivers (for speedy communication) 
Shared Libraries (enable applications to share common code) 
Multi-user Capability (this means hundreds of people can use the
computer at the same time, either over a network, the Internet, or on
laptops/computers or terminals connected to the serial ports of those
computers).
Protected Mode (allows programs to access physical memory, and
protects stability of the system)"
 http://www.li.org/whatislinux.php
    4)  How important are they?  As the most basic part of the
computer operating system, quite simply, the computer cannot operate
without them. The kernel is simply the most basic part of the
operating system - the part that is so fundamental to the operation of
the computer that at least part of it stays in memory all the time as
opposed to being swapped in and out on an as-needed basis.
   5)  What do they interface with?  The easiest way to describe it is
to say that the kernel interacts, on one side, with commands. These
commands are often referred to as being processed by the "shell", the
shell simply being a way of referring to the program that passes along
commands issued by an applications program or directly by a user
through a "command processor interface". On the other side of the
process, the kernel, based on the requirements of the commands it has
received, allocates and directs the system resources described above
(random access memory, hard disks, video monitor, etc. in order that
the commands may be satisfied and usable information returned to the
user either directly or through an applications program.

Here's a simple run-through by Jan Smith of how stuff goes in and out
of a computer via the kernel (with more of an orientation to the
Microsoft rather than the Linux universe - be sure to use "next" to
see the second page):
http://www.jegsworks.com/Lessons/lesson8/lesson8-1.htm


    6) What do they interface with?  This question has been answered
above.
    7) Can you replace them? It depends on the operating system. For
some open source code systems such as Linux, a programmer has access
that is not available on more proprietary systems. Obviously,
proprietary OS kernels can be modified or replaced by programmers
working for the companies that own the OS in question.
    8)  How many are there? I can't specifically answer this question
since I don't know if you mean how many per operating system or how
many operating systems there are out there with kernels. As you can
see from the material above, the answer to both questions is, it
depends. Some operating systems have one, some have many.
Keep in mind that there are dozens of operating systems floating
around. Linux, UNIX and the Windows platforms are among the best known
these days, but there are lots of others, many of them developed
academically or as corporate experiments. Software engineers are
constantly looking for more efficient, secure ways of doing things, so
the subject of kernels/operating systems is highly fluid. Here are a
few examples of other OS's:
http://www.mochanni.com/~hseung/links/oop.html

Because you're writing a paper and my need a little more detail to
fill out eight pages, here are a couple of other sites that can
provide you with good material:

Current Trends in Operating Systems Kernels
http://db.ilug-bom.org.in/lug-authors/philip/docs/os-tech.html

An Overview of the UNIX Operating System - this is by the people who
developed Unix to begin with:
http://www.bell-labs.com/history/unix/tutorial.html

I hope this response provides what you need to get your work going in
the right direction. If you have any questions, please request a
clarification and I'll be happy to try to assist further. Thanks again
for your question.

Regards,

ericynot-ga

Clarification of Answer by ericynot-ga on 14 Oct 2002 13:14 PDT
Google searches used for my answer were: operating system kernel tutorial;
     operating system kernel -linux -unix;
     kernel basics -linus -unix

ericynot-ga

Request for Answer Clarification by igwt007-ga on 15 Oct 2002 16:10 PDT
Just wanted to know do all kernels basiclly do the same thing? Because
everytime i look up kernels on search engines about a million hits are
on Unix-linux. Are there any links to windows kernels?

Request for Answer Clarification by igwt007-ga on 15 Oct 2002 16:21 PDT
Forgot to say thanks for all the info. You've been a tremendous help!

Clarification of Answer by ericynot-ga on 16 Oct 2002 14:17 PDT
Hi again igwt007,

First, no, although all kernels perform the same general functions,
they absolutely do not all do exactly the same things. Think of the
discussion of the OS/kernel as being like explaing a "car". The brand
new $75,000 Mercedes some lucky folks drive today gets you from one
place to another just like an old 1966 Volkswagon used to, but the old
VW didn't have airbags, GPS, Bose stereo with 10 CD changer, leather
seats, traction control, anti-lock brakes, etc. - you get the idea.
OS/kernels constantly struggle to keep up with both their users'
specialized needs (network servers don't have to do exactly the same
things as a single-user PC, for instance) and the increasing demands
of their hardware environments, both of which are in constant flux.

And, you're absolutely right. Because Linux is the hot item amongst
programmers these days (and increasingly with businesses), there seems
to be a concentration of information about it showing up on the search
engines. But Windows has not exactly disappeared :)

There is plenty of information about Windows kernels and drivers
available (and yes, all kernels do essentially the same things, but
there are many different strategies and approaches to writing them).
Also keep in mind that Microsoft Windows is actually a family of
products that often are very different internally.

Here is a site that has some good information about current Windows
kernel drivers (it also has some historic background that might be
useful in your paper): http://www.cmkrnl.com/faq01.html

Here is another site that not only deals extensively with Windows
kernels, but also provides a great explanation of my statement above
that various Windows products vary greatly in their internals. This
site covers, in fairly easy-to-understand language, all versions of
Windows starting with Version 1.0 in 1985 all the way through today's
Windows XP.
http://www.extremetech.com/article2/0,3973,10430,00.asp

Here's a quote I liked from an unnamed source on an ABC website that
you might be able to incorporate into your work (this web page also
has some good comments about various OS security issues that might be
of use to you).
"Operating Systems are like Fruit. They provide the resources we need,
however they differ substantially. You cannot pickup a Redhat (or any
other Linux distribution) CD and compare the contents to a Windows NT
CD equally."
http://abcnews.go.com/sections/tech/DailyNews/moodyfeedback_000816.html

Here's a great quote by Bill Ulrich that you might find useful: "At
the heart of any Unix operating system, including Linux, is the
kernel, which talks directly to the hardware, manages the system's
memory, and schedules when each process can execute. It is the
operating system's accountant, traffic cop, and bouncer all rolled
into one".

That quote was lifted from this PC Magazine site which covers some of
the same ground as other sites I've already mentioned, but still might
help you in your efforts:
http://www.pcmag.com/article2/0,4149,777,00.asp

Google searches for this clarification: windows linux kernel
comparison
                                        windows kernel

I hope that helps some more. And thanks for your kind words. If my
answer has indeed been helpful, perhaps you would do a rating for it.
Good ratings keep the editors at Google Answers happy with their
researchers.

Best wishes,
ericynot-ga
igwt007-ga rated this answer:5 out of 5 stars
Your researchers are simply the best. Thank you so much. I will pass
on the good word and work they do to all my friends!!!

Comments  
Subject: Re: Kernels
From: eddie2002-ga on 16 Oct 2002 14:58 PDT
 
Hi. I'm an ameture OS developer who was been writting a command line
operating system in assembler for the 8086 CPU from intel. A kernel is
a list of functions that applications can call to interface with the
rest of the system. These functions are called APIs (Application
Program Interfaces). For example, if an application needs to write
text to the screen, the kernel might contain a function that an
application can call which does this.

The primary purpose of a kernel is to allow multiple applications to
share the same hardware resources (and 3rd party software services).
There are basically two methods that a kernel will use to allow
applications to share the same resource. The most simple method is
called a 'mutex' (Multiple Exclusion). In this form of sharing, only
one application can access a device or service at a time. While the
application is using the device, any other applications which require
access to that same device will be suspended. The more complex form of
sharing is Multiple Inclusion. In this form of sharing, any number of
applications can access a device or service at the same time. The
kernel will "split-up" access to the device. We see both types of
device sharing all the time without realizing it.

Memory can be shared using Multiple Inclusion by using a "Memory
Manager". A memory manager splits up memory into "blocks" which need
to be allocated by applications before they can be accessed and
"free'd" when the application is done. If an application were to
access memory directly without first allocating itself a block (which
is possible in real mode), the application may inadvertently corrupt
another applications block. For this driver to work, the kernel would
contain functions (APIs) such as "mallocate", "mfree", "mfill",
"mcopy", "mresize", "mrelocate" and so on.

A disk can be shared using Multiple Inclusion by using a "File
System". A file system splits up a disk (floppy disk, hard disk,
etc...) into files. Applications can create or delete files as they
need them. When an application needs to open a file with "write"
access privilages, the kernel makes sure that no other applications
are currently using that file and blocks the file from being able to
be openned by any other application. If an application were to
directly access the disk without using the file system, it could
corrupt other files (or the file system itself). Similarly, if an
application reads a file which is being written by another
application, the data it is reading could be corrupt by the other
application.

The display can be shared using Multiple Inclusion by using a
Graphical User Interface (GUI). A GUI splits the display into
"windows".

The CPU can be shared using Multple Inclusion by using a Scheduler. A
scheduler allows multiple applications to run at the same time on the
same CPU by spliting the CPU cycles up. Single-tasking kernels such as
the one employed by DOS simply lack this particular driver and instead
use a MUTEX (Muliple Exclusion) method.

All the devices work similarly. The keyboard (split up using a cursor
and input focus), the mouse (split up using an 'arrow'), the printer
(shared using a spooler), the sound card (shared using a mixer) and so
on. In some cases a mutex method is used but is abstracted from the
software as being multiple inclusive. An example of this is the
printer spooler. A printer can physically only handle one job at a
time (its Multiple Exclusive) yet the spooler allows many applications
to send thier jobs into a buffer at the same time (emulated Multiple
Inclusive-ness).

The kernel may also handle other forms of abstraction that have
nothing to do with device and service sharing. Other important jobs
include security and portability. But my fingers are getting tired.
Subject: Re: Kernels
From: igwt007-ga on 17 Oct 2002 06:03 PDT
 
Also wanted to thank Eddie2002. You said your an amateur but you
sounded very professional to me!! :) Thank you soooo much!!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy