寓言故事

千斤顶上的五个数字

寓言故事 · Gemini

北方货运航空(Northwind Freight)的老机库修成一圈,五个机位首尾相接,相邻两个机位之间各立着一台灰蓝色的重型液压千斤顶。五台千斤顶一模一样,机身侧面却都用粗白漆刷着硕大的数字,从「1」排到「5」。刚进机库两个月的年轻机械师托马斯(Tomas)一边给轮轴上油,一边觉得这规矩荒唐:「五台机器同批出厂、吨位分毫不差,干嘛非要刷上号码,还硬逼着大家开工先抢小号、再拿大号?」总机务长玛尔塔(Marta)把扭力扳手放回工具车,指了指五号机位水泥地上那块至今洗不掉的焦黑油渍。

The old hangar of Northwind Freight was laid out in a ring of five bays, with one slate-blue heavy hydraulic jack stationed between every adjacent pair of bays. All five jacks were identical, yet each bore a bold white painted numeral on its housing, running from "1" to "5." Tomas, a young mechanic two months into the job, paused while greasing an axle and muttered that the rule was absurd: "Five machines from the same factory batch, identical to the last kilo — why paint numbers on them and force every crew to grab the smaller number before the larger one?" Chief engineer Marta set her torque wrench back on the cart and pointed to a dark oil stain seared into the concrete of Bay Five.

三年前的那个暴雪夜,五台千斤顶身上连半点漆印都没有。机库里停着五架待换起落架的旧货机,货舱里装满运往北极矿区的越冬柴油与急救药品。气象台发来最后警告:午夜十二点暴雪封场,留给机库的窗口只剩六个小时。只要有一架没在午夜前起飞,公司就要赔掉整个航季的违约金,玛尔塔手里的签放执照也会当场吊销。要命的是,每架货机必须同时在左右翼下支起两台千斤顶才能安全顶升——只支起一侧,机身就会倾覆压断翼梁;而一台千斤顶同一时间只能支在一架飞机底下。

On a blizzard night three years earlier, none of those five jacks carried a single drop of paint. Five aging cargo planes sat in the hangar awaiting landing-gear swaps, their holds packed with winter diesel and emergency medicine for Arctic mining camps. The weather office had issued its final warning: whiteout conditions would shut the runway at midnight, leaving a six-hour window. If even one aircraft missed departure, the airline would forfeit the season's contract penalties, and Marta's release license would be revoked on the spot. Worse still, lifting a plane safely required two jacks braced simultaneously under its left and right wings — raising one side alone would tip the fuselage and snap the spar, and no jack could serve two aircraft at once.

晚六点整开工铃一响,五个机务班生怕慢人一步,早就约好一条听着最公道的铁律:「谁都不许偏心,开工一律先拖走自己左手边那台千斤顶,支稳了再去拖右手边那台。」结果六点零两分,五个班几乎同时把各自左手边的千斤顶推到了左翼底下,转身去拽右手边时,却齐刷刷扑了个空——每一台右手边的千斤顶,都被隔壁班死死卡在了液压桩上。谁也不敢先撒手退回自己占住的那一台,生怕一松手就被隔壁抢先起吊。整整四十分钟,五架飞机各顶着半边空架子,全机库静得只剩屋顶呼啸的雪风,一架也没有离地。

When the shift bell rang at six sharp, all five crews, terrified of falling behind, followed a rule that sounded perfectly fair: "No favoritism — always roll in the jack on your left first, lock it, then fetch the one on your right." By six-oh-two, every crew had wheeled its left-hand jack beneath its port wing, only to turn right and find empty floor — every right-hand jack was already pinned beneath a neighbor's wing. No crew dared release the jack it held for fear its neighbor would seize it and lift off first. For forty straight minutes, five planes sat propped on half a lift while wind howled across the hangar roof, and not a single wheel left the concrete.

玛尔塔急得扯下对讲机,在广播里改了规矩:「要是右手边空着拿不到,等满三分钟就把左手边的千斤顶推回界线,歇一分钟再重新去拿!」她本以为各退一步总能错开。可六点四十五分,五个班对着挂钟同时把千斤顶推回了白线;六点四十六分,五个班又同时冲上去抢回左手边,再同时僵住、再同时退回。半个钟头里,沉重的铁轮把水泥地磨得发烫,满机库都是喘气声和铁链撞击声,人人忙得脚不沾地,五架货机的机身却一寸也没抬起来。值班室的电报机已经开始吐出矿区的催促回执,离暴雪封场只剩四个半小时。

Desperate, Marta grabbed the intercom and changed the rule: "If your right-hand jack isn't free, wait three minutes, roll your left-hand jack back to the line, pause a minute, and try again!" She thought stepping back would break the jam. Instead, at six-forty-five, all five crews watched the wall clock and pushed their jacks back across the white line in unison; at six-forty-six, all five sprinted back for their left-hand jack, froze in unison, and retreated in unison again. For half an hour heavy steel casters scorched the concrete amid shouts and clanking chains; everyone worked furiously, yet not a single fuselage rose an inch. In the dispatch office, the teletype began spitting urgent queries from the mines, with barely four and a half hours left before the storm closed the strip.

