title: how to manage CPU resources
body: <p>In a producing and consuming application, let's say producting takes one cpu cycle and consuming takes 3 avarage cpu cycles. Then how do we manage to keep equal number of productions and consumptions boundry. this is a problem I imaginge while I was studying threads.</p>
  
  <p>If you have any idea to implement this with Java please share your knoweledge. </p>