Pages

Saturday, 27 September 2008

Split in the ANC?

On 14 August 2008, I sent the following letter to The Star, South Africa’s leading daily, pointing to the possibility of a section of the ANC splitting on the basis of principle, rather than personal gain.

Once again, a brilliant article by Max du Preez (ANC fast sinking into a morass of hooliganism [retitled in this online version], 14/8).

For some time the conventional wisdom has been that a real opposition would form when Cosatu split with the alliance, and formed a Labour party. I wonder though if a more likely scenario is if the Third Faction (ANC members disgusted with self-serving factions) split to form a new party. The problem is that members of a liberation movement tend to have much more loyalty to the movement than is the case for a conventional party, so such a split would be extremely traumatic for the Third Faction.

Nonetheless, if we reach a point where it’s clear that the ANC leadership has sold out the revolution and is more concerned with plunder than good governance, I can’t see how anyone of good conscience will have any other alternative but to walk out. Let’s hope that it doesn’t come to that -- that the ANC is not quite as far gone as Du Preez indicates. Formation of a competitive opposition would be a positive development, but the cost to the country of rule by a criminal faction would be an extremely high price to pay to get there.


Now a web site has surfaced, called Friends of Democracy, hinting at such a movement in the wake of Thabo Mbeki’s forced resignation as president. A report in the Mail&Guardian, a weekly with good connections in the ANC, claims leading members of the Mbeki faction are behind the move.

Is this what I was predicting?

Not entirely, because this appears to be a personal loyalty thing rather than a split on principle – and the group behind the split appear to be one of the main factions, not Du Preez’s “Third Faction”. Mbeki himself was flawed in being over-concerned with loyalty and too little concerned with merit for example in his cabinet appointments.

Nonetheless, this is an interesting development. My personal view is that it may be a little soon for a serious challenge to the ANC; liberation movements elsewhere needed about 20 years for the gloss to wear off (partially arising from sufficient new voters without memories of the previous system).

Does anyone else think a split is inevitable? Mbeki himself in fact predicted that the ANC would eventually split, as reported in William Gumede's insightful and apparently well-informed book, Thabo Mbeki and the Battle for the Soul of the ANC (I reviewed the 2nd edition* at Amazon).


Watch this space...


*Zed Books, 2008

Friday, 29 August 2008

Multicore Multifiasco

Dave Patterson is one of the most respected names in computer architecture, and rightly so, having been one of the co-founders of the RISC movement, as well as being one of the prime movers behind RAID, among other things.

Nonetheless, when he posted an article on the potential and pitfalls of multicore designs on the Computing Community Consortion blog, I couldn't help but post the following, repeated here with a few additions.

It’s my experience that every decade or so, a packaging breakthrough allows some previously forgotten or abandoned approach to be resurrected at a lower price point, and all the previous lessons are forgotten.

Here are a few of those lessons:

  1. parallel programming is inherently hard, and tools and techniques claiming to avoid the problems never work as advertised
  2. heterogeneous and asymmetric architectures are much harder to program effectively than homogeneous symmetric architectures
  3. Programmer-managed memory is much harder to use than system-managed memory (whether by the operating system or by hardware)
  4. Specialist instruction sets are much harder to use effectively than general-purpose ones

I nearly fell out of my chair laughing when the Cell processor was launched. It contained all four of these errors in one design. Despite the commercial advantages in bringing out a game that fully exploited its features, as I recall, only one game available when the Playstation 3 was launched came close.

I hereby announce Machanick’s Corollory to Moore’s Law: any rate of improvement in the number of transistors you can buy for your money will be matched by erroneous expectations that programmers will become smarter.

Unfortunately there is no Moore’s Law for IQ.

The only real practical advantage of multicore over discrete chip multiprocessors (aside from the packaging and cost advantages) is a significant reduction of interprocess communication costs — provided IPC is core-to-core, i.e., if you communicate through shared memory, you’d better make sure that the data is cached before the communication occurs. That makes the programming problem harder, not easier (see Lesson 3 above).

