Click here to Skip to main content
15,884,425 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Kernels working and their relationships with shell-script are not clear. please explain by a kernel program and shell program.
Posted

1 solution

The shell script is executed with the help of a shell language interpreter, which is nothing but a regular user-mode application working in the outer protection ring. Therefor, the question is reduced to understanding of how application programs work and how the kernel-mode code interact with those application programs.

And this question is a bit too big and complex to be explained in a single quick answer. As the protection and isolation of rings is, in some class of CPUs) is hardware-mediated, specific CPU architectures are involved, and the such architectures are complex enough to require a whole book explaining them, including isolation of modes, different memory models, descriptors and a lot more. Linux architecture really use most of these features to keep the OS kernel-mode software stable. You can start learning, say, from here:
http://en.wikipedia.org/wiki/Protection_ring[^],
http://en.wikipedia.org/wiki/Protected_mode[^],
http://en.wikipedia.org/wiki/Complex_instruction_set_computer[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900