On Wed, 05 Nov 2008 12:29:52 GMT
Richard Porter <[EMAIL PROTECTED]> wrote:

> > His point is that in a PMT system, such deadlocks cannot occur, but
> > in a CMT system, enormous care must be taken to stop them being
> > commonplace.  
> 
> As I recall, and it's a long time since I worked on a CMT kernel, the 
> golden rule was always to grab and release resources in a set
> sequence so that you avoid deadly embraces, but this case isn't quite
> that simple! 

It also isn't a solution :)

> The other rule is that you give up control to the
> scheduler every so often in case any higher priority task is waiting
> to run. In general I/O bound tasks are high priority and CPU
> intensive tasks are low priority.

Well, there are no priorities in CMT, really.  And for complex systems,
it can be difficult to yield while in the middle of a complex process.
Especially if the OS doesn't actually let you efficiently check and
yield if there's nothing to do.

Reply via email to