[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-smp
Subject:    Re: Linux threads
From:       "jcordina" <jcordina () maltanet ! net>
Date:       1999-12-11 0:10:02
[Download RAW message or body]

>
> What he was worried about was locking 4 processes to 4 specific CPUs.
> Then one acquires a critical lock, and that process gets displaced by
> something of higher priority.  The other three would then hang if they
> try to acquire this lock, and the process holding the lock would be unable
> to prempt one of the blocked processes to finish up and release the lock.
>
> I don't like the idea of locking a process to a cpu.  Cray Research
> has/had a user-space scheduler as you suggest, but they dropped it right
> on top of the normal kernel scheduler without this business of locking a
> process to a specific cpu.  That worked ok.  Taking too much control can
> be a bad thing...
>
Sill me, sorry for not understanding your point guys. Well my idea was to
first of all ask for a series of redundant kernel threads and thus if one
thread gets descheduled then the others would simply run on (this is to stop
anyone out there asking me what happens on a kernel call). Now if as you
guys rightly mentioned, what happens if one of the threads enters a critical
section and then is interrupted half way through and the others cannot
proceed. Well there are several solutions which I will spare you guys who
are not that technically minded most of which would entail the changing of
kernel entries ( ex gang scheduling, the other threads yielding immediately
on reception of such a case, stopping the kernel from context switching
thread when in critical section sending a signal telling thread that in say
100 instructions a context switch in the kernel is occurring, etc. Yet my
solution would be to take advantage of certain Pentium II instructions to
build a lock free run queue structure. Mainly the critical section scenario
would never occur since that is the main shared data between the threads
running on the different kernel threads. Otherwise things like interprocess
communication is possible already without blocking since a system of
messaging has been implemented in the system By the way lock free data
structures are quite complicated to design properly yet that does not mean
that they do not work !!!

Cheers

Joseph Cordina

P.S. All this might work out since I have already a working strategy of
getting a series of cloned processes and then a way of forcing them to bind
to a specific processor thanks to Fred Barnes [August 26, 1999]


-
Linux SMP list: FIRST see FAQ at http://www.irisa.fr/prive/dmentre/smp-howto/
To Unsubscribe: send "unsubscribe linux-smp" to majordomo@vger.rutgers.edu

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic