0

I was reading operating system concepts by Silberschatz and i came across "Some operating systems include the command interpreter in the kernel" statement.

I cannot understand how such an arrangement will be implemented. also if you cn give some examples of os which provide such arrangement. Thank you for taking time to help.

Cloud
  • 18,753
  • 15
  • 79
  • 153

1 Answers1

1

Some operating systems do this, like vxWorks. It's just taking the shell itself, and packing it into the kernel. If you can do something in user space (ie: shell as a user space application), you can do it (with some difficulty) in the kernel. The usual caveats apply, such as not being able to link user space libraries into kernel code, etc.

It's easy, on Linux for example, to write directly to a PTY from a kernel module. You can just as easily get the stdin for a process by hijacking system calls, among other methods. Now you have your I/O mechanisms, and just need a parser to handle all the internal logic.

Cloud
  • 18,753
  • 15
  • 79
  • 153