Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2001 20:43:35 +0100
From:      Thierry Herbelot <thierry@herbelot.com>
To:        hackers@freebsd.org
Subject:   scheduling frequency for threaded applications ?
Message-ID:  <3AB66167.7DE93AB2@herbelot.com>

next in thread | raw e-mail | index | archive | help
Hello,

I'm developping a network benchmark application ("packet blaster").

The current version uses many processes, to send and receive packets,
and collate statistics.
when I look at top(1), I see most of the time taken is in the "system"
category. I assume this is due to the many context switches between the
collaborating processes.

If I want to get rid of this system overhead, one solution is to use
threads (all sharing the same address space, thus no more context
switching).

My question is : how otfen are the threads rescheduled ?
(all threads are mainly always blocked until an event arrives, either a
timeout with select() or a packet with recevmsg())

I've had a quick look a TFM, but I don't see anything applicable
(pthread_setschedparam(3) for example does not speak of scheduling
frequency)

-- 
Thierry Herbelot

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AB66167.7DE93AB2>