Thursday, July 12, 2012

Drop the question mark ...

In its original design, and up to version 3.0 distributed with the 3rd edition of his book (2005), Andrew Tanenbaum's MINIX was a single-address-space operating system. Granted, you could have multiple process running simultaneously and they're isolated from each other, but they all happily frolic in the same address space, and only the segmentation unit of the x86 processor prevents the havoc from happening.

It's not necessarily a bad thing: paging introduces overhead in address resolutions - especially when your virtual-to-physical translation buffer is no longer sufficient, requiring up to 3 cache misses before you get a single byte of data. Its impact on context switching is even more frightening than this: whenever you wake up another process, the whole translation buffer has to be flushed (okay, *some* pages -- usually those holding the kernel -- can remain sticky).

Not having paging has a huge impact, however: you can't build any sort of modern virtual memory. No partial swapping of some unused part of the software... and no "statistical allocation" of the memory. Much like in MS-DOS times, if your compiler *could* need up to 16Mo of RAM, you must give it all from the start. If it happens to need only 8Mo for the file you're compiling and that you need those other 8Mo for doing something else meanwhile, well, too bad for you.

But it has changed since then. Between 2008 and 2010, people have been adding a "virtual memory server" to Minix, which in turns remembers me of my "pager2" service in Clicker. It let you control mapping of your address space (do_mmap, do_mmunmap) and supports the process manager (do_fork, do_exit), but here, it also directly handle page faults through message passing. Again, it's very "memory object"-like (another key Clicker concept), which shouldn't be a surprise: I got the idea of the memory object while reading the other Tanenbaum book about operating systems :)

Altogether, I'm absolutely not convinced that placing the address space management into a server rather than into the microkernel was the best design choice one could make. Granted, 'forking a process' is something that could happen out of the microkernel, but pagefaults ? ...

Iirc, I had the idea of letting the Clicker microkernel know that some physical pages had been 'pre-allocated' to some memory object (which you can think of as 'virtual regions'), and only notify the server-level code about a miss when that pool is exhausted... a sort of hybrid micro/exo kernel. But I dropped the whole project before I got to that point.

One of my major "errors" regarding the Clicker overall design, though, was that will to make the paging optional, despite it turned out that every other feature was depending on it. My module mechanism allowed me to do so, but it over-complicated the whole code, introducing the need for sophisticated book-keeping structures, run-time service replacement, and a mysterious "private heap" feature where linker scripts should have been enough.

Thursday, October 20, 2011

the lost Wiclicker

Back in June 2004, I stopped trying to have a documentation as static .html files, and turned towards a (php)wiki for Clicker documentation and research. It turned very useful to coordinate our efforts as DasCandy provided some sporadic help here and there, and whyme_t developped installer tools and modules for Clicker. I was so happy to see a team at least starting!!

The wiki is now unfortunately defunct after both a spam assault and my failure to identify a sudden bug in Php code. I have a last dump on my system, but I haven't managed to recover the content yet.

After the lost forums, it was somehow too much to try to recover things at all.

Wednesday, May 12, 2010

Hyper-Desktop Markup Language ?

Among the "funny ideas" I had for Clicker, many has echoed in other's mind and some eventually got implemented here or there.

I won't call myself as "spolied inventor of tags", of course. I'm not. Though I have to admit tags are 100% aligned with what'd have pushed for Clicker if I had any resources to make things move by just pushing them.

Now, let's have a look at the box #7 of this "clicker desktop mockup" I made up somewhere near 2K++ ... the "one-key-command-line" for quickly spawning things is now mainstream ... Even Windows has it (or at least as some plugin) where you type [ESC]word[ENTER] to search and launch your report editor rather than crawling through clobbered menus.

"Incoming" (last imported documents) and "favourite" meta-folders are of lesser significance given we've got the "download history" window of Firefox. But let's check out that box #7 ... It was claiming "users do tasks, more than they use applications". That thing is starting to change as well, the welcome panels of Thunderbird 3, Wireshark (Lucid release) and K3B (a while ago) being an obvious example of it. They also claimed "a task is performed using a collection of tools operating on a collection of documents". We haven't got anywhere near that so far, afaik. Do I want to integrate something to the wonderful Tomboy application ? I have to learn C# ... Do I want to have Gimp able to learn new key combos for filters ? I bet I'll have to dig into some GTK+ and maybe some scheme or Python would help me.

