Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #6868

Re: A quota based lock

From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: A quota based lock
Date 2011-08-08 07:58 -0700
Organization A noiseless patient Spider
Message-ID <j1otia$4nf$1@dont-email.me> (permalink)
References <83f81158-8aee-486d-a51b-c0f7dfdbb0da@h25g2000prf.googlegroups.com>

Show all headers | View raw


On 8/8/2011 12:13 AM, Robert Stark wrote:
> I want to write a lock to control access to a resource, there are
> different kind of jobs using this resource, say job A,B,C, at the
> beginning, i use Lock api from jdk concurrent package, but i suffered
> from serious job starvation, so i want to do something like this:


I got to agree with Eric: I don't think the problem specification is 
clear.  Could you show, in a short code example, how the problem 
currently occurs?  Make a couple of jobs and show how one gets 
"starved?"  See SSCCE:

<http://sscce.org/>

If you have limited resources, I don't see how changing the lock system 
will help.  Limited resources mean some jobs might get starved if other 
jobs hog the resources.  I think an example of how the current system is 
working my help us understand better why you think there's room for 
improvement.


Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

A quota based lock Robert Stark <panxiaozhong@gmail.com> - 2011-08-08 00:13 -0700
  Re: A quota based lock Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-08 07:58 -0400
    Re: A quota based lock Knute Johnson <september@knutejohnson.com> - 2011-08-08 09:48 -0700
      Re: A quota based lock markspace <-@.> - 2011-08-08 10:00 -0700
        Re: A quota based lock Knute Johnson <september@knutejohnson.com> - 2011-08-08 11:39 -0700
          Re: A quota based lock markspace <-@.> - 2011-08-08 11:57 -0700
            Re: A quota based lock Robert Klemme <shortcutter@googlemail.com> - 2011-08-08 21:46 +0200
              Re: A quota based lock Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-08 20:41 -0400
                Re: A quota based lock Robert Klemme <shortcutter@googlemail.com> - 2011-08-10 09:36 +0200
                Re: A quota based lock Robert Stark <panxiaozhong@gmail.com> - 2011-08-10 04:40 -0700
                Re: A quota based lock Robert Klemme <shortcutter@googlemail.com> - 2011-08-10 18:55 +0200
                Re: A quota based lock Martin Gregorie <martin@address-in-sig.invalid> - 2011-08-10 19:26 +0000
                Re: A quota based lock Patricia Shanahan <pats@acm.org> - 2011-08-10 12:37 -0700
                Re: A quota based lock Robert Stark <panxiaozhong@gmail.com> - 2011-08-10 18:30 -0700
                Re: A quota based lock markspace <-@.> - 2011-08-10 19:17 -0700
                Re: A quota based lock Robert Klemme <shortcutter@googlemail.com> - 2011-08-11 12:32 +0200
          Re: A quota based lock Tom Anderson <twic@urchin.earth.li> - 2011-08-09 21:00 +0100
  Re: A quota based lock markspace <-@.> - 2011-08-08 07:58 -0700
  Re: A quota based lock Tom Anderson <twic@urchin.earth.li> - 2011-08-09 21:45 +0100

csiph-web