First and foremost, i know what a shell, kernel is. Now the dilemma.
Today i had my systems viva in college. The examiner asked me is there a shell between the hardware and the kernel. Obviously, i said no, and the gave the usual explanation that the shell is an interpreter, it takes the user input, interprets the command and communicates with the kernel via system calls.
He then says what if i say that there is a shell between the hardware and kernel. I said it can't because there is no point. The job of the kernel itself is to interface with the hardware why will the shell be involved.
Then he started arguing that kernels are itself a set of programs, the how can they run another program. Now i got confused.
So if anyone could clear my query that whether a shell exists or not. And the biggest one, how can a kernel run a program. Is it because the kernel is in memory and its starts the init process and all other programs are run by it
Asked By : Shivam Shah
Answered By : D.W.
Given the details you have given us, you are of course right. There is no shell between the hardware and the kernel; that's just silly. Asking "but what if there were?" would be like asking "but what if pigs could fly?".
It is likely that either there was some misunderstanding or that the examiner is confused. The former is much, much more likely.
One thing I might critique is your characterization of a shell as an interpreter. While a shell is an interpreter, not every interpreter is a shell. I suppose it is possible that the examiner was asking a follow-up question to see if you understand that.
As far as how a kernel runs programs.... read a standard operating system textbook. The details are adequately covered in any standard OS textbook.
The thing is... I'm not sure why you're asking us. Why not ask your professor or examiner? We can't tell you what was in your examiner's head.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/19634
0 comments:
Post a Comment
Let us know your responses and feedback