There's a fad at the moment for jokey versions of the famous World War II "Keep Calm and Carry On" poster, which the 1939 British government printed to reassure the public after the start of German air raids.

A little stiff upper lip is in order after the bombings in Boston because London stages its own annual marathon on April 21, with 37,000 runners expected to take part. And before that, tomorrow, the city will host a massive funeral procession for Margaret Thatcher.

Both events are security nightmares, with crowds throughout the city. Riots in protest are predicted at Thatcher's funeral cortege, the most elaborate such event for any prime minister since Winston Churchill died in 1965. Police say they are reviewing security arrangements, but the events will go ahead.

Inevitably, there are "Keep Calm and Run a Marathon" and "Keep Calm and Love Maggie" T-shirts for sale.

Security was always going to be heavy. In recent days, a stepped-up police presence has been noticeable on the London Underground, the scene of a suicide attack that claimed 52 victims and the four bombers in 2007. And London's police have more experience than most in guarding against terrorism, after years of trying to outwit the Irish Republican Army.

For example, there are no garbage cans in the Tube, lest bombs be hidden in them. Instead, garbage is put into see-through plastic bags, suspended from iron rings.

And since an IRA bombing in 1993, the City of London has been looped by a so-called "ring of steel." Many roads leading into the financial center were closed off; traffic islands with sentry boxes and CCTV cameras record every car that passes into or around the city; steel bollards and fake flower pots reach deep into the ground, designed to stop car bombs from crossing sidewalks and reaching buildings.

Of course, Al-Qaeda is not the IRA, and car bombs are no longer its weapon of choice. Similarly, although the U.K., by some estimates, has more CCTV cameras per capita than any other country, these have limited value against suicide bombers. Just as they once did about the IRA, U.K. counter-terrorism officials say publicly that they work on the assumption that further terrorist attacks on the U.K. are inevitable and that some will succeed.

Rationally and statistically, the risks of dying in a terrorist event are less than being struck by lightning (unless you live in a country such as Iraq). It isn't known whether the Boston attack was the work of international terrorists, and even if it was, arguably the terrorists would be unlikely to risk trying to repeat the attack at a similar event where police will be on the highest alert.

Still, the grim truth is that terrorism achieves its intended effect to a greater or lesser degree. It is impossible for security services not to spend more money and effort protecting London's marathon. For who would forgive them if they kept calm and lightning struck twice?

(Marc Champion is a member of Bloomberg View's editorial board. Follow him on Twitter.)