Benefit of Kernel | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Benefit of Kernel

UNIX for Dummies Questions & Answers


Tags
benefits of unix kernel

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 10-13-2012
mahinkhan22 mahinkhan22 is offline
Registered User
 
Join Date: Oct 2012
Last Activity: 4 November 2012, 5:26 AM EST
Posts: 6
Thanks: 8
Thanked 0 Times in 0 Posts
Java Benefit of Kernel

So I was wondering what are the benefits of Unix kernel?

It does Process Management, File Management, Main Memory Management and Disk Management!

Why couldn't operating system take care of these things? why did we need another intermediate
Sponsored Links
    #2  
Old 10-13-2012
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 31 July 2014, 11:11 AM EDT
Location: NM
Posts: 10,160
Thanks: 269
Thanked 781 Times in 731 Posts
The kernel is the operating system. The intermediates you are thinking about are things like device drivers. You need some but not necessarily all drivers to accomplish a given task.
The Following User Says Thank You to jim mcnamara For This Useful Post:
mahinkhan22 (10-14-2012)
Sponsored Links
    #3  
Old 10-13-2012
roman015's Avatar
roman015 roman015 is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 24 November 2012, 7:16 AM EST
Location: In the present
Posts: 6
Thanks: 1
Thanked 4 Times in 3 Posts
Let's put it this way: The Kernel hides a lot of "complexities" which would have made programming a computer a lot more complicated.

Back before operating systems (and kernels) were there people had to program for an explicit machine, sometimes in binary, and sometimes in assembly, which was a really simple way of coding.

Then, it was still horrible because people were still coding for just one machine and even then people had to think of all the possible "complexities" when using hardware - which bit for which function/value, when to send a bit, how long to wait.... basically even now if you want to go deep into stuff like "Process Management", "Disk Management" and "Ethernet" you can still find all that complexity is still there - Which bit, which signal, how long, hardware features, etc. And the complexities is not just about the bits. Each manufacturer wants to be different to say alive and so to encourage their hardware, they'd change one (but usually a lot) little thing, which in turn would be a lot to think about in terms of coding.

Now many programmers aren't bothered with these really fine details. Yeah, go ahead and ask the average Computer Science expert about the hardware on an really detailed level (what happens in the wires and the chips, electrical voltage, etc.), they would have to refer something - They might be able to give a partial answer skipping details on some of this stuff, but no one would have a "perfect" complete answer unless their specialization is on Computer Hardware itself. That's because NOW they don't have to worry about such an amount of detail of hardware.

Why?

Because those details have now been taken care of by something else. Now all they need to do is use the computer for what it's supposed to be used for - Making a Calculator, Making a Word Processor, etc. That something else is the Operating System (I'll get to Kernel, just wait).

