
On 6 Nov 2013 at 20:51, Rahul Mathur wrote:
AFAIK system call is how a program requests a service from an OS kernel (viz. it's an interface between user-level code and the kernel), but the call to the library function itself does not cause a switch to kernel mode.
Also, AFAIK usages of too many system calls normally may result into high number of CONTEXT SWITCHES so thought to ask before using any calls.
There are also two kinds of syscall, fast (vdso) and slow. The fast kind doesn't context switch. Recent editions of both Windows and Linux implement fast syscalls (I think FreeBSD always has?). Which syscalls are fast and which are slow is entirely implementation dependent, and using Boost is a bad way of being that close to the metal. If you really need to worry about context switches, you shouldn't be using Boost and probably not even C++. Use a hard realtime OS like QNX, and write everything in C or assembler. Niall -- Currently unemployed and looking for work. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/