[[!meta copyright="Copyright © 2010, 2013, 2014 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] In an [[UNIX]]-like system, a *system call* (*syscall*) is used to request all kinds of functionality from the operating system kernel. A [[microkernel]]-based system typically won't offer a lot of system calls -- apart from one central one, and that is *send message* -- but instead [[RPC]]s will be used instead. See [[GNU Mach's system calls|microkernel/mach/gnumach/interface/syscall]]. In the [[GNU Hurd|hurd]], a lot of what is traditionlly considered to be a UNIX system call is implemented (primarily by means of [[RPC]]) inside [[glibc]]. # IRC, freenode, #hurd, 2013-06-15 true system calls are always implemented the same way, by the kernel, using traps or specialized instructions that enable crossing from user to kernel space glibc simply translates function calls to system calls by packing arguments appropriately and using that trap or syscall instruction on microkernel based systems however, true system calls are normally used only for IPC so we also use the term syscall to refer to those RPCs that provide system services e.G. open() is a call to a file system server (and maybe several actually) # IRC, freenode, #hurd, 2013-11-02 how do system calls work in the hurd? is it like in linux yes and no you set the number in %eax and then in0x80? int, even no but that's really a detail I'm just curious how the flow goes gnumach uses call gates, not interrupt gates but that's just another way to enter the kernel the mechanism itself is almost irrelevant, it matters only for performances ah what's truely interesting is that there are very few system calls so it goes straight to gnumach, which then figures out where to relay the call to? the main one being mach_msg yes one of the arguments to mach_msg is the name of a right (as file descriptors are names for open files) hmm okay, so we get to the kernel, go to a kernel server (one context switch), then get back to the calling process, and that's 2 context switches per system call? a receive right or send right no if you send-recv, it's only one but i'm not sure we do that on the hurd again, that's a detail what is send-recv? send and receive in the same system call hmm then, we also use system calls to denote the unix-like RPCs of the hurd i mean i also call them system calls for example, read, write, stat, etc.. I see braunr: thanks