Friday 14 April 2017

Of means, and ends

On the cliff path
I don't really understand my own mind. I watch my behaviour, as an ethnographer would, and try to infer intent from observed action. I perform experiments to test hypotheses. I'm sure other people don't do this - I'm sure other people don't need to do this.

Last weekend I rode my bicycle up to the cliff path. In part, I went to see whether there were any razorbills or guillemots nesting this year (there weren't, or, if there were, I didn't see any). But in part I went consciously to test how suicidal I was. If you really want to die, I said to myself, here's your opportunity.

I didn't.

This morning I tried my usual mental test of the same issue: if I had a lethal dose of opiates in the house, would I take them? And this morning the answer is a confident 'no'.

It's hard (for me) to pinpoint when an episode of depression starts. One could say with a fair degree of truth that I've been depressed to varying degrees for more than three years, but a period of high intensity - a period in which I've been struggling badly with suicidal thoughts - started in late December and ran until very recently. I've been making preparations to end my life - 'setting my affairs in order', as they say. There have been a few days in that that I'm genuinely surprised to have survived.

But it seems that period is over - of which I have to say I'm very glad. Which makes my current behaviour even more bizarre.

I've had the veins removed from my left leg, as a consequence of childhood illness. Consequently it doesn't drain very well, and tends to develop clots. Consequently, for the last twenty years I've been on blood thinning drugs: specifically, warfarin. Warfarin is a nasty drug. The lethal dose is only three times the therapeutic dose, and dying of warfarin overdose would be extremely unpleasant. I've thought about this a great deal, because of course the one drug I do have a lethal dose of in the house, and have had all through this period, is warfarin.

It seems I've been at best a dilettante suicide. I have several means of lethality at my disposal, none of which I've used; as I say, my routine test of how suicidal I feel has been, if I had a lethal dose of opiates, would I take them? For the last many weeks the answer has been 'yes'; but I haven't chosen to take the drug I did have.

Instead I've done the opposite, and I'm still doing it. And that's bizarre.

The therapeutic dose of warfarin fluctuates with a range of factors, and consequently one needs to have the clotting ability of one's blood retested regularly. I'm currently supposed to be retested fortnightly, but in fact the last time I was tested was on the 11th of January; since then I've refused. And three weeks ago I decided to titrate the dose down and come off warfarin altogether.

Without it, I shall almost certainly die, probably quite quickly. That's OK; I've never been afraid of death. Much worse, though, I may have a disabling stroke. My decision to stop taking warfarin was, consciously, another test of how suicidal I was. I could at any time, I thought, reverse the process, take a dose, go and get tested.

Well, I could. But, although I no longer feel suicidal, I haven't. So what's going on? Why not? Is it just pride, a refusal to back down? Is it indecision?

Am I capable of killing myself out of sheer stubbornness?

I don't know. It seems I am. I really don't understand my own mind.

Thursday 13 April 2017

A really interesting map of Scotland

The map at just over 1,000 signatures
I've blogged before - a number of times - on maps which show the systematic difference in political culture between Scotland and England, but here's a really interesting one. This map shows the early signatories to a petition against the 'rape clause'. Why, on this issue, should there be such a sharp divide between Scotland and the rest of the UK?

Yes, OK, the campaign has been led by Alison Thewliss, an SNP MP. Yes, Nicola Sturgeon did reference it in her barnstorming interview at the Women in the World summit in New York. But this is a clause which affects women across the UK, a clause so perversely evil that it must surely offend people of any gender across the UK.

So why is Scotland so clearly delineated?

Obviously, this is early days; the petition has barely more than a thousand signatures. But it will be interesting to watch it over the next few weeks. Is Scotland not only left of the rest of Britain, but also more feminist?

Update, 14th April

Here's the map at almost 4000 signatures (coloured by % of constituents). Can you still see the Scottish border?
The map at almost 4,000 signatures

Update, 16th April

Now at 16,000 signatures, and still every constituency in mainland Scotland has more signatures than any constituency outside Scotland.


Tuesday 11 April 2017

Peer to peer post-scarcity computing

Trinity College Library, Dublin.
In previous notes on post-scarcity hardware (here and here) I've assumed a single, privileged, main memory manager which maintains the canonical memory pool. All requests for memory objects go to that manager, and new non-private memory objects must be created in the address space managed by that manager. The memory manager thus becomes both a bottleneck and a single point of failure.

In the second note, I'd suggested that memory should be allocated in pages with each page belonging to a single thread. On true post scarcity hardware, that means that each page could physically co-reside with the processor on which that thread was run. That processor would be responsible for curating its own memory objects (which in essence means updating their reference counts, and garbage collecting them when they're no longer required).

Memory objects would still be requested by other processors by outputting the request on the address bus. Because memory objects are immutable, any processor which currently holds a copy of the requested object can respond by outputting that copy onto the data bus. Whether this is a win depends on topology, but my own mental model of the internal arrangement of the processor array is that each node has direct communication with eight nodes on the same layer, and nine on each of the layers above and below.

In this model there's no physical space to route a single address/data bus pair which connects every node, so the model is necessarily store-and-forward like old-fashioned Usenet, so it would be a win for the topographically nearest node which has the data to respond with it. This does of course require that every node can trust every other node to obey the rules of the system.

Reference counts are of course not immutable, but no node but the canonical owner of the memory object needs to know anything about them. Of course, when a node which is not the canonical owner of the memory object passes a copy of the object to a third node, it must communicate back to the canonical owner to update the reference count; and when a node holding a copy of an object deletes that copy, it must again communicate back to the canonical owner that the copy no longer exists.

It also means that, for any object, when the reference count of that object on its canonical node hits zero, it must not be deleted immediately, because an 'add reference' message may still be propagating through the system; instead, it must be queued to be deleted, and held in that queue for the maximum time it could reasonably take for a message to propagate.

There are some problems I haven't worked out, which may make this idea unworkable. Suppose a node (A) requests a memory object (1) from each of its 26 neighbours. None have it, so each passes the request on to each of  its neighbours which haven't yet received the request. One node in this second shell, (B), has a copy of (1) and responds. How do we communicate with each of the nodes currently retransmitting the request that the request has been satisfied? If the 'cancel' message propagates though the system at the same speed as the original message, then it can never catch it.

For sending 'update reference' messages to work effectively, each node must know which single one of its neighbours is nearer to the target node of the message, but this does not seem to me in itself problematic. Obviously broadcasting 'update reference' messages across a store-and-forward network would be dreadfully inefficient. But is broadcasting 'have you got' messages any more efficient than simply querying nodes on the direct route to the canonical owner? I'm not sure.

And, when receiving a copy of a broadcast message, its obviously desirable that each node should only rebroadcast it only to nodes which have not yet received it. But is it computationally cheap to know which nodes that will be? I think so, but I'm not confident and will have to prove it.

Finally, the single memory manager acted as a single point of failure. But a system in which every single node is the canonical owner of a segment of the memory map means that the loss of any node could mean catastrophic failure if that node was the canonical owner of some widely used object. Obviously if the object is widely used it's likely that many nodes will have copies of it, so it's probably possible to rebuild at least the critical bits of the missing node's memory.

But how does one construct an algorithm to decide which node should take canonical responsibility for the orphaned memory objects? How does one construct an algorithm that would scale, as nodes are progressively lost?

This I don't know.

Creative Commons Licence
The fool on the hill by Simon Brooke is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License