Become a fan of Slashdot on Facebook


Forgot your password?
Slashdot Deals: Cyber Monday Sale! Courses ranging from coding to project management - all eLearning deals 25% off with coupon code "CYBERMONDAY25". ×

Comment Re:Missing the point about TLS as used in OpenGL (Score 2) 42

"They only need to be prepared to change state information if the context pointer changes." How do you know when the context pointer changes? Assuming a context pointer is passed on each API call, what do you compare it to in order to detect the change? Either a thread-local copy of the previous pointer (in which case you're still using thread-local storage, and you might as well keep enough thread-local state to avoid the comparison), or an identifier maintained by the hardware (in which case you've incurred the cost of a synchronous access to the hardware state). I suppose you could be assuming that there would be a single global rendering context for the entire process (as opposed to each thread), but that's a performance loss for apps that need to render from multiple points of view (think of CAD apps rendering multiple-axis views simultaneously, or games that want to render environment and shadow maps before performing a final scene rendering).

"The same thing can happen if two different threads access the GPU without any explicit calls by the API signaling a context change. The answer is the same, don't do that." You don't have any choice. Two different (unrelated) processes can access the GPU without any explicit calls signalling a context change, and you have to be prepared to handle that. In workstation and modern general-purpose (as opposed to some gaming) systems, this is common enough to need support. There are always multiple graphics processes running, and if they're maintaining interactive performance levels, un-synchronized context switch happens all the time.

Comment Missing the point about TLS as used in OpenGL (Score 3, Informative) 42

Donovan is incorrect about the original reasons for use of thread-local storage (TLS) in OpenGL. The issue was performance. If you pass a context as an argument on every call, the library (and the device drivers, and ultimately the hardware) need to be prepared to validate and potentially change unbounded amounts of state information on every call. This imposes a significant cost on every call, even in the normal case where the context doesn't change. On the other hand, making the context thread-local means that the validation and state-change cost can be handled only when needed, as the result of an explicit call to change the current context.

Keep in mind that the original design for OpenGL paid a great deal of attention to fine-grained parallelism between the CPU and the graphics pipe. (Heavy use of batching in previous systems led to poor performance, because the graphics pipe would idle while the CPU built the next batch of commands, or the CPU was blocked while the graphics pipe dealt with a batch that took longer than average to render.) This meant that calls to transfer data were frequent and needed to have very low overhead. With hardware support, as on the SGI machines of the era, this was a very effective approach.

Current systems minimize data transfer as much as possible, so the design tradeoffs are different. Whether that helps make an argument for or against TLS in Go is something I've never looked into.

Comment Re:alternately: (Score 1) 492

For "building up" to work, you need at least (1) the infrastructure (transportation, water, power, schools, public safety, waste disposal, etc.) to support the added population; (2) the incentive to build enough supply to significantly offset demand.

In theory, you can tax the existing residents and businesses enough to create (1), but they're understandably reluctant to support that when the outcome is that the physical and financial environments they bought into will be eliminated.

In theory, you can change the zoning rules to give developers (2), but they're understandably reluctant to build large quantities of affordable housing when they can get a much better financial return by building smaller amounts of more expensive housing that are sold into high demand.

So for the time being, I think it's highly unlikely that either (1) or (2) can be achieved in San Francisco or the nearby parts of the Bay Area. Geographical redistribution of jobs, better infrastructure (particularly transportation), area-wide governmental coordination, and new financing options are all needed. "Building up" is just the answer that's clear, simple, and wrong.

Comment FP; project scheduling (Score 1) 598

The behavior of floating-point arithmetic. This wasn't covered in my university curriculum, and was necessary in tasks including graphics, machine learning, and finance once I got into the industrial world.

As a manager, possibly the single most important skill for me was learning the ways to estimate the time required for complex programming tasks. Once you're tackling problems beyond the scope of a single programmer, coordination is required, and schedule estimation is essential.

Comment Re:No one has posted in minutes! (Score 1) 167

In the US, the Environmental Protection Agency has stated that concentrations of up to 100% are safe for adults. The American Academy of Pediatrics has stated that concentrations of up to 30% are safe for children. In both cases the repellent must be applied properly! Consumer Reports recommends 30% to 50% for adults, and helpfully explains that higher concentrations last longer, but don't repel any more effectively than lower concentrations.

Personally, I've used 100% DEET for a week at a time, a few times a year, over several years, without any of the documented side-effects. If someone is in one of the (relatively uncommon) situations where it's appropriate, I wouldn't hesitate to recommend trying it. Otherwise, adults can use 30% to 50% DEET and reapply as needed. My kids use 10% to 30% when necessary.

All this is subject to the usual cost/benefit tradeoffs, of course. There appears to be a lot of data showing that the risk of using DEET is low, so if West Nile or some other mosquito-borne disease is threatening, the benefit probably outweighs the risk.


All Finagle Laws may be bypassed by learning the simple art of doing without thinking.