Layering buffering on top of other buffering is usually a bad idea

Here's something that I've seen illustrated more than once : layering buffering on top ofbuffering is almost always a bad idea .

One of the reasons is that it can be tricky to write a correct version.For example, consider all the things that you have to get right if youwrite a file IO buffering layer on Unix, including:

  • you must remember that you've seen an EOF, and return this indicationto the next level up without doing another underlying read() .
  • you must return

Why the x86 Linux kernel is part of every process's address space

In an earlier entry I mentioned that theLinux kernel takes the top 1 gigabyte of a process's address space foritself. In fact this is not just address space that the kernel reservesfor its own use; the entire kernel itself actually lives in the topgigabyte of every process's memory map.

(You can't read it or run it because it is protected address space,accessible only when the system is in kernel mode, except for the VDSOit exports to processes these days.)

The


The Mystery Box – Cloverfield

早前看了這個 J.J. Abrams 的 TED 演講 ,主題是「The Mystery Box」。他說了很多,有點抓不著重點,但比較深刻的是他最愛的《Jaws》裏的一幕,不是大白鯊的特技,而是父子一幕。他說那些怪物啊、鯊魚啊都不是重點,真正在 mystery box 裏的東西


What seems to use power on an Asus Eee PC

Courtesy of having an Eee around and being curious about how to maximizethe battery life, here are some measurements about what bits seems touse how much power. All of these measurements are for a '4G Surf' model;your mileage may vary on other ones.

First, a disclaimer: all of these measurements are made with a powermeter while the Eee was on wall power. It's possible that the Eeebehaves differently when running on battery power (although I wouldbe somewhat surprised).

Suspended

Blunder

Not long ago, a survey in Massachusetts General Hospital told us that nearly half of doctors admitted to witnessing a serious medical error but not reporting it. According to another survey published this week, most doctors in three United States teaching hospitals agreed that reporting errors improves quality of care, although only a little over half said they understood how to do so; only 18% said they had actually reported a minor error and 4% a major error.

How can this be, I muse, that reporting medical errors lead

Lab notebooks are not changelogs

Here's something from my previous entry thatI should clarify: lab notebooks are not changelogs .

Lab notebooks and changelogs are two different things. Lab notebooksare scribbled at the time for yourself, and should includeeverything. Changelogs are written after the fact for other people, andshould include only the things that actually turned out to matter.

In other words, changelogs are the sysadmin equivalent of lab reportsand scientific papers. You can no more use a lab notebook as a changelogthan you could submit a lab notebook


小雙俠王道復古


「嗚嗚...汪汪汪! 」日本方面宣布開拍《小雙俠》(Yattaman ヤッターマン ) 真人版. 戲未有得看, 唯有靠─王道復古!


其實筆者也不清楚香港何時播過《小雙俠》, 但總是對這些舊日本動畫很有一份親切感.





香港 中文版主題曲

Continue reading...

迂迴的報復

靑少年的行為越來越令人費解,為何會如此?看看現在的小朋友愛玩甚麼就知道。

五歲至三十幾歲的人,都在遊戲機的世界內打打殺殺,雙眼不但難有靈光,更普遍的是近似智障的癡呆,小朋友之間,即使三五知己聚在一起,也

Why sysadmins should keep a lab notebook

Yesterday, a coworker and I were working on a performance issue we'rehaving with our new SAN RAID controller. We had a hypothesis about whatmight provoke the problem, so we sat down, fired up some tests, andwatched our logs; nothing showed up. Later on in the day, we saw someodd indications in other logs and wanted to see if they correlated withthe tests we'd done, but you can already guess the punchline: we hadn'trecorded when we started and stopped


What applications are actually crucial at a university

Like most organizations, the university has what I call administrativemanagement systems , the computers thathandle core business record keeping like payroll, accounts payableand receivable, HR, and (this being a university) crucial studentinformation like enrollment and marks. This is serious stuff, runusing expensive software on expensive databases on expensive hardware(and behind paranoid firewalls), and, like most places, is considered apretty crucial thing.

But it turns out that it has quietly become not the most crucialsystem the university runs.