Showing posts with label Economics. Show all posts
Showing posts with label Economics. Show all posts

Wednesday, 15 January 2014

Mutex's and Semaphores - The toilet Example.

Mutex:

Is a key to a toilet. One person can have the key - occupy the toilet - at the time. When finished, the person gives (frees) the key to the next person in the queue.
Officially: "Mutexes are typically used to serialise access to a section of re-entrant code that cannot be executed concurrently by more than one thread. A mutex object only allows one thread into a controlled section, forcing other threads which attempt to gain access to that section to wait until the first thread has exited from that section." Ref: Symbian Developer Library
(A mutex is really a semaphore with value 1.)

Semaphore:

Is the number of free identical toilet keys. Example, say we have four toilets with identical locks and keys. The semaphore count - the count of keys - is set to 4 at beginning (all four toilets are free), then the count value is decremented as people are coming in. If all toilets are full, ie. there are no free keys left, the semaphore count is 0. Now, when eq. one person leaves the toilet, semaphore is increased to 1 (one free key), and given to the next person in the queue.
Officially: "A semaphore restricts the number of simultaneous users of a shared resource up to a maximum number. Threads can request access to the resource (decrementing the semaphore), and can signal that they have finished using the resource (incrementing the semaphore)." Ref: Symbian Developer Library

Saturday, 30 June 2012

Ricardos law of rent working.

Ricardian rent or the Law of rent
The Law of Rent states that the rent of a land site is equal to the economic advantage obtained by using the site in its most productive use, relative to the advantage obtained by using marginal (i.e., the best rent-free) land for the same purpose, given the same inputs of labor and capital[
Essentially this means that the bargaining power of the renter can never dip below the produce obtainable on the best available rent-free land, because whenever rent leaves them with less than they could get on that free land, they can simply move to the new location.
So in essence if the rent is too low it will be bid up by those who can make better use of the land, whilst those areas where the rent is to expensive will become vacant.
 Land and properties that are vacant for a long time are simply priced above what the local market can stand.

Simples.