Search code examples
processminix

Does a new process is created when syscall is called in Minix?


For example, when we call write(...) in program in minix. Does a new process is created(like with fork()) or is it done within current process? Is it efficient to make a lot of syscalls?


Solution

  • Process creation is strictly fork's / exec's job. What kind of process could a system call like write possibly spawn?

    Now, Minix is a microkernel, meaning that things like file systems run in userland processes. Writing to a file could therefore possibly spawn a new process somewhere else, but that depends on your file system driver. I haven't paid attention to the MinixFS driver so far, so I can't tell you whether that happens -- but it's not very likely, process creation still being relatively expensive.

    It's almost never efficient to make a lot of syscalls (context switches being involved). However, "performant", "efficient" and "a lot" are all very relative things, so I can't tell you something you probably don't know already.