What is kthreadd process and children and how it is different from init and children

Kernel threads are not children of init because they can be started before all the userspace processes. They are typically used to manage hardware that’s why they are directly handled by the kernel and have high priority. For a process to be child of init it needs to be cloned from init and Kthreads aren’t … Read more

System call and context switch

You need to understand that a thread/process context has multiple parts, one, directly associated with execution and is held in the CPU and certain system tables in memory that the CPU uses (e.g. page tables), and the other, which is needed for the OS, for bookkeeping (think of the various IDs, handles, special OS-specific permissions, … Read more

What is the difference between a thread/process/task?

Process: A process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently. Process-based multitasking enables you to run the Java compiler at the … Read more

127 Return code from $?

Value 127 is returned by /bin/sh when the given command is not found within your PATH system variable and it is not a built-in shell command. In other words, the system doesn’t understand your command, because it doesn’t know where to find the binary you’re trying to call.

tech