Re: Critical Sections for userland.



* Daniel Eischen <deischen@xxxxxxxxxxx> [071002 20:02] wrote:
On Tue, 2 Oct 2007, Alfred Perlstein wrote:

* Daniel Eischen <deischen@xxxxxxxxxxx> [071002 19:46] wrote:
On Tue, 2 Oct 2007, Alfred Perlstein wrote:

Hi guys, we need critical sections for userland here.

This is basically to avoid a process being switched out while holding
a user level spinlock.

Setting the scheduling class to real-time and using SCHED_FIFO
and adjusting the thread priority around the lock doesn't work?

Too heavy weight, we want to basically have this sort of code
in userland:

Well, yeah, but are you _really_ sure that you aren't just
running something that should be real-time and have priority
over other applications? SCHED_FIFO means you will run until
you relinquish the CPU (you can only do this as root). If
all your threads are well behaved, would this work? Have
you tried it?

No, because it wouldn't work. How do we know when to let go
of the cpu? In my system, the kernel tells you without polling.


Are you trying to prevent switching out of the thread
amongst other threads of the same application, or all
threads in the system?

All threads on that CPU.

It's basically, almost like a "soft spl" for userland.

Right?

--
- Alfred Perlstein
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Fundamentals of Lisp efficiency?
    ... Dave> infrastructure market. ... Symbolics developed a real-time CL operating system for AT&T, ... ran the switching ... So, yes, I am sure it is possible to develop a Lisp environment ...
    (comp.lang.lisp)
  • Re: Critical Sections for userland.
    ... Setting the scheduling class to real-time and using SCHED_FIFO ... and adjusting the thread priority around the lock doesn't work? ... you relinquish the CPU. ...
    (freebsd-hackers)
  • Re: OT: IA64s speed beaten by orders of magnitude...
    ... What I find most significant is that they are able to run that chip at ... transistor *can* switch at 350Ghz doesn't mean that any CPU built from ... The logic gate switching time would be relative to ... the number of components in series, but each like transistor would have ...
    (comp.os.vms)
  • Re: Catalyst 3750G drops packets with IPv4 options
    ... IPv4 packets per second when these packets contained IP options. ... A few entries show less than 0.15% CPU usage. ... can fall back to CPU routing under certain circumstances. ... 87% total CPU of which 29% is fast switching packets. ...
    (comp.dcom.sys.cisco)
  • Re: Where is RLIMIT_RT_CPU?
    ... A real-time system can only work if it is set up as whole and all ... rt priority. ... allowed a few percent CPU running at rt priority. ... It is a question of how long the cpu is used in one go and how often it can happen within the critical timeframe of the lower priority application. ...
    (Linux-Kernel)