Good luck with transactional memories and all the other cool new ideas. Ask yourself one question: do they make parallel programming easier, or do they add one more wrinkle for programmers to take care of — that may be different in the next generation or on a rival design?

Putting huge numbers of cores on-chip is a losing game. The more you add, the smaller the fraction of the problem space you are addressing, and the harder you make programming. I would much rather up the size of on-chip caches to the extent that they effectively become the main memory, with off-chip accesses becoming page faults (I call this notion RAMpage). Whether you go multicore or aggressive uniprocessor, off-chip memory is a major bottleneck.

As Seymour Cray taught us, the thing to aim for is not peak throughput, but average throughput. 100 cores each running at 1% of its full speed because or programming inefficiencies, inherent nonparallelism of the workload and bottlenecks in the memory system is hardly an advance on two to four cores each running at at least 50% of its full speed.

In any case all of this misses the real excitement in the computing world: turn Moore’s Law on its head, and contemplate when something that cost $1,000,000 will cost $1. That’s the point where you can do something really exciting on a small, almost free device.

Further reading


My PhD thesis, completed in 1996, but now relevant to a wider audience since multicore has become mainstream, is available on Amazon. See Other Links.

Some interesting stuff here: The Perils of Parallel: Vive la (Killer App) Révolution!

Monday, 7 July 2008

Nothing Like the Sun?



A popular affectation among climate inactivists is to insist that all climate change is driven by the sun. Let's look first at figures for total solar irradiance or TSI, a value giving the energy from the sun incident on the earth. This number has been available from satellite data since 1978. It has been estimated in the past by indirect means ("proxies") but let's stick with the modern data the accuracy of which is easier to determine. Also, there is a long-term record of suns spots but in the period when satellite TSI data is available, they are also an approximation – so let's stay with the more accurate data.

How does that data compare with the temperature trend over the same period? The HadCRUT3 data from the UK's Hadley centre is one of several that are widely used. This one is sufficient to illustrate the point. Look at the two graphs closely, and what do you see? Probably not that much: they look pretty different.

In both graphs, the points joined by the broken line are the actual measurements, averaged over each year, and the points joined by the unbroken line are the 5-year mean, which smooths out short-term irregularities. I also use these 5-year means (for each year, found by averaging the two years before and after plus the current year) for comparing the two trends, to eliminate short-term variations.

Note also the trend lines. In each, the number before the "x" is effectively the trend per year. The "R2" value is a measure of how well the trend line represents the main graph (in this case, the 5-year mean). An R2 near 1 means there is a strong relationship; near 0 means the trend line is a poor approximation to the original data. Note that the temperature trend is going up at 1.83 degrees per century, with R2 = 0.92, a very strong relationship, well outside chance. The sun trend, on the other hand, is -0.74 degrees per century, a slow downward trend, with R2 = 0.0143. If you plotted a series of random numbers, you would get a "trend" about this strong.

In other words, the temperature trend is strongly up; the sun is down, but not convincingly.

So the trend lines are different; how come some people then are saying that the sun is the best explanation of climate variation? Let's look at another measure: correlation. Correlation tells you how well two different data sets track each other. A strong positive correlation, near 1, tells you they are following the same trend. A strong negative correlation, near -1 tells you they are heading the opposite way. Anything closer to 0 tells you they are (relatively, depending how close to 0) unrelated.

Let's look then at the correlation of the temperature trend for the given years with the TSI data. It comes out as 0.37 – a reasonably strong positive correlation. What is interesting though is to look at the correlation since 1990, when the warming trend has strengthened. The correlation is -0.11 – negative but no longer a strong relationship. Look at the correlation for the period 1978-1989, and it's 0.17. Positive, but not very strong.

How could this have happened?

Answer: the sun does indeed drive climate, but something superimposed on that trend from 1990-2007 disguises that relationship. In other words, a good explanation of what's going on is that the sun is responsible for the irregular dips and peaks in the temperature graph, but when you try to make the sun explain an upward trend, it doesn't work anymore.

