comp.lang.ada
 help / color / mirror / Atom feed
* Implementation Locks
@ 2014-02-15 20:20 sbelmont700
  2014-02-15 21:34 ` Jeffrey Carter
  2014-02-17 12:18 ` G.B.
  0 siblings, 2 replies; 3+ messages in thread
From: sbelmont700 @ 2014-02-15 20:20 UTC (permalink / raw)


In the past, using other languages, I spent lots of time worrying about whether I should use a spinlock or a semaphore based on how long an sequence of operations was expected to be and how many CPU's were on the system, and wrote lots of overly complicated code to chose the best option in each situation.

Now in Ada, I have difficulty giving up the habit and lay awake at night worrying about whether the implementation is going busy-wait or block for a protected action or closed entry, especially now that everyone has multicore CPU's.  I'm particularly consternated by closed entries, since I doubt the compiler can predict whether it will open back up in several microseconds or in several days.  Is it unreasonable to expect an implementation to use some sort of dynamic, hybrid model that takes into account both how many CPU's are in the system and the average time to wait?  Should I just trust the runtime and try not to worry?  Is there even anything I can do about it either way?

-sb


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-17 12:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-15 20:20 Implementation Locks sbelmont700
2014-02-15 21:34 ` Jeffrey Carter
2014-02-17 12:18 ` G.B.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox