3

i know that operating system is nothing without kernel. But I had been asked a question in interview that- What is (OS-Kernel). So what exactly is left if we remove kernel from operating system.

(Please do not give it negative rating if it is silly, please give answer in comments and then i will delete this question).

sagar
  • 725
  • 2
  • 13
  • 30

2 Answers2

2

In addition to Sam Dunk's (see other post) statement, there is one other part that is part of the "operating system" - for a given value of operating system: The boot loader.

When a PC (and presumably other architectures) boot up, the BIOS loads the boot sector. The BIOS is not part of the operating system. The boot sector (arguably) is. The boot sector (limited to 512 bytes!) loads the bootloader.

The bootloader may give options between different operating systems (where multiple operating systems are installed on the same computer), and/or options for loading the operating system (e.g. "Safe mode", or different run levels for Unix - q.v. etc). The bootloader then loads the (appropriate) kernel, runs it. As soon as control is passed to the kernel, the bootloader is discarded (until the next boot).

The above is somewhat simplified.

For further reading on how the parts fit together (in the case of Linux), see "Inside the Linux boot process" http://www.ibm.com/developerworks/library/l-linuxboot/ for example. The master boot record is referred to as "Stage 1 boot loader", and what I referred to as "the boot loader" they refer to as "Stage 2 boot loader".

Details will vary from O/S to O/S.

AMADANON Inc.
  • 5,753
  • 21
  • 31
  • if boot secor is a part of os, as u say. Now lets have an eg of multiple operating system installed on 1 pc,, Now boot sector is a part of which os?? – sagar Aug 22 '14 at 09:37
  • As a rule of thumb, the most recent to install a bootloader. I think Windows generally overwrites the bootsector, whereas Linux asks you. It is also possible to overwrite the bootsector manually - Grub (the Linux bootloader) does this on request, I think for Windows you need to boot from the install CD. When you purchase a blank harddrive, it won't have a (bootable) boot sector. I think it would be possible to identify the O/S that installed a given bootsector. – AMADANON Inc. Aug 26 '14 at 22:00
0

To add to Sam Dunk's answer, we have to think what is the purpose of having an operating system. An OS does memory management, process scheduling, devices management etc etc...but that is not why we need an OS. It is how the OS do its job. The reason we need an OS is it abstracts the underlying hardware infrastructure for applications. Period. Nothing else. The other stuff like user interface, system utilities, are just sugar added on top (hey a command line OS is still an OS). This is the kernel, or the core of the OS. It provides a simplified and consistent platform for applications to execute across multiple hardware configurations.

For an analogy, think about the pipes and cables behind the walls in your house. Without them your wall sockets and water taps are practically useless. The sinks, cabinets, walls to separate rooms, are the system applications. (They usually come with the house, but they aren't absolutely necessary.)

kevin
  • 2,196
  • 1
  • 20
  • 24