Skip to content
Advertisement

Tag: linux-kernel

How does linux clean up threads when process exits if they’re really just processes under the hood?

My understanding is that threads and processes are really the same entity on Linux, the difference being in what memory is shared between them. I’m finding that it’s…difficult to ensure that child processes are properly cleaned up without explicit communication between the parent and child. I’d like to be able to run sub-processes with a similar mental model as threads,

Pointers given from user space to kernel space are null

Sorry if this question has been asked before as it seems kind of basic, but I can’t find it anywhere on this site. I’m doing OS programming with linux (debian) and I’m trying to give a pointer from my user space to my kernel space function. Namely in the userspace I do and in the kernel space file kernel_function.c I

Linux filesystem nesting and syscall hooking

Using 2.6.32 linux kernel, I need to use a specific filesystem on a block device partition and I wan’t to hook open/write/read/close (and few others) syscalls to read/write, in an other fashion that the specific filesystem, what should be written on this partition. It would be only for this partition, others partitions using this filesystem would act as usual. Fuse

linux kernel: is vfs_write thread safe?

In my program, I need to write file in kernel space due to some special reason although I know it’s not recommended. I’m using vfs_write to write files in kernel space and it works fine. In one case, there are two threads need to write to the same file. From the internet, it seems that user-space write is thread safe,

Which system calls are not interrupted by a signal?

AFAIK, most of the system calls on linux/unix are interrupted when a signal is received. According to the blog post below, there are some system calls that are not interrupted: In general function that return immediately (don’t wait for any I/O operation to complete or sleep) are not interruptible like socket(2) which just allocates a socket and doesn’t wait for

How tar xvfz works in cygwin?

I tried tar with xvfz and -xvfc both didn’t work in Cygwin on Windows. Here cmd tar with ‘-‘ Question : 1 . How does tar works with – or without _ ? Please suggest to execute tar -xvfz sshpass-1.0.5.tar.gz. Answer tar has 3 types of syntax (according to this ): long options (–file) short options (-f) old options (f)

How to create light weight kernel thread?

When I create a kernel thread (kthread_run), it becomes a new process.(I could see it using top command) . How can I create a light weight kernel thread(like the one we have in user space)? If I am not wrong, kthread_create will eventually call fork() which will call clone() with appropriate configuration to create a new process/lw process. Is it

Advertisement