lkml.org 
[lkml]   [1998]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Differences between FreeBSD and Linux system call mechanism
On Thu, 3 Sep 1998, Joerg Pommnitz wrote:

> in freebsd-current Terry Lambert wrote:
>
> > Linux uses a call-gate based kernel entry, which is TSS based, and
> > therefore takes more CPU cycles on a contect switch than strictly
> > required. The FreeBSD mechanism for kernel entry (and subsequet
> > context switch) is threfore more efficient than that used by Linux.
>
> I'm starting to wonder. Terry normally knows what he is talking about,
> but this posting seems to contain various mistakes:
>
> 1) Linux system calls are done using software interrupt 0x80 on ia32.
> Does this qualify as a "call-gate based kernel entry"?

An interrupt (hardware or software) traps to the kernel. There must
be a valid IDT entry for that interrupt. So far, there are no call-gates
at all. The trap to kernel-mode references elements within that IDT.

> 2) I don't see the connection between kernel entry and TSS based task
> switch. Mingo already has patches that replace the current TSS method
> with software based context switchs.

You can save/restore the context using help from hardware or you can
do most all of it in software. Intel provides a TSS Descriptor as
"help from hardware". This TSS is still not a 'call gate'.

> 3) I'm not sure about Terrys definition of "efficient", but if he means
> required CPU cycles I thought that there were not that many left in
> Linux that FreeBSD could be better. Has anybody hard numbers for both
> kernels?

Since the ability to read the actual number or CPU cycles required to
perform some functon became avalable with the Pentiums, there has been
a lot of work on both sides attempting to reduce the number of expended
cycles to the bare minimum.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.1.118 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.058 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site