As far as I read in a OS text book (Operating Systems by Silberschatz) Kernel mode is for privileged task, so it it true to claim that "User Level Thread can read/write Kernel threads" ?

Generally speaking, Is there any kind of protection between user and kernel level threads?


No. In most operating systems, kernel memory is protected using virtual memory mechanisms, so a user process cannot read or write to kernel memory.

A user thread is part of a user process, and has the same permissions as the process. So, a user thread will not be able to write to kernel memory.


Im not really sure, but this is my take on trying to guess what it could be from logical reasoning

  • A thread is a specific type of process. Generally speaking, any process in user mode will not be able to do any Kernel-mode operation.

  • However, threads have a shared memory system, and they don't know about each other (pipes between threads are a 3rd party communication through an "imaginary" file) and thus there should be no constraint on using the memory within a User-mode thread, even if it is shared with a Kernel-mode thread.

  • Its impossible to create a thread with Kernel-mode if you are in User-mode, but if you are in Kernel-mode you can change your privileges to be User-mode. Kernel code is usually trusted, and therefore creating a thread in User-space for a Kernel-mode process is probably still considered trusted.

So my guess is No, there is no protection.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.