For example, to make a program, say a Calculator on your computer (Let's say the program runs on MS-DOS) as , now all they need think about is:
1. Print a message asking the users for the numbers as input
2. Input the numbers
3. Input the operation they wanted to do (addition, subtraction, multiplication, division, etc)
4. Perform the operation
5. Print the output as a message

With an operating system, the programmer now literally has a function for each of the steps. The program is small, and he can finish this in less than 10 minutes. But if he was still working on Assembly he'd have to go like:
1. Initialize the Display for the appropriate Graphics Mode
2. Set a routine to read from the keyboard
3. Pixel by pixel, print the message to ask for input
4. With the routine in step 2, read the keyboard input AND detect the enter key being pressed to mark the end of input. Also make sure that the input is typed properly, and store the input into the proper location.
5. Perform the calculation. If it's addition/subtraction it's a one liner, else you have tons of work (and many a research paper suggesting the "optimal" way of doing multiplication, division, etc.)
6. The result is a binary number (Cause all the calculations in the previous step are only possible in binary), now you have to get each Decimal digit of the result (also be careful of negative numbers!)
7. And display that number on the screen, pixel by pixel.

It looks like only two more steps are added, but if you try to do it, it'll take days and months before you finish that program, and your head will probably be spinning after that. The operating system takes care of details such as printing "pixel by pixel", "initialize the display", "routine for the keyboard", etc. allowing programmers to just focus on the actual job to be done.

The Operating system does this by various ways. Some put this stuff as routines in assembly itself and leave the programmers with exposed routines to make things a lot simpler. Others implement a few simple operations in assembly and using these operations, implement the rest of the Operating System in a better language using these operations.

Another thing about operating systems is that they are supposed to provide functionality, but sometimes some functions are actually built on top of other functions. Take TCP/IP communication. It's a protocol to communicate using IP packets. And better yet you can use it over your wired ethernet and even over your wi-fi. NOW, someone has to code the protocol for everyone to use, but this code is based on the code used to use the Ethernet device and the Wi-Fi Device. That code depends on a lot of things (remember those "bits" and the "manufacturer" thing I was talking about earlier?)

And now we finally come to your answer (the short version) : An operating system has a lot of functions and purposes which are sometimes built on top of other functions and purposes (like the TCP/IP example above). The lowermost functions have to perform to the best possible, else the rest of the Operating system won't be awesome. So that functionality is put in the "kernel" - Process Management, File management, etc. Putting stuff in the "kernel" means various tradeoffs (making code with lots of "complexities" besides other stuff) based on how it's made which have to be planned really, really carefully. Putting stuff outside the kernel, which might make things a lot less complex, still has it's tradeoffs like performance, response, etc. to deal with.

There's a lot more design and technical stuff to go here, but I hope at least the short version helped.
The Following 2 Users Say Thank You to roman015 For This Useful Post:
14th (10-15-2012), mahinkhan22 (10-14-2012)
    #4  
Old 10-14-2012
mahinkhan22 mahinkhan22 is offline
Registered User
 
Join Date: Oct 2012
Last Activity: 4 November 2012, 5:26 AM EST
Posts: 6
Thanks: 8
Thanked 0 Times in 0 Posts
Lightbulb

Thanks.

so kernels are planned very very carefully, taking care of the complexities so that while making operating systems these complexities can be avoided!!

Last edited by DukeNuke2; 10-14-2012 at 04:32 PM..
Sponsored Links
    #5  
Old 10-14-2012
roman015's Avatar
roman015 roman015 is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 24 November 2012, 7:16 AM EST
Location: In the present
Posts: 6
Thanks: 1
Thanked 4 Times in 3 Posts
Your welcome.

P.S - Don't forget to press the Thanks button on the corner of the post if you found it useful.
The Following User Says Thank You to roman015 For This Useful Post:
mahinkhan22 (10-14-2012)
Sponsored Links
    #6  
Old 10-14-2012
Corona688 Corona688 is online now Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 31 July 2014, 5:21 PM EDT
Location: Saskatchewan
Posts: 19,035
Thanks: 755
Thanked 3,160 Times in 2,964 Posts
Quote:
Originally Posted by mahinkhan22 View Post
so kernels are planned very very carefully, taking care of the complexities so that while making operating systems these complexities can be avoided!!
The kernel is the operating system, at least the critical part of it.
The Following User Says Thank You to Corona688 For This Useful Post:
mahinkhan22 (10-14-2012)
Sponsored Links
    #7  
Old 10-14-2012
mahinkhan22 mahinkhan22 is offline
Registered User
 
Join Date: Oct 2012
Last Activity: 4 November 2012, 5:26 AM EST
Posts: 6
Thanks: 8
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Corona688 View Post
The kernel is the operating system, at least the critical part of it.
but there is a kernel and there is an operating system on the same machine! right?
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Which file is read by kernel to set its default system kernel parameters values? girish.batra Solaris 1 03-28-2010 03:09 AM
what can i benefit as mechatronics eng. abu_malek Shell Programming and Scripting 1 09-18-2009 12:01 PM
Benefit for authentication with Active Directory? Smith Solaris 1 09-24-2008 12:52 PM



All times are GMT -4. The time now is 05:39 PM.