For some reason, at this point, I'm reminded of a line from one of Shakespeare's sonnets:
My mistress's eyes are nothing like the sun

Monday, 30 June 2008

Brisbane's Touch and Go Card

If you make a mistake in using the ticketing system in Brisbane's public transport, you are penalised. Isn't it time we were given the right to charge the system a penalty when the system screws up?

Here's an example to illustrate the point.

Public transport in and around Brisbane is on a single ticketing system (with the exception of the airport train, which operates to its own rules). Recently a smart card system called Go Card was introduced, with different pricing rules. Although the price per zone is the same, the Go Card has more generous transfer rules, making it possible to do a reasonable long trip with stops of up to an hour as a single trip, as long as you don't do more than three transfers.

The Go Card is cumbersome in operation. You have to touch a reader both whenever you enter and exit any vehicle except a train; with trains you have to touch the reader as you enter or exit a station. At no point is there any mechanism to force you to touch the reader, like a gate that is opened by touching the reader. So it's easy to forget, especially if you are in a hurry. If you do forget, a penalty is charged in excess of the likely maximum fare for the trip you were on. So, for example, if you are taking a trip that should cost $2.70, you may be charged $3.

The Go Card has had a bad press because it relies on a GPS system to tell where you are and if the GPS system has lost coverage, it fails to record your attempt at touching the reader. The effect is as if you forgot to touch the reader, and you are penalised. You can reverse the penalty by a cumbersome process of complaining by phone, and reversal of the penalty takes several days.

Considering all this, although I bought a Go Card, I did not use it much. I did however try it out in one mode, where the generous transfer policy made it cost effective. I had a trip that included:


  1. a train to the city centre
  2. a City Cat ferry
    a bit of shopping
  3. a City Cat back to the city centre
  4. a train back home


These four individual trips combine as a single trip because only three transfers are involved, provided there's a gap of at most an hour (and the last trip starts within three hours of starting out).

So let's see what happened the second time I tried this. Spot the difference? How did this happen? On the way out of the City Cat, I missed the reader. Why? Because I had to run to make the train connection. The concept that different modes of transport should have synchronized timetables has apparently not reached Brisbane.

The effect of this was that despite the fact that every trip up to the one where I missed the reader registered as a continuation of the initial trip, the whole transaction was split. I was charged $2.70 for the inititial train trip, and $3 for the City Cat trip, a penalty of 30c over the $2.70 it would have cost me to do two zones on the ferry. The total penalty though was actually $3.00 But that's not all. I still had to get home from the city. I now had to buy another ticket costing $2.70 (not reflected on the Go Card because it was now below the minimum balance permitted for buying another ticket). So the whole trip cost me $8.40. This contrasts with $4.10, which I would have paid without a Go Card, had I bought an off-peak daily.

So for one mistake, I ended up paying more than double the price I would have paid for a paper ticket, or $5.70 more than the trip should have cost on the Go Card.

How should the system actually work? The necessity to "touch on" and "touch off" every time introduces redundancy, a concept widely used in systems design to correct for errors. In the case of my trip, for example, the missing touch does not create the possibility that I had cheated. The City Cat only does zones 1 and 2, and I had up to that point only travelled in zones 1 and 2. A smart system would have picked up the fact that although something was missing, I was still on a continuous sequence of trips. My exit from the Cat could only have been in zone 1 or zone 2; the worst case for the rules for transfers would have been had I jumped off the cat immediately after my card was read, and somehow found my way back to the city centre. The gap in the record is less than the allowed transfer time.

But isn't this a whinge? Shouldn't I expect to be penalised if I make a mistake? It would be fair if I could penalise the system when it made a mistake. I would settle for $5 every time a train didn't show up when it should, or a bus, train or ferry was more than 5 minutes late. This is less than I was penalised for this mistake.

Fair's fair. How about it, Queensland Transport? You penalise us for mistakes. We should be able to penalise you for mistakes.