Yet, all I'll be doing somehow is moving boxes around, connecting wires between blocks of code, etc. This is something that should be as easy to do as writing HTML, but there doesn't seem to be any Hyper-Desktop Markup Language around.

-- edit -- Btw, I was about to attach a picture in a thundermail while thunderbird crashed at me because I was also moving directories around. *sigh*. Long is the road.

Thursday, May 6, 2010

shell companion windows

To some extent, it isn't necessary to write a whole new application for the futureshell. What we need is a connection to a "graphical tty" that is associated with the current shell, so that e.g. if I want to offer a preview of an image or show graphical relationships between items, timelines, etc., all I have to do is sending "drawing commands" to that companion window. Where the companion stands, whether it sticks and move along, what's its size, etc. can be managed by the window manager. That may not be as sweet as having "file descriptor #4" ready by default, but that'll certainly be easier to evolve to.

Tuesday, May 4, 2010

Formerly known as "FutureShell"

I once made a little mockup of "FutureShell", a sort of mix between Enlightenment terminal and nautilus. It had many "killer features" such as "intelligent icons" that can inspect the type of data you drop to them in order to move data to the "most appropriate place".

While working today, there's another feature I wish my shell/terminal had: transfer of configuration. I'd love I could somehow drag-and-drop the value of SSH-AGENT variable or the label of a directory so that it cd' to that directory in another window.

I wonder whether the SDL-for-perl could help me prototyping this ... since I've realised that I don't need to build up my own kernel / X server to experiment with document access.

Wednesday, January 13, 2010

It's all about tuning!

A major improvement in user interfaces is the ability to tune things into your own needs. When people says they are glad when things are uniform (Windows file selection dialogs, anyone), they typically forget how mad they were at MS the last time they faced an unwanted change in their application behaviour.

Right-click on the gnome bar to add/remove widgets or to drag the bar around is neat. global-set-key in emacs is neat. Do I have trouble remembering that F2 isn't for saving the current file ? I can just tell the application how I work rather than training myself to new commands. In that respect, I do love the ctrl+right-click of Enlightenment's terminal where I can tell "off with their scroll bars!" like the Wonderland's Queen of Hearts. I'd just have loved something more such as "tweak'n'tune" menu entry that would have dumped the current settings in /tmp/eterm-current.rc that would have had a comment saying "tweak at wish and save under $HOME/.etermrc to validate the current settings as defaults".

Let's face it, application designers: you cannot anticipate all the possible tuning needs of your users. A config file is 200 times worth any wizard you can come with. If you deliberately and definitely hide configuration away from users, you also remove them the opportunity to learn more and to repair things when they're broken (how long did i wasted investigating the output of strace -eopen in search for an undocumented resource/config file!)

All this because I couldn't close a tab in emacs by middle-clicking it (a firefox habbit) nor to adjust an Eterm background intensity with the scrolling wheel ...

Tuesday, December 8, 2009

The curse of configuration ...

./.config/gtk-2.0/gtkfilechooser.ini -- a single file that has been the reason of so much cursing these last months. Okay, i'm "migrating" my user profile for probably too long now, and i inherit previous defaults, etc. Yet, despite how much I love the "new" gtk file picker, I have been repeatedly annoyed by the fact it was listing all the "hidden" files & directories here. This combined with the fact that it also started at home directory by default led to useless waiting time everytime i want to attach/upload/download/open/save-as/whatever.

I've been hunting for that single file with all my skills, including inotify, google and strace, but it remained hidden, unnoticed. What I mostly dislike, of course, is the absence of a "configure this dialog box" (or so-called "preferences") in gnome-ubuntu. Another perplexing fact: the file seems duplicated: there's a .ini and an extension-less file (in XML encoding) detailing the same stuff.

Making it "for humans" isn't everything, dudes. You've got to document what you're doing and keep in mind that humanity also include your power users.