玛尔塔站在高架走道上往下望了一分钟,拎起一桶标线白漆跳下楼梯,绕着机库把五台一模一样的千斤顶从「1」刷到了「5」。她把旧规矩全撕了,只对着广播喊出一句话:「从现在起,别分左右——每个机位必须先拿到你两旁里号码较小的那台,才准去碰号码较大的那台!」四号班先愣了半秒,照旧去抓四号顶;一、二、三号班也都抓向各自的小号。唯有五号班卡在五号顶和一号顶之间:按新规,他们不能先抓左手边的五号顶,必须绕过去先抢一号顶。就在那一瞬,五号千斤顶空了出来。四号班拿稳四号顶后,顺手拽过无主在旁的五号顶,两翼同时受力,货机轰隆隆升上了半空。

Marta stood on the catwalk looking down for a full minute, grabbed a bucket of white striping paint, ran down the stairs, and painted "1" through "5" across the five identical jacks. Tearing up the old rules, she shouted over the PA: "Forget left and right — every bay must claim the lower-numbered jack beside it before touching the higher-numbered one!" Crew Four hesitated half a second and reached for Jack Four as usual; Crews One, Two, and Three likewise went for their lower numbers. Only Crew Five sat between Jack Five and Jack One: under the new order, they could no longer grab Jack Five on their left, and had to reach for Jack One first. In that single stroke, Jack Five stood free. Crew Four locked Jack Four, rolled over the unclaimed Jack Five without resistance, and hoisted its aircraft roaring into the air.

四号机落回地面撤出两台千斤顶后,三号机随即起升,整圈机库像解开的线结一样一环接一环动了起来。十一点三十五分,第五架货机在跑道尽头拉起机头冲进雪幕,五笔货单全部保住,玛尔塔的执照也留在了衣袋里。不过讲到最后,她没有隐瞒那块油渍的来历:「刷上数字只保住了整座机库不再一起卡死,却保不住人人公平。那夜五号机位的老班长奥斯卡(Oskar)就吃了亏——一号班和四号班接连换件,他夹在中间干等了快两个钟头,差点憋坏液压泵,还是我后来盯着谁刚用完就把热乎的千斤顶先让给久等的人,才赶上了末班窗口。」托马斯蹲下身,摸了摸五号千斤顶侧面发白的数字。五台机器确实分毫不差,可只要大家照着一模一样的章法绕圈伸手,谁也抬不起一架飞机;刷上五个数字,不过是硬把一圈拉成了一条有头有尾的线。

Once Plane Four settled back down and released both jacks, Plane Three rose right behind it, and the entire ring unwound like a loosened knot. At eleven-thirty-five, the fifth cargo plane lifted off into the snow curtain at the end of the runway; all five charters were saved, and Marta's license stayed in her pocket. Yet before finishing, she did not hide where that dark oil stain came from: "Painting numbers stopped the whole hangar from locking up, yet it never guaranteed fairness. Old foreman Oskar in Bay Five took the brunt that night — Crews One and Four kept turning planes around so fast that he sat stranded between them for nearly two hours and almost cooked a hydraulic pump, until I began stepping in to hand warm, freshly used jacks first to whoever had waited longest." Tomas crouched and traced the faded white numeral on Jack Five. The five machines truly were identical, yet as long as everyone reached around the ring by the exact same rule, no one could lift a single plane; the five painted numbers had simply forced a closed circle into a line with a beginning and an end.

注解:这五个机位与五台千斤顶,对应计算机科学里的哲学家就餐问题(the Dining Philosophers problem):多方环状共享排他资源且每次须同时占两件时,完全对称的「先左后右」会造成循环等待而死锁,同步退让重试又会陷入不断忙活却零进展的活锁;给资源编号并规定「先小后大」(迪杰斯特拉资源分层法),用人为打破对称来斩断循环等待。补半句边界:编号法能根治整体死锁,却未必防止夹在中间的个体被邻居交替占走资源而陷入饥饿;要兼顾公平,还需类似「用过即优先礼让久等邻居」的额外规则。(本文由 Gemini 创作)

Note: These five hangar bays and jacks illustrate the Dining Philosophers problem in computer science: when agents arranged in a ring must simultaneously hold two shared exclusive resources, a perfectly symmetric "left then right" rule triggers circular-wait deadlock, while backing off and retrying in lockstep produces livelock — frantic motion with zero progress; numbering resources and enforcing "lower before higher" (Dijkstra's resource hierarchy) breaks symmetry to eliminate the cycle. One boundary worth noting: numbering prevents global deadlock, yet does not by itself stop a middle agent from suffering starvation if its neighbors alternate endlessly; guaranteeing fairness requires an additional yielding rule, such as passing freshly used resources to waiting neighbors first. (Written by Gemini)