POV-Ray : Newsgroups : povray.off-topic : Locking references : Re: Locking references Server Time
5 Sep 2024 03:25:39 EDT (-0400)
  Re: Locking references  
From: Warp
Date: 9 Nov 2009 18:05:26
Message: <4af8a035@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> Because, if every process always reversed resources in ascending order, 

  Reversed?

> then both processes above will attempt to reverse resource 1 and then 
> resource 2, in that order. In the above example, deadlock occurs exactly 
> because the first process tries to get resource 1 and then resource 2, 
> but the other process tries to get resource 2 and then resource 1 
> (descending order).

  You assume that the processes can reserve the resources in any order
they want. It may be so that process 1 *has to* reserve resource 1 before
it can reserve resource 2, and the other way around for process 2.

  Anyways, you were talking about ordering IDs of *locks*, not ordering
resources. I still can't understand what you are talking about.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.