Re: [BLACKBOX] Seasoned Linux.

From: [at]} <Wojtek>
Date: Mon, 10 Jan 2011 23:17:07 -0500

----boundary-LibPST-iamunique-647788390_-_-
Content-type: text/plain

On Mon, 10 Jan 2011, Rex Couture wrote:

> In spite of the very useful nature of a lot of modern software, I'm
> sure we all agree that the overall quality is somewhat disappointing.

Very early in my project cycle I made an evaluation of "useful versus
disappointing". I chose the "useful" despite knowing the "disappointing"
component from my earlier encounters with Linux as a home-grown
administrator. I sort of knew that getting deeper will not make my task
any easier. I decided in favor of Linux, partly because an alternative is
not in sight. For example, I could have adopted BlueBottle if it was
running on the Blackfin processor. But it is not.

I am now reading a few books on Linux kernel: one on Embedded Linux,
another one on Linux Device Drivers, and yet another one on TCP/IP in
Embedded Linux. More books are in the queue. I can rank these three books
on a scale from "messy" to "unacceptable". None of the three reads well,
even though Linux Device Drivers is the least terrible from the three. I
am wondering, why these books give me headaches.

I am thinking that the books reflect the basic design feature that Linux
kernel has no hierarchical structure. It does have some structure, which
is rather arbitrarily declared in the form of the directory tree and which
files is where, and how it is named. Being mandated by humans, the rules
are also freely trespassed by humans. The books make it abundantly clear
that in fact there are no rules which would not have been trespassed.

Lack of hierarchical structure makes the books "flat". It reads somewhat
like this: "this is here, and that is there, and by the way something else
is also there". I am finding it hard to memorize "this is here and that is
there". The big picture is not emerging (yet) because I suspect there is
no big picture in the Linux kernel. There are features. Some of them
extremely useful. But hard to remember.

The good news is that linux kernel is self-contained. There are no
libraries in the kernel. (How many of you knew that?) The number of
external references is therefore small. (Most likely there are none.)
Linux kernel directory tree just sucks everything in. Whatever feature the
developers have found useful, it is somewhere in the file hierarchy. It is
impossible to guess, where it is possibly hiding. That's why the books
are so thick.

I should also say that Linux kernel contains many constructs which we in
this group have hardly encountered: semaphores, spinlocks, work queues,
tasklets, interrupt service routines, and perhaps a few more. We live in a
safe world of the single-process multitasking. The Linux kernel is a
dangerous place littered with critical sections. It is a bit unfair to
compare the two systems without admitting the difference.

My next task is to develop the interrupt service for my FPGA. The more I
am looking into it, the more it looks like an egg to me. I am not exactly
sure yet in which place I will dig the hole to get me inside the egg's
shell. That's why I am reading these books.

I can already appreciate that reading the fourth book "Inside Linux
kernel" cannot be avoided, even though I hoped to never look inside.

Wojtek


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-647788390_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIE9uIE1vbiwgMTAgSmFuIDIwMTEsIFJleCBDb3V0
dXJlIHdyb3RlOlxwYXINClxwYXINCj4gSW4gc3BpdGUgb2YgdGhlIHZlcnkgdXNlZnVsIG5hdHVy
ZSBvZiBhIGxvdCBvZiBtb2Rlcm4gc29mdHdhcmUsIEknbSBccGFyDQo+IHN1cmUgd2UgYWxsIGFn
cmVlIHRoYXQgdGhlIG92ZXJhbGwgcXVhbGl0eSBpcyBzb21ld2hhdCBkaXNhcHBvaW50aW5nLlxw
YXINClxwYXINClZlcnkgZWFybHkgaW4gbXkgcHJvamVjdCBjeWNsZSBJIG1hZGUgYW4gZXZhbHVh
dGlvbiBvZiAidXNlZnVsIHZlcnN1cyBccGFyDQpkaXNhcHBvaW50aW5nIi4gSSBjaG9zZSB0aGUg
InVzZWZ1bCIgZGVzcGl0ZSBrbm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ZS5ccGFyDQpccGFyDQpXb2p0ZWtccGFyDQpc
cGFyDQpccGFyDQotLS0tXHBhcg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGgg
Ym9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0JFUk9OLkNIfX0AYXNr
bA==
----boundary-LibPST-iamunique-647788390_-_---
Received on Tue Jan 11 2011 - 05:17:07 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:20 UTC