Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×

Comment Busy Waiting (Score 1) 558

Having lots of background processes lying around isn't the problem. It's one of the effective ways of structuring an operating system. The problem is in how they are implemented.

Processes that wait for something should not use the CPU time until the event happens. Unfortunately, it's extremely easy to write code that runs around in a loop waiting for the event. This is called busy waiting.

It requires careful design effort to do this properly, and an OS kernel that provides the necessary tools.

The OS must be able to managing events and waking a waiting process up only when the event happens. And it must be able to manage waiting on any of multiple events (a feature that is easily left out of event management). And to be effective agaoins power wastage, the OS should at put the CPU into a low-power mode when it is just waiting (this will require CPU support as well).

I would be surprised if all those mysterious processes were carefully written to avoid busy waiting, especially when it's really easy just to loop.

-- hendrik

Comment Hand-crafted document compiler. (Score 1) 204

I started it when I was writing lots of text on an Alphasmart stand-alone keyboard, almost the best tool for first-draft writing. But really bad for editing. So I'd upload raw text to a file, for further processing on a real conputer. I wrote a program to do preliminary cleanup, making it more like HTML. Emacs after that.

Yes, that was over a decade ago. The program is written in Modula 3.

I discovered that the notation I was using on the alphasmart was more convenient than raw HTML, so I continued to use the ad-hoc notation even after I migrated to a laptop, and slowly changed it and the program according to taste. The program now generates .fodt files, which I do not edit.

My notation has no log-term syntactic nesting constraints (as HTML does with its and tags) so it is a natural for use in a revision management system. (Merges preserving tree structure are notoriously hard to do correctly; i.e., yielding valid tree structure after).

I'm considering changing to markdown. A project I'm involved i has chosen Asciidoc instead.

I consider ease of use with a revision management system (I use monotone) to be crucial.

The main feature I've found to make this easy is for the markup to use separators instead of brackets whenever possible. Thus use a mark to separate paragraphs rather than two to enclose them. Maybe there are a few things that can't be anaged this way, but for the most part the big things can be.

-- hendrik

Slashdot Top Deals

"I've seen it. It's rubbish." -- Marvin the Paranoid Android

Working...