Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2005 10:52:48 -0700 (MST)
From:      "Ryan Sommers" <ryans@gamersimpact.com>
To:        "Zera William Holladay" <zholla1@uic.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Kernel mode programming
Message-ID:  <2540.208.4.77.168.1106070768.squirrel@208.4.77.168>
In-Reply-To: <Pine.GSO.4.58.0501180957340.7134@icarus.cc.uic.edu>
References:  <002201c4fd4a$c5a81230$0700a8c0@felix> <20050118140523.GE3054@empiric.icir.org> <Pine.GSO.4.58.0501180957340.7134@icarus.cc.uic.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Zera William Holladay said:
> Even if the application were run as a kernel module, how much of a
> performance benefit could there be when making system calls?  I suspect
> that the module would get a higher scheduling priority but realistically
> wouldn't the module still have to make system calls in the same manner
> that a regular user process does?  I really don't know, so would some kind
> soul tell me please?
>
> -Zera Holladay

The kernel is already running in privileged mode on the CPU so there is no
need for a system call. Technically the kernel never has to make a system
call. A system call is just a well defined method of transitioning between
user and supervisor code. Since the kernel is already supervisor code
there is no need to make a system call.

Whenever a program makes a system call it has to generate an interrupt,
this is the extra savings he is talking about. By already executing in the
kernel his code does not have to suffer the overhead of an interrupt
handler and can just make a jump to the syscall handler.

Least this is all my understanding of it. :)

-- 
Ryan Sommers
ryans@gamersimpact.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2540.208.4.77.168.1106070768.squirrel>