<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-34849900</id><updated>2011-11-28T02:23:04.540+02:00</updated><category term='plans'/><category term='memory allocators'/><category term='domains'/><category term='ipcbox'/><category term='tiling wm'/><category term='dlmalloc'/><category term='memory management'/><category term='news'/><category term='debugging'/><category term='web'/><category term='C'/><category term='look and feel'/><category term='development'/><category term='jarios'/><category term='CORBA'/><category term='IDL'/><category term='microkernel'/><category term='os choice'/><category term='updates'/><category term='readleaf'/><category term='bullshit'/><category term='RPC'/><category term='vnode'/><category term='general'/><category term='workspace'/><category term='distributed systems'/><category term='european fetishism'/><category term='mstring'/><category term='obvious'/><category term='jari'/><category term='rpcv7'/><category term='gnome'/><category term='holywar'/><category term='useful tips'/><category term='protest'/><category term='dzen2'/><category term='filesystems'/><category term='amd64'/><category term='opensource'/><category term='v2'/><category term='haskell'/><category term='buddy system'/><category term='thoughts'/><category term='configs'/><category term='MuiString'/><category term='Jari OS'/><category term='window maker'/><category term='programming languages'/><category term='ipc'/><category term='notes'/><category term='linux'/><category term='fanatics mode'/><category term='vfs'/><category term='emacs'/><category term='operating systems'/><category term='research'/><category term='x11'/><category term='httpd'/><category term='seayak'/><category term='xmonad'/><category term='ideas'/><category term='fork'/><category term='redleafd'/><category term='SDK'/><category term='porting software'/><category term='kayak'/><category term='sbuf'/><category term='ICANN'/><category term='adventure'/><category term='dzen'/><category term='desktop'/><category term='how-tos'/><category term='drivers'/><category term='tips&apos;n&apos;tricks'/><category term='GNU mach'/><category term='kayaking'/><category term='software architecture design'/><category term='FPL on system development'/><category term='schemevm'/><category term='gcc'/><category term='design'/><category term='low level'/><category term='networking human services'/><category term='project management'/><category term='for beginners'/><category term='fail'/><category term='architecture'/><category term='message passing'/><category term='scheme on practice'/><title type='text'>Deeper than deep</title><subtitle type='html'>This is a blog about my hobbies, you may it read as Jari OS development blog via tags, or read it all.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34849900.post-491370430067274728</id><published>2011-10-18T10:41:00.003+03:00</published><updated>2011-10-18T10:45:15.561+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rpcv7'/><category scheme='http://www.blogger.com/atom/ns#' term='RPC'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='ipc'/><category scheme='http://www.blogger.com/atom/ns#' term='ipcbox'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><category scheme='http://www.blogger.com/atom/ns#' term='sbuf'/><title type='text'>Something more: about general system high-level design</title><content type='html'>Well, I want to repeat something again, but with more words.&lt;div&gt;Today I want to introduce intercommunication design within the&lt;br /&gt;whole system.&lt;br /&gt;Firstly, I want to tell - IDL is a good idea in theory and is a bad idea&lt;br /&gt;on practice.&lt;br /&gt;The main reason - it's implementation. IDL usually describe interfaces and,&lt;br /&gt;in addition, creates some code, that packs the request, get it, call it,  and, finally,&lt;br /&gt;reply. I.e. receive, call and reply to the message, nothing more.&lt;br /&gt;But, in our system we have something more complex, let's enlist it:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;  IPC message forwarding &lt;/li&gt;&lt;li&gt;  Postponed calls (blocking operations) &lt;/li&gt;&lt;li&gt;  IPC message modification operations &lt;/li&gt;&lt;/ul&gt;Well, on that point you need something more featured than receive - call  - reply&lt;br /&gt;cycle, you need to determine when you need to forward a message, on which&lt;br /&gt;point you need to do it, what is immutable message parts and what parts&lt;br /&gt;should be modified and/or cut off.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The other "funny" thing is postponed messages, in this case IDL  generated code&lt;br /&gt;must contain many stuff like quick allocation of memory and other stuff.&lt;br /&gt;Finally, generated code is coming to be huge, and in addition you need  to modify&lt;br /&gt;it in some different cases.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Another problem is a problem with interfaces, i will try to describe it  briefly.&lt;br /&gt;For each instance you have an interface with a predefined set of functions,&lt;br /&gt;many functions are similar, or identical: for example, device has a  read() function,&lt;br /&gt;and file has a read() function, but you have a one set of interfaces for  file system&lt;br /&gt;and other set of interfaces for devices. That mean that you need to try  develop some&lt;br /&gt;generic interface, and extend it every time with your own functions  again and again.&lt;br /&gt;On practice you will have a big set of libraries with interfaces and it  will be a real headache.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From other point of view, you can resolve the problem with it on the  libc client side,&lt;br /&gt;just determine the resource and call specific function i.e. POSIX read()  in our case&lt;br /&gt;will call read_file() or read_device() functions depends on the opened  resource.&lt;br /&gt;I think - the last idea is very very ugly, I don't think that it's a  good idea to change libc&lt;br /&gt;every time when you adding something new to the system, also, we should  be modular,&lt;br /&gt;in some cases I can turn off support for pipes of sockets - and I don't  want to recompile&lt;br /&gt;libc, all the other system parts for it.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That's why IDL sucks, I spent many time to solve the problems with  nontrivial things like&lt;br /&gt;message advanced control and I don't see the sense. But, the old one -  uni_rpc_t is sucks too,&lt;br /&gt;on practice uni_rpc_t creates more problems that it's should solve.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And, I faced that pretty solution going from other way to solve this  problem.&lt;br /&gt;Each time while you design RPC/IDL/something_else_... you should think  more closely&lt;br /&gt;to the system and it's objects, my error was in the way to solve this  problem, I think&lt;br /&gt;about RPC/IDL/etc ... only, but you need to think about system also.&lt;br /&gt;What I mean: system might be presented like a set of objects hosted on  different servers and&lt;br /&gt;interacting each one with other, and in this case there are no  difference between&lt;br /&gt;file and task, i.e. file, task, device, ipc object - it's node, with  predefined set of functions.&lt;br /&gt;Well, yes, task and file has a different operations, but all possible  operation might&lt;br /&gt;be represented via one set.&lt;br /&gt;Anyway you will have a very similar operations, in example, changing  file owner uid and changing&lt;br /&gt;task effective uid is very similar, on RPC level there are no difference  between it.&lt;br /&gt;What I decide: I decide to represent all objects (or it's high-level  representation) as a node,&lt;br /&gt;each node has a 2 groups of operations, first one for control the node  and manage it attributes,&lt;br /&gt;second one for data i/o (yep, task will doesn't have data i/o interface,  but we can do it, if needed).&lt;br /&gt;In that case RPC is going to be simple, you have RPC signature in every  message,&lt;br /&gt;this signature points to the following things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;  Function group &lt;/li&gt;&lt;li&gt;  Function within group &lt;/li&gt;&lt;li&gt;  IDs to select right node for operation &lt;/li&gt;&lt;/ul&gt;Other, after RPC signature, is going to the implementation.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How are ipcbox and sbuf abstractions used ?&lt;br /&gt;It's a good question with a brief and simple answer, ipcbox is used by the&lt;br /&gt;rpc library routines to operate with IPC, sbuf is used for data, because  implementation&lt;br /&gt;gets the sbuf like a data, rpc code don't allocating anything for  implementation,&lt;br /&gt;just sbuf.&lt;br /&gt;Why is it pretty ?&lt;br /&gt;Because it's simple and this solution doesn't require to implement a  huge set of&lt;br /&gt;API for each task, i.e. good old getvfspid() getsomeothercrap() bla bla bla.&lt;br /&gt;Each task, has the special system reserved iolink, depends on task role  (file system,&lt;br /&gt;regular task, translator, resource carrier, etc ...) its node has a set  of operations.&lt;br /&gt;For example, to make a fork() you just need to make a control request  via system&lt;br /&gt;iolink to your node with fork() related data, to change your effective  uid you just&lt;br /&gt;send a stat request to your node representation, but if you are a  regular task (i.e. doesn't have a rights&lt;br /&gt;to link file system onto namespace tree) your node don't have the  operation of such kind,&lt;br /&gt;otherwise you will able to make a special call to your system iolink to  do it.&lt;br /&gt;Is it simple ? I guess it's very simple solution. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-491370430067274728?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/491370430067274728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=491370430067274728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/491370430067274728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/491370430067274728'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2011/10/something-more-about-general-system.html' title='Something more: about general system high-level design'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-5507768023846321895</id><published>2011-10-07T13:13:00.002+03:00</published><updated>2011-10-07T13:47:06.959+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rpcv7'/><category scheme='http://www.blogger.com/atom/ns#' term='RPC'/><category scheme='http://www.blogger.com/atom/ns#' term='vnode'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='ipc'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><title type='text'>Jari OS RPCv7 and Vnode</title><content type='html'>I wrote before why IDL failed. And I know that old uni_rpc_t RPC is failed too, it's not flexible, ugly and slow.&lt;div&gt;I'm working on this system about 5-6 years, well, and there are 6 attempts to create good IPC/RPC chain:&lt;/div&gt;&lt;div&gt; - v1 create a lot of structures and calls and implement it on the microkernel side&lt;/div&gt;&lt;div&gt; - v2 create one generic RPC in microkernel side&lt;/div&gt;&lt;div&gt; - v3 remove it from microkernel&lt;/div&gt;&lt;div&gt; - v4/v5 uni_rpc_t and related, try to assign all operation to the standard POSIX calls&lt;/div&gt;&lt;div&gt; - v6 IDL&lt;/div&gt;&lt;div&gt;None of this approaches are applicable.&lt;/div&gt;&lt;div&gt;I guess it's all about a way to resolve the problem. Each time I was try to solve one problem, not the set of those.&lt;/div&gt;&lt;div&gt;But, let's back to my favorite method of problem solving: divide and solve.&lt;/div&gt;&lt;div&gt;When you have a one big problem, it's better to divide it to many little ones, and solve it - one by one, and finally your big problem will be solved. Simple, isn't it ?&lt;/div&gt;&lt;div&gt;And now, we have a system, with many objects, with many problems, but ... make a guess, all of operations within this complex system is requests to the objects.&lt;/div&gt;&lt;div&gt;In that case, you just need to create the one generic object that may represent anything you want and provide generic interface to this object.&lt;/div&gt;&lt;div&gt;Well, you are welcome to the RPCv7.&lt;/div&gt;&lt;div&gt;Usually you can divide all your operations between several groups, to take a data, to control object and so on. Also, in Jari OS you need to have session with this object. That's all.&lt;/div&gt;&lt;div&gt;All your requests might be described with one generic header, not the data of the requests, not the some specific flags like it was done in v4/v5 versions, the header will describe request only.&lt;/div&gt;&lt;div&gt;Checkout this &lt;a href="http://jarios.org/gitweb/?p=jari_os.git;a=blob;f=libs/uclibc/libc/sysdeps/jarios/common/sys/rpcv7.h;h=578b978d69fd2d2b6d0f0b990b231114d1058dc2;hb=HEAD"&gt;http://jarios.org/gitweb/?p=jari_os.git;a=blob;f=libs/uclibc/libc/sysdeps/jarios/common/sys/rpcv7.h;h=578b978d69fd2d2b6d0f0b990b231114d1058dc2;hb=HEAD&lt;/a&gt; &lt;/div&gt;&lt;div&gt;struct rpc_signature.&lt;/div&gt;&lt;div&gt;Other stuff, are not RPCv7 stuff, it might be your data, headers and so on.&lt;/div&gt;&lt;div&gt;It was a first small problem solved. The second one is object representation.&lt;/div&gt;&lt;div&gt;And I got it, vnode, all things might be represented as vnode, it might have a memory mapping, set of many specific operations, many IDs, relations ... and RPC callbacks, the standard set &lt;/div&gt;&lt;div&gt;of it.&lt;/div&gt;&lt;div&gt;Here you can look at this ones: &lt;a href="http://jarios.org/gitweb/?p=jari_os.git;a=blob;f=libs/uclibc/libc/sysdeps/jarios/common/sys/vnode.h;h=f466d9b1e8542ab7e4e54dff8ada5a24890c0761;hb=HEAD"&gt;http://jarios.org/gitweb/?p=jari_os.git;a=blob;f=libs/uclibc/libc/sysdeps/jarios/common/sys/vnode.h;h=f466d9b1e8542ab7e4e54dff8ada5a24890c0761;hb=HEAD&lt;/a&gt;&lt;/div&gt;&lt;div&gt;All you need - just implement this functions and forget about IPC/RPC headache.&lt;/div&gt;&lt;div&gt;That's an example of the fork() - &lt;a href="http://jarios.org/gitweb/?p=jari_os.git;a=blob;f=libs/uclibc/libc/sysdeps/jarios/common/fork.c;h=b18fd40e95f8a1016736cf83aada8689e9432375;hb=HEAD"&gt;http://jarios.org/gitweb/?p=jari_os.git;a=blob;f=libs/uclibc/libc/sysdeps/jarios/common/fork.c;h=b18fd40e95f8a1016736cf83aada8689e9432375;hb=HEAD&lt;/a&gt;&lt;/div&gt;&lt;div&gt;And carrier function:&lt;/div&gt;&lt;div&gt;&lt;a href="http://jarios.org/gitweb/?p=jari_os.git;a=blob;f=services/nscarrier/vnode_task.c;h=006d0f7573b7771b7c140e1262c2f39d16c5a671;hb=HEAD"&gt;http://jarios.org/gitweb/?p=jari_os.git;a=blob;f=services/nscarrier/vnode_task.c;h=006d0f7573b7771b7c140e1262c2f39d16c5a671;hb=HEAD&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All data going via sbuf, just forget about IPC/RPC chain.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Well, I will write later about this implementation more, but you can always checkout the fresh sources.&lt;/div&gt;&lt;meta equiv="content-type" content="text/html; charset=utf-8"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-5507768023846321895?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/5507768023846321895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=5507768023846321895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5507768023846321895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5507768023846321895'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2011/10/jari-os-rpcv7-and-vnode.html' title='Jari OS RPCv7 and Vnode'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-732479000672908129</id><published>2011-10-07T12:16:00.003+03:00</published><updated>2011-10-07T12:44:43.927+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IDL'/><category scheme='http://www.blogger.com/atom/ns#' term='RPC'/><category scheme='http://www.blogger.com/atom/ns#' term='software architecture design'/><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><title type='text'>Why IDL fail, or, sometimes you need to fail first, to rise next</title><content type='html'>IDL for microkernel multiservice system is fail. No, not just because it wasn't implemented, going deeper - it's implemented.&lt;div&gt;Okay , let's try to understand why, but first - I spent a very lot of time to design and implement IDL for this purposes without any applicable results - that's my fail first, and that's an idea fail second.&lt;/div&gt;&lt;div&gt;Usually you have a simple IDL case: take the message, parse it, call the server function, serialize it and reply. It's common for client-server architecture widely used, and yes, there are many already implemented IDLs for this simple case. Most of IDLs covers this needs.&lt;/div&gt;&lt;div&gt;You can told me about L4 IDL - you are welcome, I didn't see any serios developed with L4 IDL, and I can told you - it will suck.&lt;/div&gt;&lt;div&gt;My approach was more complex.&lt;/div&gt;&lt;div&gt;In case of Jari OS services you need more than receive - call - reply cycle. Request might be postponed, or changed and forwarded.&lt;/div&gt;&lt;div&gt;In real system (not like L4 ping-pong demos), to resolve resource by the name (symlinks and files) you always need to forward it, because symlink and file might be located on different servers. Also, on real system, blocking of server threads is a quite poor idea.&lt;/div&gt;&lt;div&gt;IDL concept was very simple before I've added postponed and forwarded messages, but it wan't so fatally, to get away with this idea.&lt;/div&gt;&lt;div&gt;The next problem was faced later, like time-bomb, it was message modification.&lt;/div&gt;&lt;div&gt;Finally I've got something huge, and not flexible and scalable.&lt;/div&gt;&lt;div&gt;IDL implementation with support of this features are not simply than some RPC interface.&lt;/div&gt;&lt;div&gt;Well, at this point I decide to stop it. I spent something about 1 year to design, research, test and try it - and got the ugly solution. &lt;/div&gt;&lt;div&gt;However, in Jari OS you will be able to use IDL with this features, but it will not used in the base system.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;IDL research implementation here - &lt;a href="http://jarios.org/gitweb/?p=jari_os.git;a=summary"&gt;http://jarios.org/gitweb/?p=jari_os.git;a=summary&lt;/a&gt; , checkout idlc branch.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-732479000672908129?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/732479000672908129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=732479000672908129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/732479000672908129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/732479000672908129'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2011/10/why-idl-fail-or-sometimes-you-need-to.html' title='Why IDL fail, or, sometimes you need to fail first, to rise next'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-7396942184624893052</id><published>2010-05-12T19:59:00.002+03:00</published><updated>2010-05-12T20:11:05.086+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='filesystems'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>Approach to the file system design</title><content type='html'>Within microkernel operating system you may do different kind of interesting things.&lt;div&gt;Today is a day of file systems, I'm currently working on the file layer general design and there are some feature to implement, well, I can told that it's a several features implemented may.&lt;/div&gt;&lt;div&gt;The first is a copy-on-write feature, well it might be implemented over the file system implementation.&lt;/div&gt;&lt;div&gt;while you have an vnode on top of the implementation you may create a virtual remote link to other file system vnode, and it will goes transparently for implementation. When you will got a miss on the block device of the current filesystem you may take this data from another one, remotely.&lt;/div&gt;&lt;div&gt;Another case of this feature is a creating a new function that will clone files in the fast way, just creating a shadow vnode on the destination file system.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I will research this cases later and write it here, it's not so good to write it in bus.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-7396942184624893052?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/7396942184624893052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=7396942184624893052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7396942184624893052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7396942184624893052'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2010/05/approach-to-file-system-design.html' title='Approach to the file system design'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-2881702301976976031</id><published>2010-04-14T09:26:00.003+03:00</published><updated>2010-04-14T09:52:11.891+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IDL'/><category scheme='http://www.blogger.com/atom/ns#' term='CORBA'/><category scheme='http://www.blogger.com/atom/ns#' term='distributed systems'/><category scheme='http://www.blogger.com/atom/ns#' term='message passing'/><title type='text'>Protocol points: is IDL a mixture for headache?</title><content type='html'>There are a problem with a distributed message passing based system - it's a protocol.&lt;div&gt;It's a very bad to implement all protocol stuff manually, you will spent a many time on the &lt;/div&gt;&lt;div&gt;very simple, but annoying job, and you will create s new bugs, a lot of ugly code and so on ... &lt;/div&gt;&lt;div&gt;In the real distributed systems is many kind of intercommunication exist, I mean that you need some protocol for system-wide bus, some other protocol for services of the group A and some other for the other groups. Usually you will has a tons of different protocols and it will be a problem to create new one or update/modify existing.&lt;/div&gt;&lt;div&gt;I found two ways to fix this headache and one of this way is widely used in the systems of such kind, it's IDL. It may be ORB/CORBA like interface description language and usually is it.&lt;/div&gt;&lt;div&gt;Mainly, you need to pass some typed message and get some typed response to this message, and this problem is finely solved in CORBA-like IDLs, in contrast if you are working in the complex distributed system you need to have many indirect message passing system that will impact to your protocol.&lt;/div&gt;&lt;div&gt;In the system of such kind you also need to determine the message sender, his priority, and his level of the access or, more widely, what the access rights has this message. While you are going deeper you will understand that for some complex systems (like distributed system for transport queue management) that should works with determined time range you will need something like QoS (yep, I mean here quality of service). There impacts are going to your protocol.&lt;/div&gt;&lt;div&gt;Now, imagine that you have a CORBA-like IDL and you need extended option described above ...&lt;/div&gt;&lt;div&gt;You will describe some proto on IDL, and you will implement QoS, protocol for access inheritance manually ... In this case it's a good point to think where is headache located ?&lt;/div&gt;&lt;div&gt;The other way - it's a runtime solution for passing arguments via messages it will has the same disadvantages, but will be simply in implementation.&lt;/div&gt;&lt;div&gt;Well, the question is open - where is a mixture for headache with distributed message passing ?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-2881702301976976031?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/2881702301976976031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=2881702301976976031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2881702301976976031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2881702301976976031'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2010/04/protocol-points-is-idl-mixture-for.html' title='Protocol points: is IDL a mixture for headache?'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-4516888253837847853</id><published>2009-12-08T21:14:00.003+02:00</published><updated>2009-12-08T21:37:31.727+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='obvious'/><category scheme='http://www.blogger.com/atom/ns#' term='plans'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><category scheme='http://www.blogger.com/atom/ns#' term='bullshit'/><title type='text'>The venture should always have a logical end.</title><content type='html'>Recent months have become a complete disappointment in my life, but my life is not so interesting, by the way my life has a feedback to my projects.&lt;br /&gt;I'm a little upset, to be honest, I'm defeated with project development, and mostly with it goals.&lt;br /&gt;I'm afraid that it will be not so possible to complete the Jari OS as a platform, but the hope remains.&lt;br /&gt;I have a look at the project from the other side, from the side of engineer need to choose a base platform for the final solution. Jari OS isn't ready, and will not ready for several years (I don't think that good news happens) and it's very sad. Anyway, I'm learn again and I have a couple of real problems in the design architecture, management and so on, I know - there are many stuff written and works now. I cannot told that the project failed in case of it's basics concepts or other more deeper reasons, and I cannot told that project is succeful - this venture project hasn't a logical end, but it should has.&lt;br /&gt;Well, I decide reorganize my works on the project and try to give a new life to Jari OS as soon as it possible.&lt;br /&gt;First, I will write a documentation about platform, fix a design and so on.&lt;br /&gt;Second, I will try to have a wide view of the future requirements.&lt;br /&gt;&lt;br /&gt;When Jari OS will finished (it might be fail, might be not) - this will be the logic end of the venture, if it will has a continue - it will became a serious project.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-4516888253837847853?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/4516888253837847853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=4516888253837847853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/4516888253837847853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/4516888253837847853'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/12/venture-should-always-have-logical-end.html' title='The venture should always have a logical end.'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-783418033426036089</id><published>2009-11-06T01:37:00.002+02:00</published><updated>2009-11-06T02:05:10.053+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operating systems'/><category scheme='http://www.blogger.com/atom/ns#' term='os choice'/><title type='text'>OS choice</title><content type='html'>I have a direct bearing on the development of operating systems, so I can do some analysis of existing solutions on the market. The market of operating systems is full, it is filled to the brim. What? There are many solutions for different domains. Now, I'm faced with a choice of OS for the next project and I can't say that among the existing (Jari OS is a good platform, but aren't ready, and as a woman requires a lot of time) I can find a suitable, I considered the decision on free software, or are not expensive ones - I don't found suitable one. I will not describe my criteria, and I don't want to dilute the flame of useless discussions on an eternal themes.&lt;br /&gt;My experience in the architecture design and development allows me to say - the development of OS is interesting at the beginning and in the middle is a boring job, it's one of the causes of OS market saturation product is covered only part of the requirements and products that are not so flexible.&lt;br /&gt;I came to the conclusion that I can easily take the pieces of the finished OS components and quickly make a monolith in which the applications operate in the kernel mode - for the first time to write applications I need is a situable solution, and then choose right solution(if Jari OS is ready, I will take it).&lt;br /&gt;I'm talking about the fact that I can't understand the meaning of many projects. These are two extremes as ever. The first - the development of general purpose operating systems, I believe that it is a useless idea. Second - the development of narrow-purpose operating system, the appointment is so narrow that except of the author of the project, no one can use it. I don't understand why nobody wants to create a platform for the OSes, flexible so that the possession of the editor (emacs for example), knowledge of the OS design and implementation you can get what you want.&lt;br /&gt;The development of such platform, will not take a lot of time, if we have the necessary number of developers (1-3 years for production use).&lt;br /&gt;I started to do this (since I've understood that multi-purpose OS isn't required now), and continues as the forces I have, but I do not have so much time and resources (just a few people).&lt;br /&gt;I'm disappointed completely and forever, no - not in my projects and local fails, but in humans and OS market.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-783418033426036089?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/783418033426036089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=783418033426036089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/783418033426036089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/783418033426036089'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/11/os-choice.html' title='OS choice'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-531451357952970415</id><published>2009-11-03T11:16:00.004+02:00</published><updated>2009-11-03T12:43:26.510+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='project management'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><title type='text'>Interest and finance always diverge.</title><content type='html'>I always tried to combine the work on interesting (and even better on my own) project, and to capitalize on this.&lt;br /&gt;I was never interested in large amounts of money.&lt;br /&gt;I can say that it turned out, several times and with varying degrees of success. And I can do what the findings of these cases, which may be useful in the future.&lt;br /&gt;First, if you managed to establish your own small company for money sponsoring organization, then you should not relax. Financing institution may devour you with your project. In such cases it makes sense to have several organizations concerned with various equity participation.&lt;br /&gt;In general, your own company is a separate conversation.You will not be able to form a small company and develop further in most cases. I'm not a businessman, and therefore can't discuss other ways of creating a company. From the viewpoint of an engineer is better to go a different way. For example, you already have a project that is developed. It's not a secret that the development of the project rather resource-intensive exercise, and intensive development without funding is unlikely. In this case it's necessary to find company, which is interested in such kind of a project. If such company was found, then you hire to work and will assemble a team of specialists. But you shouldn't think then that life was a success, you will have a short time and insatiable wishes of management, and these suggestions will tend to rise.&lt;br /&gt;The deal with the closed project makes no sense in this case - your exciting project will turn into another ugly products, and work on it will be the usual routine. Make your project licensed under free software license (GNU GPL/GNU LGPL), companies offer a product, not a software in most cases. Also, take an existing open and free source code to your project - no one is interested with development all things from scratch.&lt;br /&gt;But don't forget - this symbiosis is not eternal. Ultimately, when your design will come from the door of the research department, the company will not expand the work on your project, instead, your work will be directed to the specific requirements of company management. At this stage it is necessary to separate the project from the company and develop it in an open community of developers. It follows from this - to work on the project is open, and in the broader framework than require your employers.&lt;br /&gt;Well, Jari OS is on this stage now, and I hope that all works on this project will be helpful for community of free software. Also, I will continue works on project with smaller team.&lt;br /&gt;In case of Jari OS, I had a several mistakes: a small open community, not documented internals.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-531451357952970415?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/531451357952970415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=531451357952970415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/531451357952970415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/531451357952970415'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/11/interest-and-finance-always-diverge.html' title='Interest and finance always diverge.'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-2698725986904928677</id><published>2009-09-16T01:29:00.002+03:00</published><updated>2009-09-16T01:32:46.581+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bullshit'/><title type='text'>Life?! Humppa!</title><content type='html'>Life can be difficult, bad, but it is life and it is a beautiful thing.&lt;br /&gt;I've designed a new io layer for file system layer, also I've made refactoring in this layer - and ... all is going on !&lt;br /&gt;&lt;br /&gt;Hi all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-2698725986904928677?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/2698725986904928677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=2698725986904928677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2698725986904928677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2698725986904928677'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/09/life-humppa.html' title='Life?! Humppa!'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-5590849902170227471</id><published>2009-09-02T01:12:00.003+03:00</published><updated>2009-09-02T01:57:14.172+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thoughts'/><category scheme='http://www.blogger.com/atom/ns#' term='kayak'/><category scheme='http://www.blogger.com/atom/ns#' term='adventure'/><category scheme='http://www.blogger.com/atom/ns#' term='kayaking'/><title type='text'>My adventures.</title><content type='html'>Have you ever been in the adventure?&lt;br /&gt;No, not in what is funny and stupid, simple and easy, but exciting, interesting and complex,which you would like to repeat, remember the adrenaline rush and the battle with elements.&lt;br /&gt;I have a one type of this adventures: is a kayak travels, not on wild water, not for one day.&lt;br /&gt;Imagine, close your eyes and imagine. &lt;br /&gt;Wind is a storm wind and rain goes to your face, waves is a large long and high waves,  noise of the breaking waves on the rocks is loud, splashes is around you.&lt;br /&gt;You sit in a 5-meters narrow vessel  less than one meter at its widest point, you have a paddle in your hands. Wave when turning ridge lean on you, it doused your kayak, it broken and you apply bank, sometimes when you pass to proceed from the ridge. Waves put you and  fell on the stones.&lt;br /&gt;Rudder pedal is turned completely to the end is the only way  get to keep the right direction, paddle and your hands are ready for very quick movements.&lt;br /&gt;Periodically nose kayak sinks  a wave, you enter between the waves from times to times and you watch as you moves two meters of water column. Adrenaline are released in the blood, and you don't feel a cold around the cold water and wind, you amused  danger. You can suddenly capsized and drowned in the waves, if  you not alienate from the crest of a wave when time is not consistent, or if you do not stand up  under the right degree of wave.&lt;br /&gt;There is a chance that you will inflict on the rocks and broken on them, if you lost control and come close to a coast. Yes, this is an adventure, and it amused you. There is a situation and there is a possibility.&lt;br /&gt;After the storm you will come out of the kayak and drink some alcohol with your friends, who also received a storm with you. And ... you will laugh, and you will have the desire to once again pass a storm.&lt;br /&gt;These impressions for a long time will stay in your memory, you will remember your  struggle with the waves and wind.&lt;br /&gt;When you will sit in a warm house, thinking about  current problems, you will want to come back again, to drop everything and go back to  adventure again.&lt;br /&gt;Fighting in the bustle of the city should not stay in the brain, it kills creativity,  it don't makes a sense.&lt;br /&gt;However, you choose between the warm beaches with sun loungers and cocktails, and  real adventure.&lt;br /&gt;I sometimes think that is more important, the first or second hobby, and always understand that my hobbies is all that I have, and theirs all important.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-5590849902170227471?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/5590849902170227471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=5590849902170227471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5590849902170227471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5590849902170227471'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/09/my-adventures.html' title='My adventures.'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-3093837431015782052</id><published>2009-09-01T22:29:00.001+03:00</published><updated>2009-09-01T22:32:55.953+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><title type='text'>Second stage of Jari OS development is one year old!</title><content type='html'>Hi readers, I cannot keep silent about it. Here the full story - &lt;a href="http://jarios.org/node/35"&gt;http://jarios.org/node/35&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-3093837431015782052?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/3093837431015782052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=3093837431015782052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3093837431015782052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3093837431015782052'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/09/second-stage-of-jari-os-development-is.html' title='Second stage of Jari OS development is one year old!'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-8136552573166510183</id><published>2009-08-26T01:34:00.002+03:00</published><updated>2009-08-26T01:41:40.850+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operating systems'/><category scheme='http://www.blogger.com/atom/ns#' term='filesystems'/><category scheme='http://www.blogger.com/atom/ns#' term='memory management'/><title type='text'>Flat in memory file systems</title><content type='html'>Few days ago I've implemented vnode cache - it works and file system works faster. But now I'm working on file mappings.&lt;br /&gt;I found an interesting subject due to mappings design: if you have a page aligned in memory file system - you can directly maps it's storage to address space of a process.&lt;br /&gt;This will avoid extra memory loss - you don't need to copy/paste data from file system storage to memory.&lt;br /&gt;For example, init.fs is a flat (but not page aligned) file system - and if we will provide a page aligned file system we can avoid memory loss.&lt;br /&gt;This feature already implemented in some monolithic kernels, but I don't seen that in microkernel multiservice-based OSes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-8136552573166510183?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/8136552573166510183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=8136552573166510183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/8136552573166510183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/8136552573166510183'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/08/flat-in-memory-file-systems.html' title='Flat in memory file systems'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-4399435032720769009</id><published>2009-08-19T23:39:00.003+03:00</published><updated>2009-08-20T00:17:56.752+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='filesystems'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><title type='text'>Vnode cache design</title><content type='html'>I found a development quest in Jari OS: all begins from device drivers services design, some drivers are actually is a library that linking to service that support some hardware part, in this case driver developer folks need to have a &lt;span style="font-style: italic;"&gt;dlopen()&lt;/span&gt;-family functions to link this libraries at runtime, for example if block service find a specific host it should be linked runtime, not statically. Well, OS hasn't dlopen-family support functions, saying more - dynamically linked ELF support are very early (it works, but it works slowly and takes many service time slice) - the reason is a poor file mapping support, you can map file, but when you will close file descriptor you will got a segfault on page fault in this mapped area. This is a complex problem, to support &lt;span style="font-style: italic;"&gt;dlopen()&lt;/span&gt; , ELF support should be improved i.e. work with libraries and binaries should be going outside of process manager service and, not be done via read/write calls - one of the benefits will be a &lt;span style="font-style: italic;"&gt;dlopen()&lt;/span&gt; support.&lt;br /&gt;I know, that one of the weak place of the file subsystem layer is a &lt;span style="font-weight: bold;"&gt;libv2&lt;/span&gt;(it's a VFS-like layer, but implemented as a library that linked to each file system(don't confuse - VFS service is a filesystem manager, resource storage, redirection mechanism and so on)). Libv2 supports many POSIX features already, and operates via abstract &lt;span style="font-weight: bold; font-style: italic;"&gt;vnode_t&lt;/span&gt; (in linux it's inode called) and there are too poor vnode cache, so every mapping is connected to vnode and if cache decide to destroy it - mapping can be lost. Like a solution is a map count handling, but it's a very simple - more complex solution is a creating more sophiscated cache.&lt;br /&gt;Assume a file system with a high load, you are always performs lookups, maps, read, write operations - there are possible situation when vnode might not have positive map and open counters for a short amount of time, and there are possible rarely used vnode i.e. some vnode may be mapped sometime, but not accessible for a day - and it will waste you data structure and memory - and you cannot delete it at all. On other side - you cannot use vnode metadata that connected to real file system node, because lookup calls don't modify accessed time of this. Well, what the solution could be - first I determined several vnode stages with it's own features, second - I designed a table for vnodes that mapped, but doesn't accessed - it will not take resources as much as regular vnode takes, but virtually will present.&lt;br /&gt;The next vnode stages might be:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;strong vnode:&lt;/span&gt; &lt;span style="font-style: italic;"&gt;not a candidate to move to the virtual vnode list, has a positive open and mapped count, and was recently used&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;potential oldies vnodes:&lt;/span&gt; &lt;span style="font-style: italic;"&gt;has only mapped count or opened count positive and wasn't recently used&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;oldies vnode:&lt;/span&gt; &lt;span style="font-style: italic;"&gt;vnodes in the virtual vnodes list&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;died vnodes:&lt;/span&gt; &lt;span style="font-style: italic;"&gt;vnodes that was removed via unlink call&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;At defined period some thread will lookup the cache and decide what to do with vnode, this rate will be calculated by the file system activity (calls per last period). But what about died vnodes? Assume that you mapped file, somebody remove it, vnode id was taken by root only file ... well, died vnodes list as a low cost list that storage vnode of this types and when you will try to read or write to it, or you will unmap it, or got a page fault - information will be updated - you will got an error (or seg fault), file system will decrement the counters, and when this counters will zeroed - died vnode will go to heaven, and free it's id ;)&lt;br /&gt;I'm not sure that I will implement all features at near time, but anyway this functionality will be added to &lt;span style="font-weight: bold;"&gt;libv2&lt;/span&gt; - and I will continue my quest - I will improve page cache, improve memory events protocol, design and implement linker with dlopen ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-4399435032720769009?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/4399435032720769009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=4399435032720769009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/4399435032720769009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/4399435032720769009'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/08/vnode-cache-design.html' title='Vnode cache design'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-7032320848364227103</id><published>2009-07-07T23:15:00.006+03:00</published><updated>2009-07-08T00:03:38.568+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='seayak'/><category scheme='http://www.blogger.com/atom/ns#' term='kayak'/><category scheme='http://www.blogger.com/atom/ns#' term='kayaking'/><title type='text'>My new kayak - seayak</title><content type='html'>On june I've bought a new kayak, manufacturer wrote in his list of products that this is a seayak type.&lt;br /&gt;Well, like my double seat kayak it's a folding boat. I like folding kayaks in case of their mobility and storing place.&lt;br /&gt;At current moment I've already made a two tests - is a two cycles of build, and yes - it's a on-water test.&lt;br /&gt;Firstly I will give a more information about seayak:&lt;br /&gt;Length: 4.9 meters&lt;br /&gt;Weight: 22 kg&lt;br /&gt;Frames: 4&lt;br /&gt;Shipped with steering.&lt;br /&gt;First built was taken up to 3 hours! And it's typically for new folding kayaks from triton ltd.&lt;br /&gt;On first contruction I've broken one of the details and I was need to make an ugly hack that I've showed on image below:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_IoVmxPCd5fk/SlOzvPuMwyI/AAAAAAAAA9k/umEDCW6HgWY/s1600-h/p1010003.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_IoVmxPCd5fk/SlOzvPuMwyI/AAAAAAAAA9k/umEDCW6HgWY/s320/p1010003.jpg" alt="" id="BLOGGER_PHOTO_ID_5355822006129181474" border="0" /&gt;&lt;/a&gt;Manufacturer has changed this detail for free via guarantee.&lt;br /&gt;All construction set are typically , excluding head profile - it looks like on seayaks.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_IoVmxPCd5fk/SlO1CXp3kJI/AAAAAAAAA-E/FY6CPiOG5cY/s1600-h/p1010001.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://2.bp.blogspot.com/_IoVmxPCd5fk/SlO1CXp3kJI/AAAAAAAAA-E/FY6CPiOG5cY/s320/p1010001.jpg" alt="" id="BLOGGER_PHOTO_ID_5355823434187640978" border="0" /&gt;&lt;/a&gt;Second construction goes well and takes up to 1 hour and 10 minutes (via kayak manual it should take 62 minutes).&lt;br /&gt;Letters with name of kayak model was removed and I think about new, original name for this boat.&lt;br /&gt;Like a good design it has on-top stuff for small things, gps and other useful things on water (pack for cigarets or tobacco pipe ;) )&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_IoVmxPCd5fk/SlO2BNgm8AI/AAAAAAAAA-M/j5hQWMdHYJo/s1600-h/p1010035.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 240px; height: 320px;" src="http://4.bp.blogspot.com/_IoVmxPCd5fk/SlO2BNgm8AI/AAAAAAAAA-M/j5hQWMdHYJo/s320/p1010035.jpg" alt="" id="BLOGGER_PHOTO_ID_5355824513796206594" border="0" /&gt;&lt;/a&gt;Generally it's a good model - it has a good on water performance, not so hard to build (not on first construction process;) ), good profile (I've tested it on big open water with big waves).&lt;br /&gt;Now I'm thinking about new name ... and some modification - I want to add new on top fixtures for other things.&lt;br /&gt;Other photos you can look &lt;a href="http://picasaweb.google.com/akaanoken/LazyTravel"&gt;here&lt;/a&gt; and &lt;a href="http://picasaweb.google.com/akaanoken/PriozerksLadoga200935July"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-7032320848364227103?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/7032320848364227103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=7032320848364227103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7032320848364227103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7032320848364227103'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/07/my-new-kayak-seayak.html' title='My new kayak - seayak'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_IoVmxPCd5fk/SlOzvPuMwyI/AAAAAAAAA9k/umEDCW6HgWY/s72-c/p1010003.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-5552571576065447584</id><published>2009-05-09T19:31:00.003+03:00</published><updated>2009-05-09T20:22:15.014+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operating systems'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><category scheme='http://www.blogger.com/atom/ns#' term='SDK'/><title type='text'>SDK tools for OS development</title><content type='html'>New ideas came to my head, all about operating system features and development.&lt;br /&gt;&lt;br /&gt;On last friday I decide to make some modifications on autotools stuff in GNU sed and try to compile it with &lt;a href="http://jarios.org"&gt;Jari OS&lt;/a&gt; libc headers and functions. Yep - it's works! This means that our libc is ready for most of cases, many of them working now. This event gave me some new ideas about development tools for Jari OS: firstly I will port &lt;a href="http://gcc.gnu.org/"&gt;GNU gcc&lt;/a&gt; to Jari OS (I mean, that gcc will handle our ld scripts and libraries right, without many keys and other things), secondly I will construct SDK template (already done, but not publicied yet).&lt;br /&gt;Also, to have a better support and big community additional feature needed - IDL integrated to SDK. Well, it's mean - that you have set of the templates for each type of service i.e. block device driver library, char device driver, file system and so on ...&lt;br /&gt;In most cases you shouldn't known about specific internal things of system libraries, also you shouldn't care about interface changes (headers renaming, new functions, new order of calls and so on). This feature will generate libraries specific code in compile time and link your specific implementation. I.e. what will be written one time - will live all time ;)&lt;br /&gt;For this feature it's better to use scheme (for templates, configs and other stuff) and some core of this will be written traditionally on C.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-5552571576065447584?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/5552571576065447584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=5552571576065447584' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5552571576065447584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5552571576065447584'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/05/sdk-tools-for-os-development.html' title='SDK tools for OS development'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-4047545179899183890</id><published>2009-04-22T14:02:00.002+03:00</published><updated>2009-04-22T14:22:09.134+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><title type='text'>Jari OS going to be a completely OS</title><content type='html'>My last task in Jari OS project was symlinks supports, now I'm working on postponed logic in libv2 (general library for file system services).&lt;br /&gt;I cannot be on track in changes ;) Now project has a POSIX, fork(), execve(), file systems, initial networking support.&lt;br /&gt;On background I'm porting GNU coreutils to Jari OS, progress going fast, I think that alpha release will has many interesting stuff.&lt;br /&gt;To be a fully featured OS not so many features need, our ext2fs support and IDE drivers are 80% completed.&lt;br /&gt;I think that year of active development that will finished on 1-sep-2009 will made a first beta version with few drivers and networking support.&lt;br /&gt;Now prject has one network device support (e1000) and Jari OS host (network service) replies on ICMP requests.&lt;br /&gt;What about ELF support, now we're working on dynamic libraries support - it coming soon, currently only static ones supported.&lt;br /&gt;Files i/o is ready, but maybe some functions (not often used ones) doesn't works properly. To make a fully featured shell pipes requered, and I'm working on it now.&lt;br /&gt;I'm planning to implement shared memory fs and POSIX functions for it, in addition I will add Jari OS specific API for this,  - for some internal purposes, for GIX(GUI service of Jari) like example.&lt;br /&gt;After alpha release (1-jun-2009) I will take time for GIX implementation. Also - there are many porting tasks.&lt;br /&gt;I hope community of open-source developers will be interested in new microkernel OS - it's a good field for research, development and it's good to take skills up-to-date.&lt;br /&gt;So,&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-4047545179899183890?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/4047545179899183890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=4047545179899183890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/4047545179899183890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/4047545179899183890'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/04/jari-os-going-to-be-completely-os.html' title='Jari OS going to be a completely OS'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-1520834980707061765</id><published>2009-03-12T00:54:00.003+02:00</published><updated>2009-03-12T01:38:54.224+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='microkernel'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><category scheme='http://www.blogger.com/atom/ns#' term='fork'/><title type='text'>Jari OS: fork() in microkernel based OS</title><content type='html'>Well, this day makes huge parts of my brains works.&lt;br /&gt;Designing microkernel systems you have a good skills base, designing microkernel and multiservice system you have an excellent skills base.&lt;br /&gt;Today was a day of fork() call - it has many things to discuss, think, imaginate and so on.&lt;br /&gt;At the end of a day, after all problems was detected - I found a solution to solve fork() call.&lt;br /&gt;Let's begin and I will explain fork() nature as is...&lt;br /&gt;Fork is a POSIX call that creates a clone of a calling process - with one thread, but the clone should have the same resources - i.e. memory (not at all), opened file descriptors, IPC stuff.&lt;br /&gt;In Jari OS resources are isolated - VFS know about files, kernel knowns about IPC and so on - you will have a headache about syncronization, performance - always while architecture design - welcome to microkernel-based OS.&lt;br /&gt;In this case you need to develop non-trivial trick with things that monolithic kernels made easly, but ... microkernel-based OSes is clever and better at all.&lt;br /&gt;Well, you have a task, you have a resources and you need to fork() POSIX call - the first solution is simple - just delegate this job to process server and deal is made, within server timeslice - and this is bad (but QNX does it in this way). Other solution is more sophiscated - and you need to make a stages for fork():&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Request to delegate a fork() for myself&lt;/li&gt;&lt;li&gt;Make a fork() skel within my timeslice&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Send a request about fork() call made by me&lt;/li&gt;&lt;/ul&gt;In this big deal you will affect microkernel, process service, virtual file system service and your task.&lt;br /&gt;Going deeper I will explain each stage of fork() and after those I will explain how it works on different sides.&lt;br /&gt;Your first request is a request to the process service where you tell that you wants to make a fork(). Process service will create a mould on VFS of your resources, toggle bit in kernel that allow you to make a sys_fork() syscall, and if all is ok it will reply with ok message :)&lt;br /&gt;After this you are going to make a syscall to fork - be warn! kernel toggle off bit that allows you to make this call, and you cannot do it yourself - only trusted process service does.&lt;br /&gt;Call is done - you have a skel - you are making a second call to process service - i.e. - "fork is done - please make my child runnable" - process service tells VFS to make mould active and working - and changes status of the child - and replies you with "OK all is done".&lt;br /&gt;This scheme allows task to make a one fork() call at a time (i.e. you are able to make other child after old child is created) - I don't think that this is a bad, other architecture going to make other applications design.&lt;br /&gt;On this I want to explain some details.&lt;br /&gt;"Forkable bit" can be toggled on only by trusted process, and it's switched off while fork called.&lt;br /&gt;Task has a timestamp - and both kernel and process service known it at the start of all.&lt;br /&gt;VFS's mould has a parent and while parent is exist - mould will not be deleted, orphaned mould will be deleted with timeout.&lt;br /&gt;Checking for a valid child pid makes not only on parent pid - also on timestamp.&lt;br /&gt;&lt;br /&gt;Uff, I can explain other details in comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-1520834980707061765?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/1520834980707061765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=1520834980707061765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/1520834980707061765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/1520834980707061765'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/03/jari-os-fork-in-microkernel-based-os.html' title='Jari OS: fork() in microkernel based OS'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-7169176779963155956</id><published>2009-03-09T16:27:00.003+02:00</published><updated>2009-03-09T16:45:10.984+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='v2'/><category scheme='http://www.blogger.com/atom/ns#' term='filesystems'/><category scheme='http://www.blogger.com/atom/ns#' term='vfs'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='Jari OS'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><title type='text'>File systems on Jari OS</title><content type='html'>There was a great job on last two weeks. File subsystem are designed in &lt;span style="font-weight: bold;"&gt;Jari OS&lt;/span&gt; - since we have a system with separated services - libraries is a good approach to avoid a huge amount of code and errors with changes it.&lt;br /&gt;Actually file subsystem is divided by several general parts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;VFSv2&lt;/span&gt; service&lt;/li&gt;&lt;li&gt;set of libraries for each filesystem&lt;/li&gt;&lt;/ul&gt;I don't want to include all stuff for filesystem in one library, because it's a bad idea, for example tmpfs doesn't has backend to block device, pagecache, postponed calls and so on. But anyway this set of libraries can be completed by one, generic library that should be included to each file system - &lt;span style="font-weight: bold;"&gt;libv2&lt;/span&gt;.&lt;br /&gt;In this case we're have the following list:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;libv2&lt;/span&gt; (general library)&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;libv2backend&lt;/span&gt; (backend to the block device layer)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;libv2pgcache&lt;/span&gt; (page cache library)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;libv2ppcall&lt;/span&gt; (library serves postponed calls)&lt;/li&gt;&lt;/ul&gt;Each file system architecture should determine what will be used, generally , regular file system will always use all set of libraries - i.e. it works with block device and use page cache in this case, and it will not replies immediately on all cases - it will have postponed calls list to reply.&lt;br /&gt;For libv2 - there are nothing difference - it will always support everything on logic layer.&lt;br /&gt;I can't see other solutions - our VFS service should be overloaded - and many calls going directly to file system service.&lt;br /&gt;So, while implementation &lt;span style="font-style: italic;"&gt;tmpfs&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;initfs&lt;/span&gt; - implementation hasn't any complexities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-7169176779963155956?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/7169176779963155956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=7169176779963155956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7169176779963155956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7169176779963155956'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/03/file-systems-on-jari-os.html' title='File systems on Jari OS'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-5237353499518486193</id><published>2009-02-25T00:48:00.003+02:00</published><updated>2009-02-25T01:24:17.732+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operating systems'/><category scheme='http://www.blogger.com/atom/ns#' term='holywar'/><category scheme='http://www.blogger.com/atom/ns#' term='fanatics mode'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='microkernel'/><category scheme='http://www.blogger.com/atom/ns#' term='schemevm'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><title type='text'>Scheme VM like a microkernel service</title><content type='html'>Yes, it's an idea. I'm thinking about benefits in the microkernel and multiservice OS on desktop or some kind of development environment. Well, I know all the things that going in microkernel while you calling fork() after those exec() - it takes a lot of system time.&lt;br /&gt;Usually within shell you makes fork()/exec() every time when you starts anything - ls,cat ... or you can wrong with some arguments for utility and this will increase system job time. Also, it's a waste of a time to implement small utils on C, there are few &lt;span style="font-weight: bold;"&gt;POSIX&lt;/span&gt; things, few useful things, few OS specific things and so on. Better one - run login/shell environment within VM context - like a thread, all utils will runs like a thread (thread creation in &lt;span style="font-weight: bold;"&gt;Jari OS&lt;/span&gt; isn't so wasteful)  and writing simple things on scheme is a simple and fast process. It doesn't mean that Jari OS reject exec/fork and other POSIX calls, it's mean that we can take a benefits on desktop I think.&lt;br /&gt;Many people told me that microkernel is sucks and microkernel is bad for desktop - well, most of them doesn't know anything about OS design, but others are right in some case. But I want to make some note - there are no existing microkernel (and multiservice) OSes with a pure microkernel and multiservers design (I don't take early, prototype-like, featureless systems, like &lt;span style="font-weight: bold;"&gt;Jari OS&lt;/span&gt; and some line of other interest projects, &lt;span style="font-weight: bold;"&gt;HelenOS&lt;/span&gt; for example) - yes it's a first thing to think that microkernel sucks, second it's a performance - yes context switching, calls partially going outside of the caller time slice and so on, it's not the problem as well, for most I/O operations context switch and related thing is very little compare to disk I/O or other I/O (no, I don't mean highband special devices), also most of technical microkernel critics based on existing solution - that can has ugly design (I don't want to make a shit showing examples here).&lt;br /&gt;My thesis - &lt;span style="font-style: italic;"&gt;Well designed and implemented microkernel and multiservice OS can works at the same speed as monolithic OS works, but ugly designed monolithic OS will be ran slowly then microkernel based OS with good design.&lt;/span&gt; Also, you should remember that some abstractions in monolith made within user space - like example GUIs, and I don't think that some operations will be slowly on microkernel.&lt;br /&gt;And ... the main idea - for microkernel world you should keep in mind microkernel oriented solutions, instead of porting old and ugly tricks from monolithic - schemevm running as microkernel service is such solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-5237353499518486193?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/5237353499518486193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=5237353499518486193' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5237353499518486193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5237353499518486193'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2009/02/scheme-vm-like-microkernel-service.html' title='Scheme VM like a microkernel service'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-8838507448147706289</id><published>2008-11-21T17:20:00.004+02:00</published><updated>2008-11-21T17:42:27.329+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='drivers'/><title type='text'>Jari OS: device drivers development wellness</title><content type='html'>I have a lot of time spent with drivers development in different OSes/kernels. Generally it was microkernel or hybrid kernels and I cannot told that this process takes me into pleasure.&lt;br /&gt;Jari OS on other side is a new microkernel OS that can takes in advance all my skills with system design.&lt;br /&gt;Actually every Jari driver is a microkernel service working in userspace like a trusted task. All IO mechanics has a protocol and every time you need to support it with all changes. It's a bad, but for this case I've designed a generic device server layer that will hide all semantics within several library functions.&lt;br /&gt;All of this located in system libraries - in LibOS part.&lt;br /&gt;Include &lt;devio h=""&gt; and you will have server implemented. Really is a generic layer - on top of this I will design and implement other layers - for console drivers, input drivers, block drivers and so on.&lt;br /&gt;Like example of this I will show a code snippet of the generic VGA console driver uses this generic layer:&lt;br /&gt;&lt;br /&gt;&lt;pre width="80"&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;sys/types.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;sys/mman.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;stdlib.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;unistd.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;string.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;wchar.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;errno.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;time.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;datalib/usrtc.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;ns/ns.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;scheduler.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;proto/rpc.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;devio/devio.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;devio/server.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;termio/termio.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &amp;lt;termio/term.h&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &lt;/font&gt;&lt;font color="#666666"&gt;"vga.h"&lt;/font&gt;&lt;font color="#A020F0"&gt;&lt;/font&gt;&lt;br /&gt;&lt;font color="#A020F0"&gt;#include &lt;/font&gt;&lt;font color="#666666"&gt;"hwops.h"&lt;/font&gt;&lt;font color="#A020F0"&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#228B22"&gt;#define DRVNAME  &lt;/font&gt;&lt;font color="#666666"&gt;"vgacons.d"&lt;/font&gt;&lt;font color="#228B22"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#228B22"&gt;#define DEVNAME  &lt;/font&gt;&lt;font color="#666666"&gt;"/console"&lt;/font&gt;&lt;font color="#228B22"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;static size_t __vga_write(void *buf,uni_rpc_t rpc,size_t size,size_t offset)&lt;/font&gt;&lt;/strong&gt;;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;static size_t __vga_read(void *buf,uni_rpc_t rpc,size_t size,size_t offset)&lt;/font&gt;&lt;/strong&gt;;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;static int __vga_ioctl(void *buf,uni_rpc_t *rpc,size_t size)&lt;/font&gt;&lt;/strong&gt;;&lt;br /&gt;&lt;br /&gt;&lt;font color="#4169E1"&gt;&lt;a name="device_ops"&gt;&lt;/a&gt;struct device_ops &lt;/font&gt;dev_op = {&lt;br /&gt;  __vga_write,&lt;br /&gt;  __vga_read,&lt;br /&gt;  NULL,&lt;br /&gt;  __vga_ioctl,&lt;br /&gt;  __vga_write,&lt;br /&gt;  __vga_read,&lt;br /&gt;  NULL,&lt;br /&gt;  NULL,&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;&lt;a name="main"&gt;&lt;/a&gt;int main(int argc,char **argv)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;{&lt;br /&gt;  device_server_t *sys;&lt;br /&gt;  int r=0;&lt;br /&gt;  void *iobuf=mmap(NULL,4096,MMAP_RW|MMAP_PHYS,NOFD,(void*)VGA_TM_BASE);&lt;br /&gt;  char buff[256];&lt;br /&gt;&lt;br /&gt;  task_scheduler_control(getpid(),SYS_SCHED_CTL_SET_PRIORITY,30);&lt;br /&gt;&lt;br /&gt;  vga_init(iobuf);&lt;br /&gt;&lt;br /&gt;  vga_print(&lt;font color="#666666"&gt;"[vgacons] i've started\n"&lt;/font&gt;);&lt;br /&gt;&lt;br /&gt;  sys=malloc(&lt;font color="#4169E1"&gt;sizeof&lt;/font&gt;(*sys));&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(!sys)&lt;br /&gt;    abort();&lt;br /&gt;&lt;br /&gt;  r=init_device_server(sys,DIRECTIO_READ | DIRECTIO_WRITE | HW_READ | HW_WRITE,&lt;br /&gt;                       2048,4096,512,1,DRVNAME,DEVNAME,&amp;amp;dev_op,4);&lt;br /&gt;&lt;br /&gt;  sprintf(buff,&lt;font color="#666666"&gt;"sys-&amp;gt;allowed = %p\n"&lt;/font&gt;,sys-&amp;gt;allowed);&lt;br /&gt;  vga_print(buff);&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(r!=0) {&lt;br /&gt;    sprintf(buff,&lt;font color="#666666"&gt;"r=%d\n"&lt;/font&gt;,r);&lt;br /&gt;    vga_print(buff);&lt;br /&gt;    abort();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  vga_print(&lt;font color="#666666"&gt;"[vgacons] device server run\n"&lt;/font&gt;);&lt;br /&gt;&lt;br /&gt;  device_server_start(sys);&lt;br /&gt;&lt;br /&gt;  vga_print(&lt;font color="#666666"&gt;"[vgacons] :((\n"&lt;/font&gt;);&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;return&lt;/font&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;&lt;a name="__vga_write"&gt;&lt;/a&gt;static size_t __vga_write(void *buf,uni_rpc_t rpc,size_t size,size_t offset)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;{&lt;br /&gt;  char *msg=buf;&lt;br /&gt;  size_t rsize=size;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(size&amp;lt;=&lt;font color="#4169E1"&gt;sizeof&lt;/font&gt;(rpc)) {&lt;br /&gt;    &lt;font color="#4169E1"&gt;return&lt;/font&gt; -EINVAL;&lt;br /&gt;  }&lt;br /&gt;  msg+=&lt;font color="#4169E1"&gt;sizeof&lt;/font&gt;(rpc);&lt;br /&gt;  size-=&lt;font color="#4169E1"&gt;sizeof&lt;/font&gt;(rpc);&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;switch&lt;/font&gt;(rpc.arg3) {&lt;br /&gt;  &lt;font color="#4169E1"&gt;case&lt;/font&gt; PHYT_WRITE:&lt;br /&gt;    uni_print((cschar_t*)msg,size);&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;  &lt;font color="#4169E1"&gt;case&lt;/font&gt; PHYT_WRITEPOS:&lt;br /&gt;    uni_printxy((cschar_t*)msg,size,rpc.arg4,rpc.arg5);&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;  &lt;font color="#4169E1"&gt;case&lt;/font&gt; PHYT_SCROLL:&lt;br /&gt;    &lt;font color="#4169E1"&gt;if&lt;/font&gt;(rpc.arg4==SCROLL_UP) {&lt;br /&gt;      uni_scrollup(rpc.arg5);&lt;br /&gt;      uni_printxy((cschar_t*)msg,size,0,0);&lt;br /&gt;    } &lt;font color="#4169E1"&gt;else&lt;/font&gt; &lt;font color="#4169E1"&gt;if&lt;/font&gt;(rpc.arg3==SCROLL_DOWN) {&lt;br /&gt;      uni_scrolldown(rpc.arg5);&lt;br /&gt;      uni_printxy((cschar_t*)msg,size,0,uni_height()-rpc.arg5);&lt;br /&gt;    } &lt;font color="#4169E1"&gt;else&lt;/font&gt;&lt;br /&gt;      &lt;font color="#4169E1"&gt;return&lt;/font&gt; -EINVAL;&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;&lt;strong&gt;&lt;font color="#FF0000"&gt;  default:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;    &lt;font color="#4169E1"&gt;return&lt;/font&gt; -EINVAL;&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;return&lt;/font&gt; rsize;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;&lt;a name="ascii_puts"&gt;&lt;/a&gt;void ascii_puts(const char *msg)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;{&lt;br /&gt;  &lt;font color="#4169E1"&gt;return&lt;/font&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;&lt;a name="__vga_read"&gt;&lt;/a&gt;static size_t __vga_read(void *buf,uni_rpc_t rpc,size_t size,size_t offset)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;  vga_print(&lt;font color="#666666"&gt;"ridden\n"&lt;/font&gt;);&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;return&lt;/font&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;&lt;a name="__vga_ioctl"&gt;&lt;/a&gt;static int __vga_ioctl(void *buf,uni_rpc_t *rpc,size_t size)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;{&lt;br /&gt;  uni_rpc_t rrpc;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(size&amp;lt;&lt;font color="#4169E1"&gt;sizeof&lt;/font&gt;(rrpc))&lt;br /&gt;    &lt;font color="#4169E1"&gt;return&lt;/font&gt; EINVAL;&lt;br /&gt;&lt;br /&gt;  memcpy(&amp;amp;rrpc,buf,&lt;font color="#4169E1"&gt;sizeof&lt;/font&gt;(rrpc));&lt;br /&gt;  &lt;font color="#4169E1"&gt;switch&lt;/font&gt;(rrpc.arg3) {&lt;br /&gt;  &lt;font color="#4169E1"&gt;case&lt;/font&gt; PHYT_DISABLEAUTOSCROLL:&lt;br /&gt;    uni_scrolldisable();&lt;br /&gt;    rpc-&amp;gt;rpc_call=0;&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;  &lt;font color="#4169E1"&gt;case&lt;/font&gt; PHYT_ENABLESCROLL:&lt;br /&gt;    uni_scrollenable();&lt;br /&gt;    rpc-&amp;gt;rpc_call=0;&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;  &lt;font color="#4169E1"&gt;case&lt;/font&gt; PHYT_GETSIZE:&lt;br /&gt;    rpc-&amp;gt;rpc_call=0;&lt;br /&gt;    rpc-&amp;gt;arg0=uni_width();&lt;br /&gt;    rpc-&amp;gt;arg1=uni_height();&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;  &lt;font color="#4169E1"&gt;case&lt;/font&gt; PHYT_CLEAR:&lt;br /&gt;    uni_clear();&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;&lt;strong&gt;&lt;font color="#FF0000"&gt;  default:&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;    &lt;font color="#4169E1"&gt;return&lt;/font&gt; EINVAL;&lt;br /&gt;    &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;return&lt;/font&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-8838507448147706289?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/8838507448147706289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=8838507448147706289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/8838507448147706289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/8838507448147706289'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/11/jari-os-device-drivers-development.html' title='Jari OS: device drivers development wellness'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-1948266864539592887</id><published>2008-11-12T19:28:00.002+02:00</published><updated>2008-11-12T19:34:14.965+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory allocators'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='dlmalloc'/><category scheme='http://www.blogger.com/atom/ns#' term='porting software'/><title type='text'>Jari Operating System: LibAlloc updates</title><content type='html'>Some of today's deal within Jari OS project was dlmalloc (Douglas Lee memory allocator) porting.&lt;br /&gt;So, it's done and now I've rejected using of ugly smalloc (simple memory allocator).&lt;br /&gt;Dlmalloc is a great thing - it can be ported anywhere, for example - Jari OS doesn't have sbrk() function, and will not have this oldish shit, otherwise - all is done via mmap() and dlmalloc allow to use it without sbrk().&lt;br /&gt;Porting to the Jari OS mmap() semantics taken few minutes only.&lt;br /&gt;Like usually you can look out source code - git clone git://rep.jarios.org/syslibs.git - LibAlloc/lib/dlmalloc.c&lt;br /&gt;&lt;br /&gt;thanks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-1948266864539592887?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/1948266864539592887/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=1948266864539592887' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/1948266864539592887'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/1948266864539592887'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/11/jari-operating-system-liballoc-updates.html' title='Jari Operating System: LibAlloc updates'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-2973023930581575248</id><published>2008-10-28T12:59:00.003+02:00</published><updated>2008-10-28T13:32:41.053+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operating systems'/><category scheme='http://www.blogger.com/atom/ns#' term='MuiString'/><category scheme='http://www.blogger.com/atom/ns#' term='jarios'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><title type='text'>Jari Operating System: small steps</title><content type='html'>I want to make an announcement of development steps.&lt;br /&gt;First of all is a really progress on microkernel (http://mstring.jarios.org) - there are many features implemented:&lt;br /&gt; - memory management (O(1) allocator)&lt;br /&gt; - interrupts handling for uspace&lt;br /&gt; - memory i/o for uspace&lt;br /&gt; - ioports for uspace&lt;br /&gt; - realtime scheduler&lt;br /&gt; - running static ELF binaries that loaded from GNU grub&lt;br /&gt; - Fast IPC (sync ports)&lt;br /&gt;Actually muistring allow to write userspace drivers and subsystems now, but some things not done yet.&lt;br /&gt;Uspace (Jari) is developing now and some things works:&lt;br /&gt; - nameserver&lt;br /&gt; - terminals server&lt;br /&gt; - text VGA driver&lt;br /&gt; - keyboard driver&lt;br /&gt; - syslibs (libos, libc, liballoc)&lt;br /&gt;Some later I will post link to showcase.&lt;br /&gt;More information here - http://jarios.org&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-2973023930581575248?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/2973023930581575248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=2973023930581575248' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2973023930581575248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2973023930581575248'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/10/jari-operating-system-small-steps.html' title='Jari Operating System: small steps'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-4161304982878525635</id><published>2008-09-16T23:27:00.001+03:00</published><updated>2008-09-16T23:32:07.557+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='operating systems'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='MuiString'/><category scheme='http://www.blogger.com/atom/ns#' term='microkernel'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><title type='text'>Jari Operating System: reburned</title><content type='html'>I don't have a time to write more.&lt;br /&gt;This is just a copy-paste from news feed:&lt;br /&gt;After Jari was frozen for a many years, now Jari is wake up and preparing to work, for a hard work.&lt;br /&gt;Jari Operating System will be a not microkernel/hybrid based system, otherwise it will use an exokernel, that developing separately. It's mean that Jari Operating System is a set of user-space drivers, network libs, libOS, libc and so on. It's a top level of a exokernel.&lt;br /&gt;While exokernel under extreme development stage and not all syscalls are well defined, this project will wait for this and will temproary suspended (for several weeks or one month, it cannot be determined now). After those userspace wrappers will be implemented and user-space development begins.&lt;br /&gt;After core libs are well tested and exokernel will be done this all will be ported to it.&lt;br /&gt;In case of exokernel Jari changing default architecture to amd64 (not x86_64, just amd64 in case of its specific hardware features), but Jari portable, and all depends on exokernel ports.&lt;br /&gt;So, I will present an exokernel -&gt; &lt;a href="http://mstring.jarios.org"&gt;http://mstring.jarios.org&lt;/a&gt; , it's called MuiString (greek mui at the begging) that shows it's small size, and string just a mode for kernel flexibility and atomicity (you know about string theory).&lt;br /&gt;Generally it mean that Jari found a kernel to base on, ... it was a&lt;br /&gt;long search ... &lt;br /&gt;&lt;br /&gt;Also I want to introduce a new Jari OS homesite - &lt;a href="http://jarios.org"&gt;http://jarios.org&lt;/a&gt;, you can find a lot of&lt;br /&gt;information there.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-4161304982878525635?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/4161304982878525635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=4161304982878525635' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/4161304982878525635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/4161304982878525635'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/09/jari-operating-system-reburned.html' title='Jari Operating System: reburned'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-3088999076232072214</id><published>2008-09-16T23:23:00.001+03:00</published><updated>2008-09-16T23:27:26.524+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='readleaf'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='redleafd'/><category scheme='http://www.blogger.com/atom/ns#' term='httpd'/><title type='text'>ReadLeaf: updates</title><content type='html'>I want to make announcment.&lt;br /&gt;ReadLeaf 0.2alpha is out with many new features.&lt;br /&gt;You can look out for more info here - &lt;a href="http://www.readleaf.org"&gt;http://www.readleaf.org&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-3088999076232072214?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/3088999076232072214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=3088999076232072214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3088999076232072214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3088999076232072214'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/09/readleaf-updates.html' title='ReadLeaf: updates'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-298057583594686502</id><published>2008-08-05T11:29:00.002+03:00</published><updated>2008-08-05T12:03:59.308+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='configs'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='dzen2'/><category scheme='http://www.blogger.com/atom/ns#' term='tiling wm'/><category scheme='http://www.blogger.com/atom/ns#' term='dzen'/><category scheme='http://www.blogger.com/atom/ns#' term='xmonad'/><category scheme='http://www.blogger.com/atom/ns#' term='workspace'/><title type='text'>Xmonad: optimizing working space</title><content type='html'>Some later I wrote about Gnome and how to change default metacity wm (that very good and cannot be in use if you want to make your works faster) with windowmaker.&lt;br /&gt;I've decide reject Gnome and use pure wm without desktop environment, but also I've decided to try tiling wm written on Haskell - XMonad.&lt;br /&gt;It's really usable, for indication I'm using a dzen2 and some set of handmade icons.&lt;br /&gt;Here my ~/.xmonad/xmonad.hs&lt;br /&gt;&lt;pre&gt;&lt;br /&gt; import XMonad hiding ((|||))&lt;br /&gt; import XMonad.Operations&lt;br /&gt; import System.Exit&lt;br /&gt; import Graphics.X11&lt;br /&gt; import System.IO&lt;br /&gt;&lt;br /&gt; import qualified XMonad.StackSet as W&lt;br /&gt; import qualified Data.Map        as M&lt;br /&gt;&lt;br /&gt; import XMonad.Hooks.DynamicLog&lt;br /&gt; import XMonad.Hooks.UrgencyHook&lt;br /&gt; import XMonad.Layout.Tabbed&lt;br /&gt; import XMonad.Layout.NoBorders&lt;br /&gt; import XMonad.Hooks.ManageDocks&lt;br /&gt; import XMonad.Layout.Grid&lt;br /&gt; import XMonad.Layout.ToggleLayouts&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; import XMonad.Layout.LayoutCombinators ((|||))&lt;br /&gt; import XMonad.Util.Run (spawnPipe)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; ------------------------------------------------------------------------&lt;br /&gt; -- Common variables&lt;br /&gt; --&lt;br /&gt; myTerminal      = "urxvt"&lt;br /&gt; myBorderWidth   = 1&lt;br /&gt; myModMask       = mod4Mask&lt;br /&gt; myNumlockMask   = mod2Mask&lt;br /&gt; myWorkspaces    = ["Shells","Emacs","WWW","IM", "Docs", "Media" ] ++ map show [6..9]&lt;br /&gt; myNormalBorderColor  = "#3e7464"&lt;br /&gt; myFocusedBorderColor = "#0b610b"&lt;br /&gt; myNormalBg =  "#0b0b0b"&lt;br /&gt; myNormalFg =  "#385c64"&lt;br /&gt; myFocusedBg = "#598867"&lt;br /&gt; myFocusedFg = "#760202"&lt;br /&gt; myFont = "-misc-*-*-*-*-*-10-*-*-*-*-*-*-*"&lt;br /&gt; myBitmapsDir = "/home/tirra/Icons/"&lt;br /&gt;&lt;br /&gt; myDefaultGaps :: [(Int,Int,Int,Int)]&lt;br /&gt; myDefaultGaps = [(14,0,0,0)] -- 15 for default dzen&lt;br /&gt;&lt;br /&gt; menuCmd = "dmenu -fn '" ++ myFont ++ "' -nb '" ++ myNormalBg ++ "' -nf '" ++ myNormalFg ++ "' -sb '" ++ myFocusedBg ++ "' -sf '" ++ myFocusedFg ++ "'"&lt;br /&gt; dzen2 = "dzen2 -p -h 14 -ta l -bg '" ++ myNormalBg ++ "' -fg '" ++ myNormalFg ++ "' -w 600 -sa c -fn '" ++ myFont ++ "'"&lt;br /&gt;&lt;br /&gt; ------------------------------------------------------------------------&lt;br /&gt; -- Key bindings. Add, modify or remove key bindings here.&lt;br /&gt; --&lt;br /&gt; myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $&lt;br /&gt;     [ ((modMask,               xK_r     ), spawn ("exec `dmenu_path | " ++ menuCmd ++ "`"))&lt;br /&gt;     , ((modMask,               xK_q     ), kill)&lt;br /&gt;     , ((modMask .|. shiftMask, xK_a     ), spawn "urxvt")&lt;br /&gt;     , ((modMask .|. shiftMask, xK_e     ), spawn "emacs")&lt;br /&gt;     , ((modMask .|. shiftMask, xK_m     ), spawn "urxvt -e mutt")&lt;br /&gt;     , ((modMask,               xK_space ), sendMessage NextLayout)&lt;br /&gt;     , ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)&lt;br /&gt;     , ((modMask,               xK_n     ), refresh)&lt;br /&gt;     , ((modMask,               xK_Tab   ), windows W.focusDown)&lt;br /&gt;     , ((modMask,               xK_j     ), windows W.focusDown)&lt;br /&gt;     , ((modMask,               xK_k     ), windows W.focusUp  )&lt;br /&gt;     , ((modMask,               xK_m     ), windows W.focusMaster  )&lt;br /&gt;     , ((modMask,               xK_Return), windows W.swapMaster)&lt;br /&gt;     , ((modMask .|. shiftMask, xK_j     ), windows W.swapDown  )&lt;br /&gt;     , ((modMask .|. shiftMask, xK_k     ), windows W.swapUp    )&lt;br /&gt;     , ((modMask,               xK_h     ), sendMessage Shrink)&lt;br /&gt;     , ((modMask,               xK_l     ), sendMessage Expand)&lt;br /&gt;     , ((modMask,               xK_t     ), withFocused $ windows . W.sink)&lt;br /&gt;     , ((modMask              , xK_comma ), sendMessage (IncMasterN 1))&lt;br /&gt;     , ((modMask              , xK_period), sendMessage (IncMasterN (-1)))&lt;br /&gt;     , ((modMask .|. shiftMask, xK_q     ), io (exitWith ExitSuccess))&lt;br /&gt;     , ((modMask              , xK_f), (sendMessage (Toggle "Full")) &gt;&gt; sendMessage (Toggle "Grid"))&lt;br /&gt;     , ((modMask .|. shiftMask, xK_r     ),&lt;br /&gt;           broadcastMessage ReleaseResources &gt;&gt; restart "xmonad" True)&lt;br /&gt;     ]&lt;br /&gt;  &lt;br /&gt;     ++&lt;br /&gt;&lt;br /&gt;     --&lt;br /&gt;     -- mod-[1..9], Switch to workspace N&lt;br /&gt;     -- mod-shift-[1..9], Move client to workspace N&lt;br /&gt;     --&lt;br /&gt;     [((m .|. modMask, k), windows $ f i)&lt;br /&gt;         | (i, k) &lt;- zip (XMonad.workspaces conf) [xK_1 .. xK_9]&lt;br /&gt;         , (f, m) &lt;- [(W.greedyView, 0), (W.shift, shiftMask)]]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; ------------------------------------------------------------------------&lt;br /&gt; -- Mouse bindings: default actions bound to mouse events&lt;br /&gt; --&lt;br /&gt; myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $&lt;br /&gt;&lt;br /&gt;     -- mod-button1, Set the window to floating mode and move by dragging&lt;br /&gt;     [ ((modMask, button1), (\w -&gt; focus w &gt;&gt; mouseMoveWindow w))&lt;br /&gt;&lt;br /&gt;     -- mod-button2, Raise the window to the top of the stack&lt;br /&gt;     , ((modMask, button2), (\w -&gt; focus w &gt;&gt; windows W.swapMaster))&lt;br /&gt;&lt;br /&gt;     -- mod-button3, Set the window to floating mode and resize by dragging&lt;br /&gt;     , ((modMask, button3), (\w -&gt; focus w &gt;&gt; mouseResizeWindow w))&lt;br /&gt;&lt;br /&gt;     -- you may also bind events to the mouse scroll wheel (button4 and button5)&lt;br /&gt;     ]&lt;br /&gt;&lt;br /&gt; ------------------------------------------------------------------------&lt;br /&gt; -- Layouts:&lt;br /&gt;&lt;br /&gt; -- You can specify and transform your layouts by modifying these values.&lt;br /&gt; -- If you change layout bindings be sure to use 'mod-shift-space' after&lt;br /&gt; -- restarting (with 'mod-q') to reset your layout state to the new&lt;br /&gt; -- defaults, as xmonad preserves your old layout settings by default.&lt;br /&gt; --&lt;br /&gt; -- The available layouts.  Note that each layout is separated by |||,&lt;br /&gt; -- which denotes layout choice.&lt;br /&gt; --&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; myTabConfig = defaultTheme {&lt;br /&gt;   activeColor         = "#6666cc"&lt;br /&gt;  , activeBorderColor   = "#000000"&lt;br /&gt;  , inactiveColor       = "#666666"&lt;br /&gt;  , inactiveBorderColor = "#000000"&lt;br /&gt;  , decoHeight          = 10&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; ------------------------------------------------------------------------&lt;br /&gt; -- Window rules:&lt;br /&gt;&lt;br /&gt; myManageHook = composeAll [ className   =? "Firefox-bin"            --&gt; doF(W.shift "WWW")&lt;br /&gt;               , className   =? "Iceweasel"       --&gt; doF(W.shift "WWW")&lt;br /&gt;               , className   =? "Gajim.py"         --&gt; doF(W.shift "IM")&lt;br /&gt;               , className   =? "Evince"           --&gt; doF(W.shift "Docs")&lt;br /&gt;               , className   =? "Emacs"            --&gt; doF(W.shift "Emacs")&lt;br /&gt;               , title       =? "mutt"             --&gt; doF(W.shift "WWW")&lt;br /&gt;               , className   =? "URxvt"            --&gt; doF(W.shift "Shell")&lt;br /&gt;               , className   =? "Stardict"         --&gt; doF(W.shift "Docs")&lt;br /&gt;               ]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; ------------------------------------------------------------------------&lt;br /&gt; -- dzen2 configuration&lt;br /&gt; --&lt;br /&gt;&lt;br /&gt; myPP h = defaultPP {&lt;br /&gt;                     ppOutput = hPutStrLn h&lt;br /&gt;                   , ppCurrent = dzenColor myFocusedFg  myFocusedBg . pad&lt;br /&gt;                   , ppVisible = dzenColor myNormalFg myNormalBg . pad&lt;br /&gt;                   , ppTitle = dzenColor "#117418" "" . wrap "{ "  " }"&lt;br /&gt;                   , ppHiddenNoWindows = const ""&lt;br /&gt;                   , ppWsSep =  " ^fg(#113d41)^r(1x12)^fg() "&lt;br /&gt;                   , ppSep      =  " ^fg(#113d41)^r(2x2)^fg() " -- "|"&lt;br /&gt;                  -- , ppLayout  = dzenColor "#946144" "" .&lt;br /&gt;                  --    (\x -&gt; case x of&lt;br /&gt;                  --       "Tall" -&gt; "^i(/home/dk/.icons/dzen2/tall.xbm)"&lt;br /&gt;                  --        "Mirror Tall" -&gt; "^i(/home/dk/.icons/dzen2/mtall.xbm)"&lt;br /&gt;                  --        "Full" -&gt; "^i(/home/dk/.icons/dzen2/full.xbm)"&lt;br /&gt;                  --    )&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; myUrgencyHook = withUrgencyHook dzenUrgencyHook&lt;br /&gt;   { args = ["-bg", myNormalBg, "-fg", "#117418"] }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; ------------------------------------------------------------------------&lt;br /&gt; -- Run xmonad with the settings you specify. No need to modify this.&lt;br /&gt; --&lt;br /&gt; main = do din &lt;- spawnPipe dzen2&lt;br /&gt;           xmonad $ myUrgencyHook $&lt;br /&gt;            defaultConfig {&lt;br /&gt;       -- simple stuff&lt;br /&gt;         terminal           = myTerminal,&lt;br /&gt;       --  focusFollowsMouse  = myFocusFollowsMouse,&lt;br /&gt;         borderWidth        = myBorderWidth,&lt;br /&gt;         modMask            = myModMask,&lt;br /&gt;         numlockMask        = myNumlockMask,&lt;br /&gt;         workspaces         = myWorkspaces,&lt;br /&gt;         normalBorderColor  = myNormalBorderColor,&lt;br /&gt;         focusedBorderColor = myFocusedBorderColor,&lt;br /&gt;         defaultGaps        = myDefaultGaps,&lt;br /&gt;&lt;br /&gt;       -- key bindings&lt;br /&gt;         keys               = myKeys,&lt;br /&gt;         mouseBindings      = myMouseBindings,&lt;br /&gt;&lt;br /&gt;       -- hooks, layouts&lt;br /&gt;         layoutHook         = toggleLayouts (noBorders Full) $&lt;br /&gt;                              smartBorders $ tiled ||| Mirror tiled ||| Full ||| Grid ||| tabbed shrinkText myTabConfig,&lt;br /&gt;         manageHook         = (manageHook defaultConfig &lt;+&gt; myManageHook) &lt;+&gt; manageDocks,&lt;br /&gt;         logHook            = dynamicLogWithPP $ myPP din&lt;br /&gt;     }&lt;br /&gt;    where&lt;br /&gt;            tiled = Tall 1 0.03 0.68&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There are many tuning for yourself can be made. For dzen2 I wrote two files - one of this just runs it, other is a daemon that takes information and provide it to dzen2 panel.&lt;br /&gt;Main file - ~/.xmonad/panel.sh&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;export LANG=en_US.UTF-8&lt;br /&gt;FONT='-misc-*-*-*-*-*-10-*-*-*-*-*-*-*'&lt;br /&gt;DZEN="dzen2 -p -h 14 -fn $FONT"&lt;br /&gt;BG="#0b0b0b"&lt;br /&gt;FG="#385c64"&lt;br /&gt;MONITOR=/home/tirra/.xmonad/monitor.pl&lt;br /&gt;&lt;br /&gt;SW=1280&lt;br /&gt;Y=0&lt;br /&gt;X=600&lt;br /&gt;$MONITOR | $DZEN -e '' -x $X -y $Y  -ta r -bg $BG -w $(($SW-$X)) -fg $FG -sa c&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And ~/.xmonad/monitor.pl where you need to  made some modifications:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#!/usr/bin/perl&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;&lt;br /&gt;###&lt;br /&gt;# Configurable constants&lt;br /&gt;#&lt;br /&gt;## Xbm icons directory&lt;br /&gt;use constant XBM_IDIR =&gt; '/home/tirra/Icons';&lt;br /&gt;## Colors, separators and other stuff of this kind&lt;br /&gt;use constant FG_COLOR    =&gt; '#385c64';&lt;br /&gt;use constant BG_COLOR    =&gt; '#010101';&lt;br /&gt;use constant TITLE_COLOR =&gt; '#946144';&lt;br /&gt;use constant ELEM_COLOR  =&gt; '#5c0000';&lt;br /&gt;use constant ICON_COLOR  =&gt; '#00baff';&lt;br /&gt;use constant VSEP        =&gt; '^fg(#113d41)^r(1x12)^fg()';&lt;br /&gt;use constant ISEP        =&gt; '^p(6)^fg(#113d41)^r(2x2)^fg()^p(6)';&lt;br /&gt;## IDLE time&lt;br /&gt;use constant IDLE  =&gt; 1;&lt;br /&gt;## Constants for CPU load measurment&lt;br /&gt;use constant FSTAT    =&gt; '/proc/stat';&lt;br /&gt;use constant NCPUS    =&gt; 2; # number of CPUs in system&lt;br /&gt;## Battery constants&lt;br /&gt;use constant BAT_STATUS      =&gt; '/sys/class/power_supply/BAT1/status';&lt;br /&gt;use constant BAT_CHARGE_NOW     =&gt; '/sys/class/power_supply/BAT1/charge_now';&lt;br /&gt;use constant BAT_CHARGE_FULL =&gt; '/sys/class/power_supply/BAT1/charge_full';&lt;br /&gt;use constant BAT_FULL_ICON  =&gt; XBM_IDIR . '/b_full.xbm';&lt;br /&gt;use constant BAT_CRITICAL_ICON   =&gt; XBM_IDIR . '/b_critical.xbm';&lt;br /&gt;use constant BAT_EMPTY_ICON  =&gt; XBM_IDIR . '/b_empty.xbm';&lt;br /&gt;use constant BAT_25_ICON  =&gt; XBM_IDIR . '/b_25.xbm';&lt;br /&gt;use constant BAT_50_ICON  =&gt; XBM_IDIR . '/b_50.xbm';&lt;br /&gt;use constant BAT_75_ICON  =&gt; XBM_IDIR . '/b_75.xbm';&lt;br /&gt;use constant BAT_CHRG_ICON  =&gt; XBM_IDIR . '/ac_01.xbm';&lt;br /&gt;## Constants for memory monitoring&lt;br /&gt;use constant MEMINFO =&gt; '/proc/meminfo';&lt;br /&gt;## Net interface constants&lt;br /&gt;use constant ROUTE         =&gt; '/sbin/route';&lt;br /&gt;use constant NETPATH       =&gt; '/sys/class/net/';&lt;br /&gt;use constant NET_UP_ICON   =&gt; XBM_IDIR . '/arr_up.xbm';&lt;br /&gt;use constant NET_DOWN_ICON =&gt; XBM_IDIR . '/arr_down.xbm';&lt;br /&gt;use constant NET_PPPDOWN_ICON =&gt; XBM_IDIR . '/ppp_down.xbm';&lt;br /&gt;use constant NET_PPPUP_ICON =&gt; XBM_IDIR . '/ppp_up.xbm';&lt;br /&gt;use constant NET_ETHDOWN_ICON =&gt; XBM_IDIR . '/eth_down.xbm';&lt;br /&gt;use constant NET_ETHUP_ICON =&gt; XBM_IDIR . '/eth_up.xbm';&lt;br /&gt;use constant NET_WLANDOWN_ICON =&gt; XBM_IDIR . '/wlan_down.xbm';&lt;br /&gt;use constant NET_WLANUP_ICON =&gt; XBM_IDIR . '/wlan_up.xbm';&lt;br /&gt;## Jabber constatns&lt;br /&gt;use constant JNAME         =&gt; 'IM';&lt;br /&gt;use constant ACOLOR        =&gt; '#117418';&lt;br /&gt;## Weather constants&lt;br /&gt;use constant WTITLE        =&gt; 'Out';&lt;br /&gt;use constant WID           =&gt; 'yourweatheridhere';&lt;br /&gt;use constant WUPD_INT       =&gt; 30 * 60;&lt;br /&gt;&lt;br /&gt;######&lt;br /&gt;# Cpu load measurment in percents.&lt;br /&gt;#&lt;br /&gt;my @cpus = undef;&lt;br /&gt;my $stat_fh = undef;&lt;br /&gt;&lt;br /&gt;sub init_cpus()&lt;br /&gt;{&lt;br /&gt;    for (my $i = 0; $i &lt; NCPUS; $i++) {&lt;br /&gt;        $cpus[$i] = { 'old_idle' =&gt; 1, 'old_load' =&gt; 1 };&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    open($stat_fh, '&lt;', FSTAT) or die "Can't open file " . FSTAT . " for reading $!";   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub get_cpus_load_perc()&lt;br /&gt;{&lt;br /&gt;    my @cpus_load = undef;&lt;br /&gt;&lt;br /&gt;    for (my $i = 0; $i &lt; NCPUS; $i++) {&lt;br /&gt;        while (&lt;$stat_fh&gt;) {&lt;br /&gt;            next if (!/^cpu$i.+/);&lt;br /&gt;            # /proc/stat should contain all data about CPU in the following&lt;br /&gt;            # format(all data about particular CPU is written in one line):&lt;br /&gt;            # cpu&lt;n&gt;: &lt;user-mode-time&gt; &lt;nice-time&gt; &lt;system-mode-time&gt; &lt;idle-time&gt; &lt;iowait&gt; &lt;irq-time&gt;&lt;br /&gt;            # &lt;softirq-time&gt;&lt;br /&gt;            my @load = split /\s/;&lt;br /&gt;            my $idle_time = $load[4];&lt;br /&gt;            my $load_time = $load[1] + $load[2] + $load[3] + $load[5] + $load[6] + $load[7];&lt;br /&gt;            $cpus_load[$i] = int(($load_time - $cpus[$i]-&gt;{'old_load'}) /&lt;br /&gt;                                 ($idle_time + $load_time - $cpus[$i]-&gt;{'old_idle'} -&lt;br /&gt;                                  $cpus[$i]-&gt;{'old_load'}) * 100);&lt;br /&gt;            $cpus[$i]-&gt;{'old_idle'} = $idle_time;&lt;br /&gt;            $cpus[$i]-&gt;{'old_load'} = $load_time;&lt;br /&gt;            last if ($i++ == NCPUS);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    die "Can't make seek on " . FSTAT . "$!" if (seek($stat_fh, 0, 0) &lt; 0);&lt;br /&gt;    return @cpus_load;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub show_cpu_info()&lt;br /&gt;{&lt;br /&gt;    my @cpu_info = get_cpus_load_perc();&lt;br /&gt;    my $tmp = "";&lt;br /&gt;&lt;br /&gt;    print "^fg(" . TITLE_COLOR . ")CPU:^fg()^p(6)";   &lt;br /&gt;    for (my $i = 0; $i &lt; NCPUS; $i++) {&lt;br /&gt;        $tmp .= "$cpu_info[$i]%";&lt;br /&gt;        $tmp .= " " . VSEP . " " if ($i + 1 != NCPUS);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    print $tmp;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;######&lt;br /&gt;# Laptop's battery state&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;# returns an array of two elements&lt;br /&gt;# where first element is a current power of battery in percens&lt;br /&gt;# and the second one is a boolean value showing if the battry is&lt;br /&gt;# charged or not.&lt;br /&gt;sub get_battery_state()&lt;br /&gt;{&lt;br /&gt;    my @bat_state = undef;&lt;br /&gt;    my $bat_max = 0;&lt;br /&gt;    my $bat_cur = 0;&lt;br /&gt;&lt;br /&gt;    open(BFC, '&lt;', BAT_CHARGE_FULL) or die "Can't open file " . BAT_CHARGE_FULL . "for reading $!";&lt;br /&gt;    while (&lt;bfc&gt;) {&lt;br /&gt;        $bat_max = $_;&lt;br /&gt;        last;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    close(BFC);&lt;br /&gt;&lt;br /&gt;    open(BFC, '&lt;', BAT_CHARGE_NOW) or die "Can't open file " . BAT_CHARGE_NOW . "for reading $!";&lt;br /&gt;    while (&lt;bfc&gt;) {&lt;br /&gt;        $bat_cur = $_;&lt;br /&gt;        last;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    close(BFC);&lt;br /&gt;    $bat_state[0] = int($bat_cur / $bat_max * 100);&lt;br /&gt;&lt;br /&gt;    open(BFC, '&lt;', BAT_STATUS) or die "Can't open file " . BAT_STATUS . "for reading $!";&lt;br /&gt;    while (&lt;bfc&gt;) {&lt;br /&gt;        $bat_state[1] = $_;&lt;br /&gt;        last;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    close(BFC);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    return @bat_state;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub show_battery_info()&lt;br /&gt;{&lt;br /&gt;    my @binfo = get_battery_state();&lt;br /&gt;    my $icon = BAT_EMPTY_ICON;&lt;br /&gt;   &lt;br /&gt;    if($binfo[0] &lt;= 1) {&lt;br /&gt;    $icon = BAT_EMPTY_ICON;&lt;br /&gt;    }&lt;br /&gt;    elsif($binfo[0] &lt;= 10) {&lt;br /&gt;    $icon = BAT_CRITICAL_ICON;&lt;br /&gt;    }&lt;br /&gt;    elsif($binfo[0] &lt;= 25) {&lt;br /&gt;    $icon = BAT_25_ICON;&lt;br /&gt;    }&lt;br /&gt;    elsif($binfo[0] &lt;=50) {&lt;br /&gt;    $icon = BAT_50_ICON;&lt;br /&gt;    }&lt;br /&gt;    elsif($binfo[0] &lt; 99) {&lt;br /&gt;    $icon = BAT_75_ICON;&lt;br /&gt;    }&lt;br /&gt;    elsif($binfo[0] &gt;= 99) {&lt;br /&gt;    $icon = BAT_FULL_ICON;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    print "^fg(" . ICON_COLOR . ")^i($icon)^fg()";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;######&lt;br /&gt;# Memory usage monitor.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;sub get_meminfo()&lt;br /&gt;{&lt;br /&gt;    my ($mtotal, $mactive, $stotal, $sfree, $cached) = (0, 0, 0, 0, 0);&lt;br /&gt;    my %minfo = undef;&lt;br /&gt;&lt;br /&gt;    open(MIF, '&lt;', MEMINFO) or die "Can't open file " . MEMINFO . " for reading $!";&lt;br /&gt;    while (&lt;mif&gt;) {&lt;br /&gt;        if (/^MemTotal:\s+(\d+).*$/) {&lt;br /&gt;            $mtotal = $1;&lt;br /&gt;        }&lt;br /&gt;        elsif (/^Active:\s+(\d+).*$/) {&lt;br /&gt;            $mactive = $1;&lt;br /&gt;        }&lt;br /&gt;        elsif (/^SwapTotal:\s+(\d+).*$/) {&lt;br /&gt;            $stotal = $1;&lt;br /&gt;        }&lt;br /&gt;        elsif (/^SwapFree:\s+(\d+).*$/) {&lt;br /&gt;            $sfree = $1;&lt;br /&gt;        }&lt;br /&gt;        elsif (/^Buffers:\s+(\d+).*$/) {&lt;br /&gt;            $cached = $1;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;    close(MIF);&lt;br /&gt;    $minfo{'in_use'} = int($mactive / $mtotal * 100);&lt;br /&gt;    $minfo{'cached'} = int($cached / $mtotal * 100);&lt;br /&gt;    $minfo{'swap'} = int(($stotal - $sfree) / $stotal * 100);&lt;br /&gt;   &lt;br /&gt;    return %minfo;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub show_mem_info()&lt;br /&gt;{&lt;br /&gt;    my %minfo = get_meminfo();&lt;br /&gt;&lt;br /&gt;    print "^fg(" . ICON_COLOR . ")MEM:^fg() ";&lt;br /&gt;    print $minfo{'in_use'} . "% ";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;######&lt;br /&gt;# Network monitor.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;my @old_netstat = (0, 0);&lt;br /&gt;my $network_avail = 0;&lt;br /&gt;&lt;br /&gt;# Get current speed of the interface and&lt;br /&gt;# quantoty of received and transmitted trough it bytes&lt;br /&gt;sub get_net_info(@_)&lt;br /&gt;{&lt;br /&gt;    my $ifname = shift;&lt;br /&gt;    my $file = NETPATH . "/$ifname/statistics/rx_bytes";&lt;br /&gt;    my @stat = undef;&lt;br /&gt;&lt;br /&gt;    open(RXF, '&lt;', $file) or die "Can't open file $file for reading $!";&lt;br /&gt;    my $rx_bytes = &lt;rxf&gt;;&lt;br /&gt;    close(RXF);&lt;br /&gt;&lt;br /&gt;    $file = NETPATH . "/$ifname/statistics/tx_bytes";       &lt;br /&gt;    open(TXF, '&lt;', $file) or die "Can't open file $file for reading $!";&lt;br /&gt;    my $tx_bytes = &lt;txf&gt;;&lt;br /&gt;    close(TXF);&lt;br /&gt;&lt;br /&gt;    $stat[0] = int(($rx_bytes - $old_netstat[0]) / 1024);&lt;br /&gt;    $stat[1] = int(($tx_bytes - $old_netstat[1]) / 1024);&lt;br /&gt;    $old_netstat[0] = $rx_bytes;&lt;br /&gt;    $old_netstat[1] = $tx_bytes;&lt;br /&gt;   &lt;br /&gt;    return @stat;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub show_net_info()&lt;br /&gt;{&lt;br /&gt;    my $cmd = ROUTE . " -n | grep -e '^0.0.0.0' | awk '{print \$8}'";&lt;br /&gt;    my $iface = `$cmd`;&lt;br /&gt;    my $iconppp = NET_PPPDOWN_ICON;&lt;br /&gt;    my $iconwlan = NET_WLANDOWN_ICON;&lt;br /&gt;    my $iconeth = NET_ETHDOWN_ICON;&lt;br /&gt;&lt;br /&gt;    chomp($iface);&lt;br /&gt;&lt;br /&gt;    if ($iface eq 'ppp0') {&lt;br /&gt;    $iconppp = NET_PPPUP_ICON;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if ($iface eq 'wlan00') {&lt;br /&gt;    $iconwlan = NET_WLANUP_ICON;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if ($iface eq 'eth0') {&lt;br /&gt;    $iconeth = NET_ETHUP_ICON;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    if ($iface eq '') {&lt;br /&gt;        $network_avail = 0;&lt;br /&gt;        @old_netstat = (0, 0);&lt;br /&gt;        print " ^fg(" . ICON_COLOR . ")^i($iconeth)^fg()";&lt;br /&gt;        print " ^fg(" . ICON_COLOR . ")^i($iconwlan)^fg()";&lt;br /&gt;        print " ^fg(" . ICON_COLOR . ")^i($iconppp)^fg()";&lt;br /&gt;        return;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    my @stat = get_net_info($iface);&lt;br /&gt;   &lt;br /&gt;    $network_avail = 1;&lt;br /&gt;        print " ^fg(" . ICON_COLOR . ")^i($iconeth)^fg()";&lt;br /&gt;        print " ^fg(" . ICON_COLOR . ")^i($iconwlan)^fg()";&lt;br /&gt;        print " ^fg(" . ICON_COLOR . ")^i($iconppp)^fg()";&lt;br /&gt;&lt;br /&gt;#    print "^fg(" . TITLE_COLOR . ")$iface:^fg()^p(6)$stat[0]";&lt;br /&gt;#    print "^fg(" . ELEM_COLOR . ")^i(" . NET_DOWN_ICON . ")^fg() ";&lt;br /&gt;#    print VSEP . " $stat[1]^fg(" . ELEM_COLOR . ")^i(" . NET_UP_ICON . ")^fg()";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;####&lt;br /&gt;# Jabber monitor.&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;sub get_nmessages()&lt;br /&gt;{&lt;br /&gt;    my @procs = split('\n', `ps aux | grep gajim`);&lt;br /&gt;    my $found = 0;&lt;br /&gt;&lt;br /&gt;    foreach (@procs) {&lt;br /&gt;        next if (/.*?\s+e?grep.*$/);&lt;br /&gt;        $found = 1;&lt;br /&gt;        last;&lt;br /&gt;    }&lt;br /&gt;    if ($found) {&lt;br /&gt;        my $num = `gajim-remote get_unread_msgs_number`;&lt;br /&gt;        chomp($num);&lt;br /&gt;        return $num;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return '-';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub show_jabberinfo()&lt;br /&gt;{&lt;br /&gt;    my $nmsg = get_nmessages();&lt;br /&gt;    print "^fg(" . ICON_COLOR . ")" . JNAME . ":^fg()^p(6)";&lt;br /&gt;    if (($nmsg ne '-') &amp;amp;&amp;amp; ($nmsg &gt; 0)) {&lt;br /&gt;        print "^fg(" . ACOLOR . ")$nmsg^fg()";&lt;br /&gt;    }&lt;br /&gt;    else {&lt;br /&gt;        print "$nmsg";&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;###&lt;br /&gt;# Weather monitor&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;my $last_wupd_time = 0;&lt;br /&gt;my $last_temp = undef;&lt;br /&gt;&lt;br /&gt;sub get_temperature()&lt;br /&gt;{&lt;br /&gt;    my $cmd = 'weather -i ' . WID;&lt;br /&gt;    my @data = split(/\n/, `$cmd`);&lt;br /&gt;    my $temp = undef;&lt;br /&gt;&lt;br /&gt;    foreach (@data) {&lt;br /&gt;        next until(/\s+Temperature:.+?\((-?\d+)\s+C\).*$/);&lt;br /&gt;        $temp = "$1";&lt;br /&gt;        $temp = "+$temp" if ($1 &gt; 0);&lt;br /&gt;        $temp .= "C";&lt;br /&gt;        last;&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;    return $temp;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;sub show_temperature()&lt;br /&gt;{&lt;br /&gt;    my $time = time();&lt;br /&gt;    my $temp = undef;&lt;br /&gt;&lt;br /&gt;    if (!$network_avail) {&lt;br /&gt;        $temp = '-';&lt;br /&gt;    }&lt;br /&gt;    elsif (($time - $last_wupd_time) &gt;= WUPD_INT) {&lt;br /&gt;        $temp = get_temperature();&lt;br /&gt;        $last_temp = $temp;&lt;br /&gt;        $last_wupd_time = $time;&lt;br /&gt;    }&lt;br /&gt;    else {&lt;br /&gt;        $temp = $last_temp;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    print "^fg(" . ICON_COLOR . ")" . WTITLE . ":^fg()^p(6)$temp";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;####&lt;br /&gt;# Time&lt;br /&gt;#&lt;br /&gt;&lt;br /&gt;sub show_time()&lt;br /&gt;{&lt;br /&gt;    my $time = `date +'%H:%M'`;&lt;br /&gt;   &lt;br /&gt;    chomp($time);&lt;br /&gt;    print $time;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;my $old_fh = select(STDOUT);&lt;br /&gt;$| = 1;&lt;br /&gt;select($old_fh);&lt;br /&gt;init_cpus();&lt;br /&gt;for (;;) {&lt;br /&gt;    print ISEP;&lt;br /&gt;    show_time();&lt;br /&gt;    print ISEP;&lt;br /&gt;    show_jabberinfo();&lt;br /&gt;    print ISEP;&lt;br /&gt;    show_temperature();&lt;br /&gt;    print ISEP;&lt;br /&gt;    show_mem_info();&lt;br /&gt;    print ISEP;&lt;br /&gt;    show_battery_info();&lt;br /&gt;    show_net_info();&lt;br /&gt;    print "\n";&lt;br /&gt;    sleep(IDLE);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There are my Icons : &lt;a href="http://www.filefactory.com/file/7fe370/n/Icons_tar_gz"&gt;Icons.tar.gz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And this is a snap of my workspace:&lt;br /&gt;&lt;a href="http://img201.imageshack.us/my.php?image=aug52008ww3.png" target="_blank"&gt;&lt;img src="http://img201.imageshack.us/img201/8454/aug52008ww3.th.png" border="0" alt="Free Image Hosting at www.ImageShack.us" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://img604.imageshack.us/content.php?page=blogpost&amp;amp;files=img201/8454/aug52008ww3.png" title="QuickPost"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-298057583594686502?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/298057583594686502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=298057583594686502' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/298057583594686502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/298057583594686502'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/08/xmonad-optimizing-working-space.html' title='Xmonad: optimizing working space'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-5042409319835878261</id><published>2008-07-31T13:52:00.002+03:00</published><updated>2008-07-31T14:03:18.092+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='readleaf'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='redleafd'/><title type='text'>ReadLeaf: research pane</title><content type='html'>Today, how I've wrote later, readleaf 0.1 was released and finished lazy stage - now it's a platform for research and implementation.&lt;br /&gt;Both, MuiString and ReadLeaf has a one general idea, but MuiString is more deeper in implementation and some decisions need to be tested on other layer - quick and fast before this innovation will be implemented within MuiString and Jari overally.&lt;br /&gt;ReadLeaf is a good start point for this type of research, I will use new way in development primary here - in area of the project.&lt;br /&gt;I'm too lazy for repeations - you can see the general overview here  - &lt;a href="http://readleaf.berlios.de/concept.html"&gt;http://readleaf.berlios.de/concept.html&lt;/a&gt;&lt;br /&gt;Currently already implemented:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;redleafd&lt;/li&gt;&lt;li&gt;internal mm&lt;/li&gt;&lt;li&gt;basic research&lt;/li&gt;&lt;/ul&gt;Version 0.2 will be already with new features, now it's on the testing and development stage, but not so long from finish.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-5042409319835878261?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/5042409319835878261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=5042409319835878261' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5042409319835878261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/5042409319835878261'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/07/readleaf-research-pane.html' title='ReadLeaf: research pane'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-3247550937857554101</id><published>2008-07-21T00:21:00.007+03:00</published><updated>2008-07-21T00:48:41.625+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='MuiString'/><category scheme='http://www.blogger.com/atom/ns#' term='microkernel'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme on practice'/><category scheme='http://www.blogger.com/atom/ns#' term='FPL on system development'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>MuiString: Introduction to the architecture #1</title><content type='html'>Today we're have a many implementations of the &lt;span style="font-style: italic;"&gt;microkernel&lt;/span&gt; architectures, but there are too similar and have many problems.&lt;br /&gt;The first problem is a speed, the second one is a security.&lt;br /&gt;Generally &lt;span style="font-style: italic;"&gt;microkernel&lt;/span&gt; more secure than monolithic-based operating system, but with some restrictions, if you grow up speed, you are loosing in security.&lt;br /&gt;But it's a general problems - more complicated thing - we're using &lt;span style="font-weight: bold;"&gt;C/C++/ObjC&lt;/span&gt; to implement architecture, and there are language takes a many time and limits in the implementing.&lt;br /&gt;My general idea is to use a functional programming language - and I've choose &lt;span style="font-weight: bold; font-style: italic;"&gt;scheme&lt;/span&gt; - it's better, simply.&lt;br /&gt;Look for the block diagram:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_IoVmxPCd5fk/SIOu2T0R9SI/AAAAAAAAAfw/9VJk2F6UbsA/s1600-h/mstrgeneral.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_IoVmxPCd5fk/SIOu2T0R9SI/AAAAAAAAAfw/9VJk2F6UbsA/s320/mstrgeneral.png" alt="" id="BLOGGER_PHOTO_ID_5225212240735630626" border="0" /&gt;&lt;/a&gt;&lt;span style="font-style: italic;"&gt;MuiString&lt;/span&gt; separated to the three logical parts, the first low two layers implemented on C (or on Cext in future), the third layer implemented on C/Cext and on scheme itself.&lt;br /&gt;All hardware specific things are hidden in the &lt;span style="font-style: italic;"&gt;MuiString&lt;/span&gt;.&lt;br /&gt;All services should be implemented on scheme, yes, we're can use C-written servers and libs (it should be done for liblinux/libposix), but in general case all other will be implemented on scheme and ran on scheme VM.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_IoVmxPCd5fk/SIOwfIN1YGI/AAAAAAAAAf4/k010_vJoZwc/s1600-h/vmsonmstr.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_IoVmxPCd5fk/SIOwfIN1YGI/AAAAAAAAAf4/k010_vJoZwc/s400/vmsonmstr.png" alt="" id="BLOGGER_PHOTO_ID_5225214041507848290" border="0" /&gt;&lt;/a&gt;All &lt;span style="font-weight: bold;"&gt;IPC&lt;/span&gt; will be operate via scheme forms - in this case all security models will be implemented without &lt;span style="font-weight: bold;"&gt;IPC&lt;/span&gt; calls restrictions, and it can be made on the &lt;span style="font-weight: bold;"&gt;VM&lt;/span&gt; (or language) level.&lt;br /&gt;There are several security models and several objects on the higher level:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; Trusted servers&lt;/li&gt;&lt;li&gt; Key signed&lt;/li&gt;&lt;li&gt; Group politics&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Trusted servers&lt;/span&gt; can allow secure transmit via determined servers, for example - you trust to the TCP/IP server, LAN server also trust it, but there are no directions from you to the LAN server, but LAN server and you can get access to execute scheme forms from/on LAN server, because there are trusted via TCP/IP server.&lt;br /&gt;&lt;br /&gt;I will write more researching results in the next post.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-3247550937857554101?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/3247550937857554101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=3247550937857554101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3247550937857554101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3247550937857554101'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/07/muistring-introduction-to-architecture.html' title='MuiString: Introduction to the architecture #1'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_IoVmxPCd5fk/SIOu2T0R9SI/AAAAAAAAAfw/9VJk2F6UbsA/s72-c/mstrgeneral.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-1703124444446878145</id><published>2008-07-18T02:47:00.004+03:00</published><updated>2008-07-18T03:14:21.179+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='scheme on practice'/><category scheme='http://www.blogger.com/atom/ns#' term='redleafd'/><category scheme='http://www.blogger.com/atom/ns#' term='networking human services'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><title type='text'>Redleaf: new plans and ways</title><content type='html'>As of&lt;span style="font-weight: bold; font-style: italic;"&gt; redleafd 0.1beta&lt;/span&gt; release (now it can be used for some purposes with sure) I'm take an idea, I want to implement some features for my work - it's a time sharing, job statistics, projects states etc ...&lt;br /&gt;I've decided to make it via web, yes, in case of public (but restricted use) using.&lt;br /&gt;What the deal I'm talking about ?&lt;br /&gt;There are a complete service for each one who cares and working on open-source project, scheduling community events, working time and want to make a proof of participating and real developer state.&lt;br /&gt;For example - I have a many mails from people who wants me to take they like a developers to open source project, in the past I've including everybody, but there are no effect on this - nobody works, people was enlisted and nothing else.&lt;br /&gt;On real practice - I want to take a view to each of candidate to participate in project via this service. There are no service for it yet.&lt;br /&gt;Also, there are a good thing for employer to avoid time loose with non right mans.&lt;br /&gt;eh, you can told me about linkedin - linkedin is not really make a proof of your skills and jobs - it's suck.&lt;br /&gt;So, it was a some non-technical introduction ...&lt;br /&gt;I'm reserving 4-5 hours per week for redleaf, and I want to introduce technologies will used for this project:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;- httpd - redleafd (small and fast)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt; - scheme_modula (module for the redleaf that suppose to run scheme code as quick as it possible)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt; - web ui software written on scheme &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt; - parsing/collecting server side daemons on python || scheme (it depends on my research with libs)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;In this case I will release in near time redleaf 0.1 (beta version can be found here - &lt;a href="http://prdownload.berlios.de/readleaf/redleaf-0.1beta.tar.gz"&gt;http://prdownload.berlios.de/readleaf/redleaf-0.1beta.tar.gz&lt;/a&gt; ), that will supports basic http stuff only.&lt;br /&gt;After those I'm planning to reorganize architecture and rewrite some code, to support dynamic modules and so on for flexibility, the next stage will be a set of modules. After this stage I will implement scheme_modula and starts to write web ui and server side daemons.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;In this case I'm need to anybody who knows any of the following - or all of this stuff&lt;/span&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;- C and UNIX IPC&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; - Data structures and memory management techniques&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; - Scheme&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; - any of - cvs/git/svn/arch/etc ... on really good level&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; - Python&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; - html/css and optionally javascript&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt; - Gimp and some creative techniques for image/icons creating&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Benefits you will get working on this project&lt;/span&gt;: you can become famous (maybe, who knows?), you can update your skills on programming and especially on scheme programming - on real practice, you will have a short and cool name for imap account - and invitation to the newly created service ... hmm like authors.&lt;br /&gt;I'm looking for you - contact me via jabber - &lt;span style="font-style: italic;"&gt;tirra at njs.netlab.cz &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Thank you.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-1703124444446878145?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/1703124444446878145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=1703124444446878145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/1703124444446878145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/1703124444446878145'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/07/redleaf-new-plans-and-ways.html' title='Redleaf: new plans and ways'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-9035384393830390348</id><published>2008-07-15T23:40:00.003+03:00</published><updated>2008-07-16T00:41:01.984+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='tips&apos;n&apos;tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='gcc'/><category scheme='http://www.blogger.com/atom/ns#' term='useful tips'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='debugging'/><category scheme='http://www.blogger.com/atom/ns#' term='for beginners'/><title type='text'>Tips'n'Tricks: GCC useful macros for debugging</title><content type='html'>Continuing my series for newbies/beginners I want to told about gcc macros useful for debugging.&lt;br /&gt;Everytime on C you have deal with memory, and very big part of bugs are memory managing related.&lt;br /&gt;You must know differents ways to decide question with it, wrappers to general &lt;span style="font-weight: bold; font-style: italic;"&gt;mmap/malloc/munmap/free&lt;/span&gt; functions, implement your own allocator (if you really know what you're doing).&lt;br /&gt;Anyway, it's better to know without debugger (just use &lt;span style="font-style: italic;"&gt;stdout&lt;/span&gt; to make this deal) when you are allocate and freed memory. GCC has a several really useful macros for this.&lt;br /&gt;For example let's write a simple example with &lt;span style="font-weight: bold;"&gt;free()&lt;/span&gt; function:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;void *__my_free(char *file,int line,char *function,void *p)&lt;br /&gt;{&lt;br /&gt; if(p)    free(p);&lt;br /&gt; else     {&lt;br /&gt;   fprintf(stderr,"Trying to free nil pointer.\n");&lt;br /&gt;   fprintf(stderr,"At `%s:%d' via '%s'\n",file,line,function);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; return NULL;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It's really a big shit deal to point everywhere info about function, line and file ;)&lt;br /&gt;Just use this macro:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#define my_free(p)  __my_free(__FILE__,__LINE__,(char *)__FUNCTION__,p)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is all, for more detailed documentation see gcc manual.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-9035384393830390348?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/9035384393830390348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=9035384393830390348' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/9035384393830390348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/9035384393830390348'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/07/tipsntricks-gcc-useful-macros-for.html' title='Tips&apos;n&apos;Tricks: GCC useful macros for debugging'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-2955028428437448779</id><published>2008-07-02T22:50:00.003+03:00</published><updated>2008-07-02T23:13:31.042+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ideas'/><category scheme='http://www.blogger.com/atom/ns#' term='microkernel'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><category scheme='http://www.blogger.com/atom/ns#' term='programming languages'/><title type='text'>Research: new ideas to system development</title><content type='html'>Doing some research on operating systems design you can choose the kernel model and in this case you can expect that microkernel is more stable, powerful and flexible compairing with monolithic design, exokernels are too platform specific and more complicable for application level platforms (i.e. embedded systems with too limited functionality). But like a bonus you will got the new area of research in this area - choosing and developing an instruments for implementation.&lt;br /&gt;On this area, in my opinion, are old and good instrument is a pure C language for microkernel, for low level. But in case of many reasons C development has a long time for something bigger than microkernel, for microkernel you can extend C with macros or write your own preproccessor to extend C (like my project extC). This is good and right, but for microkernel servers and user level is better to use something else, more powerful with paradigms and more easy to develop.&lt;br /&gt;It's not C++, not only in case of my hate to pluses, there are no reason to use C++ in any kind of development, C++ contain many ugly stuff and it has an ugly design overally. There are ObjectiveC, but this language will not decide our wishes.&lt;br /&gt;I'm looking to functional programming languages - this way is more powerfull, well-designed lisp-like language is really simple to implement, they all has a simple syntax - and learning didn't takes a long time - it's intended to be meta-level development. &lt;br /&gt;With its powerful I'm thinking about crazy things - what about to design a several DSL that can be simply implemented on Lisp/Scheme/Haskell , for different types of microkernel servers. &lt;br /&gt;In example, you can research for often used language features and constructions that required for implement a filesystem, or block device driver, or network device driver etc... &lt;br /&gt;I'm thinking to go deeper in this area after MuiString will ran. I promise to make a deep research, implement expiremental DSLs for this purposes and test it for perfomance and other things. &lt;br /&gt;Be updated, take a look to functional programming of your research - it's a wonderful world of new features and paradigms.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-2955028428437448779?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/2955028428437448779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=2955028428437448779' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2955028428437448779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2955028428437448779'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/07/research-new-ideas-to-system.html' title='Research: new ideas to system development'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-2888950495598488728</id><published>2008-07-02T12:46:00.003+03:00</published><updated>2008-07-02T14:40:26.838+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory allocators'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='memory management'/><category scheme='http://www.blogger.com/atom/ns#' term='buddy system'/><title type='text'>Memory management - buddy system trick.</title><content type='html'>How I wrote before, on low level we're need a simple and fast allocator with minimal external fragmentation. It was buddy system. I've used a binary buddy in case of simple and clean code and perfomance.&lt;br /&gt;But we're need to store a free buddies list, but we haven't any allocators lower and we're cannot allocate something for it, and we're cannot create linked list of pointers to the blocks and chunks - and it's not so clever - the really big overdraft on it.&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;Theory:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;I've decide that I can use a bitmap in this case, for grow up speed I will use a bitmap for each buddy list level in this case for first level we're need just 1 bit per attribute, for second 2 bits per attribute ... and so on. Also we're need to make a simple initialization and keep information about separating. In this case we're using 2 bits per buddy block, I've called them - the first one is negative bitmap, the second one is positive bitmap.&lt;br /&gt;What are they means? The first bit attribute (negative) points that if the bit is set it's a free block, if not it's used (or unmapped) block. Second bit attribute (positive) points that if the bit set it's not separated block, otherwise is. In this model we're simply full negative bitmap with &lt;i&gt;0x0&lt;/i&gt;and positive bitmap with &lt;i&gt;0xffffffff&lt;/i&gt;, and how you can understand we will use unsigned integer 32bit sized ones for bitmap.&lt;br /&gt;Make a simple calculations and you will get a good news - for map buddy with 16-parts you need 64bits or 8 bytes, isn't pretty?&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00;"&gt;Implementation:&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;So, the first I will declare the general structure that will describe buddy system:&lt;br /&gt;&lt;pre width="100"&gt;&lt;br /&gt;&lt;font color="#4169E1"&gt;&lt;a name="__bbuddy_type"&gt;&lt;/a&gt;typedef struct __bbuddy_type &lt;/font&gt;{&lt;br /&gt;  uint32_t *pbmp;&lt;br /&gt;  uint32_t *nbmp;&lt;br /&gt;  uint32_t pn;&lt;br /&gt;} bbuddy_t;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;How you can see there are two pointers and what the neck ?&lt;br /&gt;So, I'll explain it - on low level you need to take a pointer (determining the size you need) and use it for your first buddy - it's simply than something else. Also, I store &lt;b&gt;buddy_t&lt;/b&gt; first and after it I'm storing &lt;b&gt;uint32_t&lt;/b&gt; data.&lt;br /&gt;Also we're need an macro that will calculate the overall size to store the buddy system, let's take it:&lt;br /&gt;&lt;pre width="100"&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#228B22"&gt;#define bbuddy_size(n)  (((((n/32)==0) ? 1 : ((n/32&amp;gt;1) ? (n/32)+2 : n/32+1))*(2*sizeof(uint32_t)))+\&lt;br /&gt;                         sizeof(bbuddy_t))&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Explaining it, for parts that bigger than 1/32 of buddy mapped area we're need just one uint32_t , for 1/32 yet another one, and for smaller parts working a general rule to calculate size. Like in squares roots calculation ;)&lt;br /&gt;Also you will need for several useful macros that will calculates index of pointer and bit position within bitmap area:&lt;br /&gt;&lt;pre width="100"&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#228B22"&gt;#define bbuddy_indexp(p,n)  ((p/32 &amp;gt; 1) ? ((p/32)+(n/32)) : p/32)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#228B22"&gt;#define bbuddy_indexbn(n)   ((n/32&amp;gt;0) ? n%32 : n)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The first macro will calculate index to choose correct &lt;b&gt;uint32_t&lt;/b&gt; data, and second one to choose a bit position, be careful using this macros as is not a good practice, I will show examples of using its.&lt;br /&gt;In the implementation explanation I don't want to show you all the source code, it's a simple - you can implement it yourself without any kind of problems.&lt;br /&gt;But there are some useful code snippets I'll show. &lt;br /&gt;The first point on implementation is initialization of buddy system, assign a correct pointers for bitmaps, init first block free. Here be careful with pointers shifting deals, I will show you the simple one, that works correctly, but don't forgot that C operator '+' on pointers shifts pointers with the size of  pointer type.&lt;br /&gt;I've used char* - it's a clean and transparent to understand:&lt;br /&gt;&lt;pre width="100"&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;&lt;a name="bbuddy_init"&gt;&lt;/a&gt;uint8_t bbuddy_init(bbuddy_t *b,uint32_t max_part)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;{&lt;br /&gt;  int yy=(max_part/32)*2,i;&lt;br /&gt;  char *ptr=(char*)b;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(b &amp;amp;&amp;amp; max_part) {&lt;br /&gt;    ptr+=&lt;font color="#4169E1"&gt;sizeof&lt;/font&gt;(bbuddy_t);&lt;br /&gt;    b-&amp;gt;pbmp=(uint32_t*)ptr;&lt;br /&gt;    ptr+=(&lt;font color="#4169E1"&gt;sizeof&lt;/font&gt;(uint32_t)*((max_part/32 &amp;gt; 1) ? (max_part/32)+2 : (max_part/32)+1));&lt;br /&gt;    b-&amp;gt;nbmp=(uint32_t*)ptr;&lt;br /&gt;  } &lt;font color="#4169E1"&gt;else&lt;/font&gt;&lt;br /&gt;    &lt;font color="#4169E1"&gt;return&lt;/font&gt; 1;&lt;br /&gt;&lt;br /&gt;  b-&amp;gt;pn=max_part;&lt;br /&gt;&lt;br /&gt;  max_part/=32;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;for&lt;/font&gt;(i=0;i&amp;lt;yy;i++) {&lt;br /&gt;    b-&amp;gt;nbmp[i]=nil;&lt;br /&gt;    b-&amp;gt;pbmp[i]=fil;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;font color="#B22222"&gt;/* init first */&lt;/font&gt;&lt;br /&gt;  b-&amp;gt;nbmp[0] |= (1 &amp;lt;&amp;lt; 0);&lt;br /&gt;  b-&amp;gt;nbmp[0] |= (1 &amp;lt;&amp;lt; 1);&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;return&lt;/font&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#FF0000;"&gt;NOTE: &lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;nil&lt;/i&gt;&lt;/b&gt; it's a macro defined to &lt;i&gt;0x0&lt;/i&gt; and &lt;b&gt;&lt;i&gt;fil&lt;/i&gt;&lt;/b&gt; is a macro defined to &lt;i&gt;0xffffffff&lt;/i&gt;.&lt;br /&gt;Here we go ... we're a correctly init buddy system structure.&lt;br /&gt;Now, I want to wrote about allocations/splitting/freeing specifics of this implementation.&lt;br /&gt;I've implement an allocation function with mind that I've giving a part number of buddy system and it's trying to return me a number of avialable and allocated part. Look below:&lt;br /&gt;&lt;pre width="100"&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;&lt;a name="__bbuddy_block_alloc"&gt;&lt;/a&gt;static uint32_t __bbuddy_block_alloc(bbuddy_t *b,uint32_t align,uint8_t m_flag)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;{&lt;br /&gt;  uint32_t p_indx=align/32;&lt;br /&gt;  uint32_t n_indx=0,i=0,o=0;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(p_indx) {&lt;br /&gt;    &lt;font color="#4169E1"&gt;for&lt;/font&gt;(i=0;i&amp;lt;p_indx;i++) {&lt;br /&gt;      &lt;font color="#4169E1"&gt;if&lt;/font&gt;(b-&amp;gt;nbmp[p_indx+i]!=0x0)&lt;br /&gt;        &lt;font color="#4169E1"&gt;goto&lt;/font&gt; __is_free_long;&lt;br /&gt;    }&lt;br /&gt;    m_flag++;&lt;br /&gt;    &lt;font color="#4169E1"&gt;return&lt;/font&gt; __bbuddy_block_alloc(b,align/2,m_flag);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(!p_indx) { &lt;font color="#B22222"&gt;/* checking small layers, big blocks */&lt;/font&gt;&lt;br /&gt;    o=align*2;&lt;br /&gt;    &lt;font color="#4169E1"&gt;for&lt;/font&gt;(i=align;i&amp;lt;o;i++) &lt;br /&gt;      &lt;font color="#4169E1"&gt;if&lt;/font&gt;((b-&amp;gt;nbmp[p_indx] &amp;amp; (1 &amp;lt;&amp;lt; i)) &amp;amp;&amp;amp; !m_flag) {&lt;br /&gt;        b-&amp;gt;nbmp[p_indx] &amp;amp;= ~(1 &amp;lt;&amp;lt; i); &lt;font color="#B22222"&gt;/* used */&lt;/font&gt;&lt;br /&gt;        b-&amp;gt;pbmp[p_indx] |= (1 &amp;lt;&amp;lt; i); &lt;font color="#B22222"&gt;/* not separated */&lt;/font&gt;&lt;br /&gt;        &lt;font color="#4169E1"&gt;return&lt;/font&gt; i-align;&lt;br /&gt;      } &lt;font color="#4169E1"&gt;else&lt;/font&gt; &lt;font color="#4169E1"&gt;if&lt;/font&gt;((b-&amp;gt;nbmp[p_indx] &amp;amp; (1 &amp;lt;&amp;lt; i)) &amp;amp;&amp;amp; m_flag) {&lt;br /&gt;        b-&amp;gt;nbmp[p_indx] &amp;amp;= ~(1 &amp;lt;&amp;lt; i); &lt;font color="#B22222"&gt;/* used */&lt;/font&gt;&lt;br /&gt;        b-&amp;gt;pbmp[p_indx] &amp;amp;= ~(1 &amp;lt;&amp;lt; i); &lt;font color="#B22222"&gt;/* separated */&lt;/font&gt;&lt;br /&gt;        &lt;font color="#B22222"&gt;/* mark childs free */&lt;/font&gt;&lt;br /&gt;        align*=2;         i*=2;&lt;br /&gt;        p_indx=align/32;&lt;br /&gt;        n_indx=bbuddy_indexbn(i);&lt;br /&gt;        b-&amp;gt;nbmp[p_indx] |= (1 &amp;lt;&amp;lt; n_indx);&lt;br /&gt;        b-&amp;gt;nbmp[p_indx] |= (1 &amp;lt;&amp;lt; (n_indx+1));&lt;br /&gt;        b-&amp;gt;pbmp[p_indx] |= (1 &amp;lt;&amp;lt; n_indx);&lt;br /&gt;        b-&amp;gt;pbmp[p_indx] |= (1 &amp;lt;&amp;lt; (n_indx+1));&lt;br /&gt;&lt;br /&gt;        m_flag--;&lt;br /&gt;        &lt;font color="#4169E1"&gt;return&lt;/font&gt; __bbuddy_block_alloc(b,align,m_flag);&lt;br /&gt;      }&lt;br /&gt;    &lt;font color="#4169E1"&gt;if&lt;/font&gt;(i&amp;lt;2)&lt;br /&gt;      &lt;font color="#4169E1"&gt;return&lt;/font&gt; ENOBLOCK;&lt;br /&gt;    &lt;font color="#4169E1"&gt;else&lt;/font&gt; {&lt;br /&gt;      m_flag++;&lt;br /&gt;      &lt;font color="#4169E1"&gt;return&lt;/font&gt; __bbuddy_block_alloc(b,align/2,m_flag);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#FF0000"&gt; __is_free_long:&lt;/font&gt;&lt;/strong&gt; &lt;br /&gt;  &lt;font color="#4169E1"&gt;while&lt;/font&gt;(o&amp;lt;32) {&lt;br /&gt;    &lt;font color="#4169E1"&gt;if&lt;/font&gt;((b-&amp;gt;nbmp[p_indx+i] &amp;amp; (1 &amp;lt;&amp;lt; o)) &amp;amp;&amp;amp; !m_flag) { &lt;font color="#B22222"&gt;/* yep, found */&lt;/font&gt;&lt;br /&gt;      b-&amp;gt;nbmp[p_indx+i] &amp;amp;= ~(1 &amp;lt;&amp;lt; o); &lt;font color="#B22222"&gt;/* used */&lt;/font&gt;&lt;br /&gt;      b-&amp;gt;pbmp[p_indx+i] |= (1 &amp;lt;&amp;lt; o); &lt;font color="#B22222"&gt;/* not separated */&lt;/font&gt;&lt;br /&gt;      &lt;font color="#4169E1"&gt;return&lt;/font&gt; (p_indx &amp;gt; 1) ? (((p_indx+i)-2)*32)+o : o;&lt;br /&gt;    }&lt;br /&gt;    &lt;font color="#4169E1"&gt;else&lt;/font&gt; &lt;font color="#4169E1"&gt;if&lt;/font&gt;((b-&amp;gt;nbmp[p_indx+i] &amp;amp; (1 &amp;lt;&amp;lt; o)) &amp;amp;&amp;amp; m_flag) { &lt;font color="#B22222"&gt;/* make sep */&lt;/font&gt;&lt;br /&gt;      b-&amp;gt;nbmp[p_indx+i] &amp;amp;= ~(1 &amp;lt;&amp;lt; o); &lt;font color="#B22222"&gt;/* used */&lt;/font&gt;&lt;br /&gt;      b-&amp;gt;pbmp[p_indx+i] &amp;amp;= ~(1 &amp;lt;&amp;lt; o); &lt;font color="#B22222"&gt;/* separated */&lt;/font&gt;&lt;br /&gt;      &lt;font color="#B22222"&gt;/* mark childs free */&lt;/font&gt;&lt;br /&gt;      align*=2;        p_indx=align/32; o*=2;&lt;br /&gt;      p_indx=bbuddy_indexp(align,o);&lt;br /&gt;      n_indx=bbuddy_indexbn(o);&lt;br /&gt;      b-&amp;gt;nbmp[p_indx] |= (1 &amp;lt;&amp;lt; n_indx);&lt;br /&gt;      b-&amp;gt;nbmp[p_indx] |= (1 &amp;lt;&amp;lt; (n_indx+1));&lt;br /&gt;      b-&amp;gt;pbmp[p_indx] |= (1 &amp;lt;&amp;lt; n_indx);&lt;br /&gt;      b-&amp;gt;pbmp[p_indx] |= (1 &amp;lt;&amp;lt; (n_indx+1));&lt;br /&gt;&lt;br /&gt;      m_flag--;&lt;br /&gt;      &lt;font color="#4169E1"&gt;return&lt;/font&gt; __bbuddy_block_alloc(b,align,m_flag);&lt;br /&gt;    }&lt;br /&gt;    o++;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;return&lt;/font&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;How you can see there are difference between 1/16 and bigger parts - I've showed it, it's separated via source code implementation in case of making additional checking and different calculation in both situations, you can split there parts into one to make code lines counter smaller , but it doesn't give any perfomance effect (tested).&lt;br /&gt;Freeing buddy block must be assigned with splitting buddy into bigger block if possible, I've implement this via recursive separate function to make a lightweight to read release function, also I will point to indexes calculations here. &lt;br /&gt;And I want you to understand, I'm giving to release function number of smaller blocks like offset to release, after those I'm calculating possible variants of blocks can be and if found I'm releasing it, and only after it I'm calls my splitter function. Also, I don't include additonal checking code, make it yourself ;), look below:&lt;br /&gt;&lt;pre width="100"&gt;&lt;br /&gt;&lt;strong&gt;&lt;font color="#4169E1"&gt;&lt;a name="__bbuddy_block_release"&gt;&lt;/a&gt;static uint32_t __bbuddy_block_release(bbuddy_t *b,uint32_t num,uint32_t i)&lt;/font&gt;&lt;/strong&gt;&lt;br /&gt;{&lt;br /&gt;  uint32_t p_indx,n_indx;&lt;br /&gt;  uint32_t layer=b-&amp;gt;pn,ls=layer,a=0;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#B22222"&gt;/* first look up on higher possible layer&lt;br /&gt;   * if there are now, look deeper&lt;br /&gt;   */&lt;/font&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(num&amp;gt;b-&amp;gt;pn)&lt;br /&gt;    &lt;font color="#4169E1"&gt;return&lt;/font&gt; EINVALIDINDX; &lt;font color="#B22222"&gt;/* error encount */&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;while&lt;/font&gt;(ls) {    ls/=2; a++;  } &lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(i==0) {&lt;br /&gt;    &lt;font color="#4169E1"&gt;for&lt;/font&gt;(i=(a-1);i&amp;gt;0;i--) {&lt;br /&gt;      &lt;font color="#4169E1"&gt;if&lt;/font&gt;(num%2) &lt;font color="#4169E1"&gt;break&lt;/font&gt;;&lt;br /&gt;      &lt;font color="#4169E1"&gt;else&lt;/font&gt; num/=2;&lt;br /&gt;    }&lt;br /&gt;  } &lt;br /&gt;&lt;br /&gt;  layer=(1 &amp;lt;&amp;lt; i);&lt;br /&gt;&lt;br /&gt;  n_indx=(layer&amp;lt;32) ? (num+layer) : bbuddy_indexbn(num);&lt;br /&gt;  p_indx=bbuddy_indexp(layer,num);&lt;br /&gt;  &lt;font color="#4169E1"&gt;if&lt;/font&gt;(!(b-&amp;gt;nbmp[p_indx] &amp;amp; (1 &amp;lt;&amp;lt; n_indx)) &amp;amp;&amp;amp; (b-&amp;gt;pbmp[p_indx] &amp;amp; (1 &amp;lt;&amp;lt; n_indx))) { &lt;br /&gt;    b-&amp;gt;nbmp[p_indx] |= (1 &amp;lt;&amp;lt; n_indx); &lt;font color="#B22222"&gt;/* mark free */&lt;/font&gt;&lt;br /&gt;    &lt;font color="#4169E1"&gt;return&lt;/font&gt; __bbuddy_split_up(b,layer,num);&lt;br /&gt;  } &lt;font color="#4169E1"&gt;else&lt;/font&gt; &lt;font color="#4169E1"&gt;if&lt;/font&gt;(!(b-&amp;gt;nbmp[p_indx] &amp;amp; (1 &amp;lt;&amp;lt; n_indx)) &amp;amp;&amp;amp; !(b-&amp;gt;pbmp[p_indx] &amp;amp; (1 &amp;lt;&amp;lt; n_indx))) { &lt;font color="#B22222"&gt;/* going deep */&lt;/font&gt;&lt;br /&gt;    i++;&lt;br /&gt;    &lt;font color="#4169E1"&gt;if&lt;/font&gt;(i&amp;gt;=a)&lt;br /&gt;      &lt;font color="#4169E1"&gt;return&lt;/font&gt; EBUDDYCORRUPED;&lt;br /&gt;    &lt;font color="#4169E1"&gt;else&lt;/font&gt;&lt;br /&gt;      &lt;font color="#4169E1"&gt;return&lt;/font&gt; __bbuddy_block_release(b,num*2,i);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  &lt;font color="#4169E1"&gt;return&lt;/font&gt; 0;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In case of my initialization and implementation of bitmap, I'm starting to look up for the block from the biggest blocks, because in othercase there are will be errors on cleanly initied bitmap and buddy will corruped.&lt;br /&gt;Also, I don't want to describe my splitter function and I will not show it's source code - it's a trivial too like others.&lt;br /&gt;Be patient, on my code (I wrote it and tested within 1-2 hours) some checks is absent, and some code I've specially removed - take your brains on working way ;)&lt;br /&gt;Like API functions I've made a wrapper to hide all recursion in static functions, and with assign of initial counters values.&lt;br /&gt;On next post I will try to explain how we're can use this abstraction to allocate real pointers, or you can think yourself and assume this method - it's a too trivial ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-2888950495598488728?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/2888950495598488728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=2888950495598488728' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2888950495598488728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2888950495598488728'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/07/memory-management-buddy-system-trick.html' title='Memory management - buddy system trick.'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-2139881954405111830</id><published>2008-06-30T12:55:00.003+03:00</published><updated>2008-06-30T13:41:54.669+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory allocators'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='memory management'/><category scheme='http://www.blogger.com/atom/ns#' term='buddy system'/><title type='text'>Memory management - low allocator base - binary buddy.</title><content type='html'>As I intended to memory managers implementing, I decide to write here about several techniques about this.&lt;br /&gt;I don't interested on allocators in uspace now. I want to describe some tips and tricks on memory management while you haven't anything - just raw gdt/tss/ so on and raw addresses.&lt;br /&gt;On low level of memory management and allocation system we're need to have a simple and fast memory allocator, it must avoid external fragmentation as strong as it possible.&lt;br /&gt;There are one good allocator that doesn't sick with big external fragmentation - buddy system. You can find many it's types, but I'd like binary type - it's a very simple in calculation (that really needs).&lt;br /&gt;Some words about buddy system... Buddy system is a such system that based on buddy relations for splitting memory areas. This system has several limitation - you must know deep of separation, I mean how much blocks maximally can contents buddy itself, and overally it can maps fixed memory area size (but it can be depends on implementation). The goal of this technique is to find free block aligned to requested size, when you are looking for some block size - you will separate block with bigger size and so on, while you didn't finf more situable block size. Look for illustrations: &lt;br /&gt;&lt;center&gt;&lt;img src="http://img300.imageshack.us/img300/6743/buddysystemexplanationzh6.png" alt="buddy system explanation" /&gt;&lt;br /&gt;Fig. 1&lt;/center&gt;&lt;br /&gt;The first bar shows clean buddy system without any allocated block (4096 bytes). When we're requesting to allocate block with size 512 byte we're separate zone to two blocks, and one of this zone separate we're separate too and use one of them - like it shown on the second bar. If we're request to allocate three more 512-sized block we will got the picture displayed on third bar.&lt;br /&gt;It's a good and relativetly fast methodics, but has many restrictions - for example assume that your buddy system has 16byte-sized minimal blocks - and you request 10 bytes - so, you will get a wasted space - and so on - it's an inernal fragmentation. Be sure - you can align block sizes to other numbers , like you want and depend on your target, but anyway it will not safe to use buddy for all allocations.&lt;br /&gt;Another point is a free/busy/separated blocks list storing - on low level you cannot use binary trees in case that they need to have some memory allocation technique already, usually for this used simple pointers lists, but it's a worse practice.&lt;br /&gt;On the next post about memory management I will describe my solution of this problem with some useful code snippets.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-2139881954405111830?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/2139881954405111830/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=2139881954405111830' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2139881954405111830'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2139881954405111830'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/memory-management-low-allocator-base.html' title='Memory management - low allocator base - binary buddy.'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-3747234655550905842</id><published>2008-06-27T20:19:00.004+03:00</published><updated>2008-06-27T23:56:22.718+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ICANN'/><category scheme='http://www.blogger.com/atom/ns#' term='domains'/><category scheme='http://www.blogger.com/atom/ns#' term='european fetishism'/><category scheme='http://www.blogger.com/atom/ns#' term='protest'/><title type='text'>Protest award domain name nativization from ICANN</title><content type='html'>So, there are bad news, no ICANN supports 'internalization' of domain names, now it's a possible to register a domain with your native language.&lt;br /&gt;Due to many reasons - I decide to apply a protest for it - it's nothing, but maybe you will be participate on this.&lt;br /&gt;And so on - I'll not post anything on languages differs from english, no jabber/blog/boards/sms/emails messages on non english from tomorrow !&lt;br /&gt;I don't want to make a freedom to spooffing and idiotic things.&lt;br /&gt;&lt;br /&gt;Participate if it possible.&lt;br /&gt;&lt;br /&gt;I can feel your skeptics looks, yes - I'm just man and I don't have a voice in ICANN, but assume if there are many people like me? You know - world is small ;) And there are just time need ... and this protest will be effective. But anyway, if you will do nothing with it, in future with idiotic domains you will told yourself - "fuck'em up, I don't participate in protest, maybe my voice can be useful at there times ... shit shit shit" - feeling difference - take a voice, participate in this protest, control your life!&lt;br /&gt;&lt;br /&gt;If you will participate, please comment here - thank you!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-3747234655550905842?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/3747234655550905842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=3747234655550905842' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3747234655550905842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3747234655550905842'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/protest-award-domain-name-nativization.html' title='Protest award domain name nativization from ICANN'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-2891392782052122748</id><published>2008-06-24T01:48:00.003+03:00</published><updated>2008-06-24T02:42:16.473+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='MuiString'/><category scheme='http://www.blogger.com/atom/ns#' term='mstring'/><category scheme='http://www.blogger.com/atom/ns#' term='microkernel'/><category scheme='http://www.blogger.com/atom/ns#' term='memory management'/><category scheme='http://www.blogger.com/atom/ns#' term='design'/><title type='text'>MuiString higher memory management</title><content type='html'>I've made some researching and emulation (not so serios, but representative) about memory management in microkernel OS.&lt;br /&gt;Many kernels does memory management fully in kernel space, others separate it and offer non-trivial API for doing this in userspace.&lt;br /&gt;We're have many restrictions - security and performance. If you will targeting to one of this properties you will loose on other. If you want to have a very strong and secure mechanism you will make a many context switching within kernel and user spaces - it will slow down your system perfomance, if you will don't care about security you will make it faster ...&lt;br /&gt;I decide to make a basics virtual memory manager operations within kernel space, and offer simple API (just 4 calls) - address_space_get(), address_space_set(), address_space_alloc(), address_space_release(). And ... bind page fault exception to userspace area virtual mm server.&lt;br /&gt;In this scheme microkernel just mark/unmark address space, it doesn't makes a check (and it will works fast) , and microkernel doesn't care about page fault exception - it's a server headache.&lt;br /&gt;The security implemented on userspace - with ACL server that cannot be exchanged - like other varios servers (you must load its via multiboot modules way), all requests to ACL cached to the IPC cache server (it cannot be exchanged too) to avoid premiary access violation checks and grow up speed of requests. On the figure below I've tried to show it graphically (I like this, but I don't like to make a graphics ...):&lt;br /&gt;&lt;center&gt;&lt;img src="http://img261.imageshack.us/img261/4117/vmminuspaceexamplesz5.png" alt="Figure. 1" /&gt;&lt;/center&gt;&lt;br /&gt;User task just trying to take some virtual memory and extend it's address space - it's a deal of libs to make all job with calling of vmm server. Vmm server asks about access rights/limits/etc ... on ACL server, if all granted - vmm will allocate space for user task, if will be need - it will calls MuiString microkernel via simple API.&lt;br /&gt;&lt;br /&gt;This structure allows to make secure and fast (compairing with some highly secured or highly fast microkernel systems) - it's a good design for implementing different models of memory allocations (real-time, preemption, so on ...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-2891392782052122748?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/2891392782052122748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=2891392782052122748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2891392782052122748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/2891392782052122748'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/muistring-higher-memory-management.html' title='MuiString higher memory management'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-3296100838189082747</id><published>2008-06-23T13:51:00.004+03:00</published><updated>2008-06-23T14:31:38.937+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='useful tips'/><category scheme='http://www.blogger.com/atom/ns#' term='emacs'/><title type='text'>Emacs #1 - saving your state after exit , and tabbar use</title><content type='html'>Often you need to restore your emacs session, but it's not a good way to load all buffer per start, just keep it.&lt;br /&gt;Also, there are useful addition to emacs called tabbar.el it can keeps your buffers without its creating.&lt;br /&gt;I don't want to write where you can find this file - if you are using debian you can find it out in emacs-goodies-el package.&lt;br /&gt;So, the first step is to enable tabbar mode by default:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(tabbar-mode t)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;After this I recommend to bind a keys for switch between tabs:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(global-set-key [(control shift w)] 'tabbar-forward)&lt;br /&gt;(global-set-key [(control shift q)] 'tabbar-backward)&lt;br /&gt;(global-set-key [(control shift e)] 'tabbar-forward-group)&lt;br /&gt;(global-set-key [(control shift d)] 'tabbar-backward-group)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can use your own key bindings depending on your choice and feel.&lt;br /&gt;The second step is to use a desktop addition (that comes with emacs22):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;(when (fboundp 'desktop-load-default)&lt;br /&gt;  (desktop-load-default)&lt;br /&gt;  (mapcar&lt;br /&gt;   (lambda (symbol)&lt;br /&gt;     (add-to-list 'desktop-globals-to-save symbol))&lt;br /&gt;   '((buffer-name-history      . 100)&lt;br /&gt;     (dired-regexp-history     . 20)&lt;br /&gt;     (extended-command-history . 100)&lt;br /&gt;     (file-name-history        . 500)&lt;br /&gt;     (grep-history             . 50)&lt;br /&gt;     (minibuffer-history       . 100)&lt;br /&gt;     (query-replace-history    . 60)&lt;br /&gt;     (read-expression-history  . 60)&lt;br /&gt;     (regexp-history           . 60)&lt;br /&gt;     (regexp-search-ring       . 20)&lt;br /&gt;     (search-ring              . 20)&lt;br /&gt;     (shell-command-history    . 50)))&lt;br /&gt;;;;    (desktop-read)&lt;br /&gt;  )&lt;br /&gt;&lt;br /&gt;(add-to-list 'desktop-locals-to-save 'buffer-file-coding-system)&lt;br /&gt;(add-to-list 'desktop-locals-to-save 'tab-width)&lt;br /&gt;&lt;br /&gt;(setq-default desktop-missing-file-warning nil)&lt;br /&gt;(setq-default desktop-path (quote ("~")))&lt;br /&gt;(setq-default desktop-save t)&lt;br /&gt;(setq-default desktop-save-mode t)&lt;br /&gt;&lt;br /&gt;(setq-default save-place t)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And this all, this code snippets from my ~/.emacs file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-3296100838189082747?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/3296100838189082747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=3296100838189082747' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3296100838189082747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/3296100838189082747'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/emacs-1-saving-your-state-after-exit.html' title='Emacs #1 - saving your state after exit , and tabbar use'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-8324209146566754744</id><published>2008-06-23T00:45:00.003+03:00</published><updated>2008-06-23T01:14:51.425+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='look and feel'/><category scheme='http://www.blogger.com/atom/ns#' term='x11'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='desktop'/><category scheme='http://www.blogger.com/atom/ns#' term='window maker'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Using Gnome ?! really with modifications ...</title><content type='html'>I'm using Gnome 2.xx in case of some features that I need.&lt;br /&gt;The first, if you know, network-manager knows about many specifics of many Wi-Fi modules tricks, for example for my RaLink card (that cannot be changed in my notebook) - it's needed to be downed and after this up with new network settings. So, I'm using many wireless networks (office, pubs, train stations, passenger terminals, ...) - but other network managers can't operates with my card, doing many stuff manually isn't sounds good for me - I'm lazy...&lt;br /&gt;If you are using Gnome you know the base minus of it - it's a default window manager - metacity, this wm cannot remember anything about windows position, size and other varios attributes.&lt;br /&gt;Also, on other side there are tiled window managers, but its takes many time to make a sense on configs and features.&lt;br /&gt;The better way is to use my old friend - Window Maker wm, there are simple setting up, and it has many look and features that can be offered in tiled managers.&lt;br /&gt;It can be looks like on my screenshot - &lt;a href="http://img48.imageshack.us/my.php?image=gnome222wmakerfe9.png" target="_blank"&gt;&lt;img src="http://img48.imageshack.us/img48/8737/gnome222wmakerfe9.th.png" border="0" alt="Free Image Hosting at www.ImageShack.us" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://img604.imageshack.us/content.php?page=blogpost&amp;amp;files=img48/8737/gnome222wmakerfe9.png" title="QuickPost"&gt;&lt;img src="http://imageshack.us/img/butansn.png" alt="QuickPost" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, but Gnome feature - changing window manager is deprecated and all settings made over a gconf was failed. Solution was found - I've create ~/.gnomerc file and add the following line -&lt;br /&gt;&lt;blockquote&gt;export WINDOW_MANAGER=wmaker&lt;/blockquote&gt;This line helps for it.&lt;br /&gt;Also you can change some things like abort nautilus loading etc ... It will safe your memory and will turn off features for idiots.&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-8324209146566754744?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/8324209146566754744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=8324209146566754744' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/8324209146566754744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/8324209146566754744'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/using-gnome-really-with-modifications.html' title='Using Gnome ?! really with modifications ...'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-429230441316047810</id><published>2008-06-20T14:04:00.004+03:00</published><updated>2008-06-20T14:39:02.316+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='how-tos'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='general'/><category scheme='http://www.blogger.com/atom/ns#' term='amd64'/><category scheme='http://www.blogger.com/atom/ns#' term='low level'/><title type='text'>AMD64 #1 - Long Mode</title><content type='html'>Backing to old days the first tree of &lt;span style="font-weight: bold; font-style: italic;"&gt;microkernel&lt;/span&gt; was targeted to the x86 (32bit), going deeper the parent of all post projects &lt;span style="font-style: italic;"&gt;(ilix)&lt;/span&gt; was targeted to embedded hardware i.e. arm and one internal architecture that was 24 bit.&lt;br /&gt;Nowadays we're have a public accessible and cheep 64bit long architecture, x86 continuing but with 64bit long extension, but on real - it's looks different. &lt;span style="font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;AMD64&lt;/span&gt; allows many good extended features compairing with basic x86 32bit long structure. To use AMD64 features on full filled hand we're must operate in long mode (amd64 specific mode).&lt;br /&gt;On truth, long mode is a mixed mode i.e. it operates on 64-bit mode and compatibility mode at one time. It has self minuses - it's a flat memory model. But it has 64-bit addressing and we're don't need for tricks with extension from intel to use more than 4Gb address space addressing, that relatively  ugly and looks like an ugly hack.&lt;br /&gt;Like a microkernel developer and low developer at one time - the first problem is initialization.&lt;br /&gt;I've read AMD64 documentation directly from AMD, but there are no anything to really help with it, not at all, but if you want to make a sense quickly it's not usable.&lt;br /&gt;I've designed a trick with it, saying simply it consist from following steps :&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt; 32bit code:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - initialize stack pointer (regarding your boot method and loader, I'm using grub and multiboot)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - init bootstrap GDT &lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - jump to 'meet point' within existing GDT &lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - save parameters from grub (will be need on if you using grub)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - we're falled on 32bit protected mode (legacy mode on AMD64)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - check for varios CPU features (it must be made if you want to made all like it must be in good kernels)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - check for AMD64 long mode support is a really needed (you should do it, otherwise you can except some bug - I don't know why - check it if I correct)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - all is ok, - enabling 64bit page translations (regarding to documentation set - cr4.pae=1)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - setup pages tables&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - enable long mode (via EFER reg - setting LME to 1)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - enable paging in long mode (it will activate long mode and we're falling to compatibility mode)&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left; font-style: italic;"&gt;&lt;li&gt; - just jump to your 64bit code&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt; 64bit code:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul style="font-style: italic;"&gt;&lt;li&gt; - do your stuff, have a lot of fun ... ;)&lt;/li&gt;&lt;/ul&gt;I'm sure that there are direct long mode switching, but for me it was more quickly to make it like I've describe.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-429230441316047810?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/429230441316047810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=429230441316047810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/429230441316047810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/429230441316047810'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/amd64-1-long-mode.html' title='AMD64 #1 - Long Mode'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-1576144813767449649</id><published>2008-06-17T19:01:00.002+03:00</published><updated>2008-06-17T19:09:28.917+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='MuiString'/><category scheme='http://www.blogger.com/atom/ns#' term='mstring'/><category scheme='http://www.blogger.com/atom/ns#' term='microkernel'/><title type='text'>MuiString introduction</title><content type='html'>Ok, I've told many information about Jari and so on ... But it was just a buzz words.&lt;br /&gt;Now I want to present MuiString (mstring) microkernel project.&lt;br /&gt;What is done?&lt;br /&gt; - base structure&lt;br /&gt; - low level stuff&lt;br /&gt;How much time it will takes ? How long will I told about it without microkernel on legs ? Hm, so I think that this times ends in case of microkernel progress.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;I promise to write more technical things here and ... look for links below - &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MuiString homepage&lt;/span&gt; - &lt;a href="http://mstring.berlios.de"&gt;http://mstring.berlios.de&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;MuiString wiki&lt;/span&gt; - &lt;a href="http://mstring.berlios.de/wiki/"&gt;http://mstring.berlios.de/wiki&lt;/a&gt;&lt;br /&gt;I have a memory manager and core of scheduler in my sandbox, it's under testing and preparing to be committed to the general CVS repository.&lt;br /&gt;Look for my messages here soon.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-1576144813767449649?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/1576144813767449649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=1576144813767449649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/1576144813767449649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/1576144813767449649'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/muistring-introduction.html' title='MuiString introduction'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-6215333879470868421</id><published>2008-06-04T19:22:00.002+03:00</published><updated>2008-06-04T19:26:06.927+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='redleafd'/><title type='text'>Web fun - redleaf</title><content type='html'>How I wrote before - I opened a new project just for fun - and now it has releases and it's working - http://redleaf.berlios.de&lt;br /&gt;But there are no time for prolongate any active development - I've spent less than 10 hours for this, and in future this will so.&lt;br /&gt;If you want to take my flash point on this project - contact me, I'll be glad for it.&lt;br /&gt;Anyway, this project will be like my testing platform - and some kinds of tasks will be implemented within this and tested.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-6215333879470868421?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/6215333879470868421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=6215333879470868421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/6215333879470868421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/6215333879470868421'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/web-fun-redleaf.html' title='Web fun - redleaf'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-665294883395679770</id><published>2008-06-04T19:06:00.002+03:00</published><updated>2008-06-04T19:18:35.951+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='mstring'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><category scheme='http://www.blogger.com/atom/ns#' term='updates'/><title type='text'>Decomposing big project, separating is better</title><content type='html'>You can find more information on the link in the post title.&lt;br /&gt;Overally, following to the general idea - "separate all works and job to smaller ones" I decide to run microkernel separatly - like independed project.&lt;br /&gt;This intended to be more effective, for example - currently I have EZA layer working for 60% (not so stable) and this was made after reorganization of the microkernel structure - and this just for less then 10 hours of normal works on the problem.&lt;br /&gt;MString (MuiString) - is a name for Jari microkernel - and it's a new tag on this blog ;)&lt;br /&gt;Now I'm thinking on diferent than C/Cext language for server space - it's a big flame, but I'm thinking that fully functional languages or partly functional is better than typical imperativies  ones. Anyway, microkernel must be implemented on plain C - it's more comfortable language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-665294883395679770?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://mstring.berlios.de' title='Decomposing big project, separating is better'/><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/665294883395679770/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=665294883395679770' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/665294883395679770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/665294883395679770'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2008/06/decomposing-big-project-separating-is.html' title='Decomposing big project, separating is better'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-987130355134431257</id><published>2007-12-28T18:27:00.000+02:00</published><updated>2007-12-28T18:43:28.654+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='redleafd'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='opensource'/><category scheme='http://www.blogger.com/atom/ns#' term='httpd'/><title type='text'>Following to the Web 2.0 idiotism or more fun with web</title><content type='html'>Do you need web ? Speaking more - do you need web 2.0 ?&lt;br /&gt;No, I don't, but anyway in any cases of your open source development you need in the web, because it's a communicate point - where you can exchange some ideas/source code or other related stuff for your project.&lt;br /&gt;Exiting web servers are too feature overloaded or doesn't contain any features in your need. Also, you need CMS for your stuff - and most of them request from you apache, php, mysql, set of the many many libs ... And in the final phase you have an overloaded web server with there things, but you don't get that you want.&lt;br /&gt;The new try_to_run project is a redleaf - is a simple and small web server (already implemented) and a big set of modules targeted to the developers need. It includes the configurable CMS, small toys set - like C source code to html with highlighting converting and many other.&lt;br /&gt;You know already about monsters like sourceforge.net - yeah, now I'm working on the concept of the solution to make responsible for developers install and run the web software to get done.&lt;br /&gt;Currently, this project on the development stage, and httpd works already with all needed stuff and features.&lt;br /&gt;Why I need to do this ? So, it's just my fun like my old projects that was run, some of theirs working in the present days - like xneur - it was fun too ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-987130355134431257?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/987130355134431257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=987130355134431257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/987130355134431257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/987130355134431257'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2007/12/following-to-web-20-idiotism-or-more.html' title='Following to the Web 2.0 idiotism or more fun with web'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-7120561986988479792</id><published>2007-10-01T12:48:00.000+03:00</published><updated>2007-10-01T13:00:01.316+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GNU mach'/><category scheme='http://www.blogger.com/atom/ns#' term='development'/><category scheme='http://www.blogger.com/atom/ns#' term='microkernel'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><title type='text'>New directions, new profile, new ideas</title><content type='html'>Jari development has a new targets in development. The first of all we're decided to move our dev/hours to the exiting GNU mach microkernel and implement our ideas based on it. This decision based on the real time needs via the following points :&lt;br /&gt; - there are many trivial task thats simply takes the time on its&lt;br /&gt; - there are already exiting code base that can be used for Jari ideas&lt;br /&gt; - there are no time to create a newly microkernel from scratch&lt;br /&gt;The possible ways may be different and depends on the development flow in the time.&lt;br /&gt;I don't know yet if we will takes the GNU Hurd servers to modify and extend, but you can be sure we will split Jari ikernel and Jari EZA code base with the GNU Mach code base.&lt;br /&gt;With this objectivies I hope that we will ran in the early dates.&lt;br /&gt;Now, I've planned to get Jari run on the third decade of the 2009 with the minimal drivers set, libc, CLI and varios utilities.&lt;br /&gt;Look out this blog for further details in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-7120561986988479792?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/7120561986988479792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=7120561986988479792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7120561986988479792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7120561986988479792'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2007/10/new-directions-new-profile-new-ideas.html' title='New directions, new profile, new ideas'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-7469119232529883104</id><published>2007-04-11T15:01:00.000+03:00</published><updated>2007-04-11T19:53:59.405+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='notes'/><category scheme='http://www.blogger.com/atom/ns#' term='jari'/><title type='text'>Jari: small new things</title><content type='html'>While the low level under the heavy development stage, I'm returned to the compiler and some software. But about it by the way ...&lt;br /&gt;C compiler:&lt;br /&gt;We're developing the new C dialect, eC - stands for extended C.&lt;br /&gt;No, it doesn't mean the next C++ or something else. Our dialect targeted to functional programming. I will extend the C macros, add the lambda functionality, and optimize all works with the types.&lt;br /&gt;Also eC compiler will have a mechanism that will checks the works with pointers and variables to avoid the double malloc/free, it will be like an option.&lt;br /&gt;Backing to C, it will backward compatible i.e. you will be able to compile C sources with eC compiler.&lt;br /&gt;About this and other new features I will blog separately some later.&lt;br /&gt;LibC/LibeC:&lt;br /&gt;We will include the several memory allocation models, we will provide the standart alloc() and free(), but with it we're can offer the wrappers and callbacks to make the internal memory allocator simply and faster. You will be able to create struct mem_alloc_t and use it with your own way, with the libc/libec standart functions/politics or assign your function that preffered for your application. Also the libs will have several new functions for allocating memory - rt_alloc(), local_alloc(), ext_alloc(), func_alloc(), there functions will provide the more flexible parallel programming issues.&lt;br /&gt;In addition, libs will be extended for string operating functions, the libec will have the standart high customizable parser.&lt;br /&gt;coreutils:&lt;br /&gt;Core utils will includes tools for parallel task management, via this tools you can get ran processes via your cluster by the your custom way, run nonlocal architecture binaries on the needed node and other features.&lt;br /&gt;&lt;br /&gt;See for next blog messages, I will give here more examples and will describe all things written above.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-7469119232529883104?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/7469119232529883104/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=7469119232529883104' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7469119232529883104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/7469119232529883104'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2007/04/jari-small-new-things.html' title='Jari: small new things'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-116963794881410919</id><published>2007-01-24T12:39:00.000+02:00</published><updated>2007-01-24T13:25:48.930+02:00</updated><title type='text'>offtopic: m$ the big technologies brake</title><content type='html'>Microsoft is a big shit deals company, but it's sounds like fanatic scream.&lt;br /&gt;Okay, take a look for the arguments.&lt;br /&gt;The first of all and generally people says - "hey, solution from microsoft are totally used and it tells that it's a better solutions" - it's a typical disunderstanding about technology and marketing targeted *only* for domination and "big money must came to us totally". We're can compare non-IT products, but products that really depends on the technologies, in example - every day used thing A. What are you doing before the "big bought" ? You compare the avialable things on the market, what are principles of your choose? Generally you looking for a better look&amp;amp;feel, after this you are look for the functionality, price, quality etc ... Are you sure on this? I don't sure, the first you spamed via the advertisment and marketing action like - "hey look at this, it's a used by everyone, it's better ..." and for more than 60 percent this thing will be preffered on your choose.&lt;br /&gt;The same deal are applicable for the IT market, the end-user (non proffesional) will choose the product that has a more advertisment and if advertisment and marketing will be more aggressive the customer will be more targeted to the product. So, imaginate that a millions end-users attacked via the aggressive marketing, theirs don't thinking about functionality, there are thinking "if an advertisment is so sounds good, then product is good too". It's not a problem of the end-users it's a just big lack for bad business. Microsoft uses this way, it's mean that they don't improve the new features, stability, innovation and via intercepting the whole market they are kill all the ways to get the another concurrents, following this way the new thing in the business came - "Why we should to do something new and better if our products are buying ?". There are no concurrents and if there are coming to the market the microsoft killing its via the agressive marketing and brow up the set of the myth like "in the foo OS no stable, no features, it's a bad - choose our ones", or following with the another way - just buying another companies and closing the projects (remember Xenix for example).&lt;br /&gt;But if you can see there are no fundamentally changes on the microsoft products long the many years. New GUI? New incompatible within formats? New animations? New installation programs? it's a things just for emulating that they doing something - for customers, otherwise customers didn't buy the new products and didn't pay for the microsoft.&lt;br /&gt;But there are some limitations, the first leak of this business strategy that world contains not only end-users, the second leak is that selling products an ugly, the third leak that anyway microsoft must support their products, in short words I mean that there are many professional people that can analyze with system methods exiting solution and tell - "hey! folks! it's a big piece of shit!" and they are will be right. The other thing it's a critical industry that includes an industry automatic systems, science research that needs no for good GUI or pretty looks pooks, they are need for stable and featured product, that has a functionality, it's a 24x7 servers, embedded systems, industrial system, computer clusters, distributed networks, and other critical systems.&lt;br /&gt;In this case microsoft will never shift out other, better solution from this segments. But thinks, that segments has a new innovations and for working with them end-user need have a features and new functionality, but microsoft doesn't do it or do it too slowly and ugly (remember when microsoft approved the tcp/ip stack and improve network support for their products and how it's ugly implemented for the current time). Microsoft sets a technology brake for others including developers, end-users, science, etc ...&lt;br /&gt;But it cannot be eternal process, and now microsoft marketing department know about it, but there doesn't follow via the right way - the right way is a perform a better solutions in a products, compare win 200 with win xp - do you something new, excluding GUI look ? There are nothing, take a look for vista_ something new, excluding poor resource using and new GUI ? The answer is no, so why the microsoft will lay to the customers that linux is bad, that linux is old, that price of the linux solution is big - okay okay, but what the things are microsoft can offer for exchanging unixes ? There are nothing.&lt;br /&gt;Think deeper, microsoft will die or redirected to the support and porting their products to the linux and get this segment.&lt;br /&gt;&lt;br /&gt;Questions?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-116963794881410919?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/116963794881410919/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=116963794881410919' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/116963794881410919'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/116963794881410919'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2007/01/offtopic-m-big-technologies-brake.html' title='offtopic: m$ the big technologies brake'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-116955596450599880</id><published>2007-01-23T12:23:00.000+02:00</published><updated>2007-01-23T14:39:24.546+02:00</updated><title type='text'>Microkernels: the bad or good ?</title><content type='html'>Last days I've summarized my opinions about different architectures of the operating systems kernels such as classic monolitic kernel, as an exokernel and microkernel.&lt;br /&gt;Summarizing,  all concepts  have a self weak points and we're need to select a better solution that will correlating a perfomance, stability and security.&lt;br /&gt;In this case I take a look to the microkernel architecture.&lt;br /&gt;The some myth with the microkernels:&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Low perfomance&lt;/span&gt;,  do you ready to loss just 5-10% of perfomance switching to the stable OS? I think your reply is yes. Many systems use there resources for the overloaded interface or architecture addons that trying to do a best stability. In example a nooks layer in the linux kernel, or solution from the microsoft research - singularity, that not so good, because it's takes points from the perfomance and look like an ugly addon to the worth architecture.&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Non trivial implementation&lt;/span&gt;, it's sounds with smiley. On the same deal it's not a true. Just compare simply of the GNU mach microkernel with linux kernel, or minix3 with the *bsd kernel. Of couse you can said that - "the linux kernel contains a big set of the drivers for devices, filesystems etc ...", but just think how it's hard to maintain this. Microkernel haven't a large number of the source code lines, it's a simple to review it, fix and update with new things, that makes it more pretty for maintain and fixing.&lt;br /&gt;Just imaginate that you have a stable and secure system with all included innovations if needed. It's like a software on your mp3/ogg player that can  works stable for many times without updates and many more things that you need on the linux or m$ windows.&lt;br /&gt;All kernel servers are separated from each other and device driver in example cannot down all the system, in example you are working with the big document and some device driver (for your scsi controller in example) falling off, in this case all the request in the microkernel are cached and system process reload this driver and reply the requests, and you are continuing the job thinking that nothing happened, on the classic kernels you will take a look to the kernel panic or BSoD and all your job will be lost.&lt;br /&gt;In addition, did you see a good abstraction in the Operating System, where you don't think about file system location? This is a simple job for the microkernel architecture.&lt;br /&gt;In example, you came to the office and turn on your notebook the system detects your placement and starting to work with the office shared filesystem, and you don't care where is it located? What I need to mount/ add the volume to do this job - I really don't care. On both systems *nix and m$ windows I need to mount a NFS volume or add the logical volume via windows network and take care with back up ones or other things.&lt;br /&gt;By the way, with the microkernel you don't need to have hardcoded things that can affect your perfomance and other varios things, all is modular.&lt;br /&gt;Like a postscript I want to tell you - user friendly system is a not a system with pretty look interface, it's a stable and simple system for both end-users and developers, where you don't think about system security and permanent drivers installations and rebooting.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-116955596450599880?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/116955596450599880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=116955596450599880' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/116955596450599880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/116955596450599880'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2007/01/microkernels-bad-or-good.html' title='Microkernels: the bad or good ?'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-116099051931843159</id><published>2006-10-16T12:01:00.000+03:00</published><updated>2006-10-16T12:21:59.326+03:00</updated><title type='text'>Jari OS introduction</title><content type='html'>How I wrote later, I don't like anything from the existing operating system.&lt;br /&gt;There are no innovations on theirs.&lt;br /&gt;So, you can tells to everybody that all is sucks, but do nothing - it's a not a good way to make a better something that sucks for your opinion.&lt;br /&gt;Otherwise, I decide to realize a better look to the operating systems wide in the my research project called "Jari".&lt;br /&gt;Jari is an OS that will contains a new way of kernels, servers set, system libs, core utils and C compiler, maybe if the project will have a success it will be contain a Lisp compiler and most of the libs and users program will be written on it, but it's a long future plans.&lt;br /&gt;Now I'm working with my friend on the kernel and servers.&lt;br /&gt;Kernel has a three rings - the kernel space, the servers space and the user space levels, it's a not a microkernel in the basic opinion, it's a advanced microkernel model.&lt;br /&gt;In the Jari we're have a abstraction atom - is a file, server is a file, cpu is a file etc , but it's not looks like a standart UNIX paradigm, in the Jari we're have an advanced VFS, in example not on all unixes we're have a VFS.&lt;br /&gt;So, just imaginate - on the Jari we're have an exec() on the VFS.&lt;br /&gt;Another thing - we're don't have a big and hard API for intercommunicating with kernel or server, this is a protocol tasks (it's called JP(Jari Protocol)). In example - for running process A on the friend node B you just need to make a frame of the protocol and all. Yes, here we're have a not so light caching and buffering mechanism, but it's a not so hard - in the Jari we're use a development model that mean - "each of the system makes a small task, but many system does a big task" ie each of the kernel part makes a simple task, but all the kernel do any tasks by each of other system.&lt;br /&gt;And in addition, I'm developing now a new filesystem for supporting all the Jari paradigms, but generally we're separate a task ie fs doesn't makes a things on the IPC object or anything other.&lt;br /&gt;&lt;br /&gt;To be continued ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-116099051931843159?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/116099051931843159/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=116099051931843159' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/116099051931843159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/116099051931843159'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2006/10/jari-os-introduction.html' title='Jari OS introduction'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-115935115706741738</id><published>2006-09-27T12:38:00.000+03:00</published><updated>2006-09-27T12:59:17.080+03:00</updated><title type='text'>Operating Systems: Crisis or reburning ?</title><content type='html'>Many people told me about good sides of the different OSes, but I'm don't find something new and ready-for-use innovation features in the OSes.&lt;br /&gt;All unixes family has an old philosophy that doesn't support and can't support a good cluster technology. There are a problem of the architecture limits. Developers said -"Hey, we must to do threads it's a good and fast", but nobody from theirs all don't think that threads cannot migrate between nodes in example. Theirs don't thinks about flexibility in generally.&lt;br /&gt;Yes, now I talking about kernels, take a look for the linux kernel, it's a huge trash of the infinite features. They includes a buggy source code for features, *bsd otherwise, they don't include something new, but trying to make a sense of the security and stable features. But we don't have an innovations both in linux or *bsd.&lt;br /&gt;The main reason is the really old architecture.&lt;br /&gt;I'm don't speak about closed OSes such as Solaris or non-unix OS m$ windows - it's a deadly OSes without future.&lt;br /&gt;So, I think that in the time we will see new concept of the kernels and OSes generally, but who ia ready fir this?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-115935115706741738?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/115935115706741738/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=115935115706741738' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/115935115706741738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/115935115706741738'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2006/09/operating-systems-crisis-or-reburning.html' title='Operating Systems: Crisis or reburning ?'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34849900.post-115892826116165067</id><published>2006-09-22T15:07:00.000+03:00</published><updated>2006-09-22T15:31:01.183+03:00</updated><title type='text'>bash completion mini-HOW-TO</title><content type='html'>So, while zsh doesn't supports an unicode, I've tried to add completion functionality to the bash.&lt;br /&gt;I think that this maybe useful for somebody.&lt;br /&gt;There are lines from my ~/.bashrc file:&lt;br /&gt;&lt;br /&gt;&lt;blockquote style="color: rgb(51, 204, 0);"&gt;shopt -s extglob &lt;span style="font-style: italic;"&gt;#it's a needable for the bash completion support&lt;/span&gt;&lt;br /&gt;set +o nounset&lt;br /&gt;&lt;br /&gt;complete -A hostname rsh rcp telnet r ftp ping fail #the standart completion&lt;br /&gt;complete -A export printenv&lt;br /&gt;complete -A variable export local readonly unset&lt;br /&gt;complete -A enabled    builtin&lt;br /&gt;complete -A alias      alias unalias&lt;br /&gt;complete -A function   function&lt;br /&gt;complete -A user       su mail finger&lt;br /&gt;&lt;br /&gt;complete -A helptopic  help     &lt;span style="font-style: italic;"&gt;# currently same as builtins&lt;/span&gt;&lt;br /&gt;complete -A shopt      shopt&lt;br /&gt;complete -A stopped -P '%' bg&lt;br /&gt;complete -A job -P '%'     fg jobs disown&lt;br /&gt;&lt;br /&gt;complete -A directory  mkdir rmdir&lt;br /&gt;complete -A directory   -o default cd&lt;br /&gt;&lt;br /&gt;complete -f -o default -X '*.+(zip|ZIP)'  zip &lt;span style="font-style: italic;"&gt;#there is completion for the some tools that works&lt;/span&gt; with filenames&lt;br /&gt;complete -f -o default -X '!*.+(zip|ZIP)' unzip&lt;br /&gt;complete -f -o default -X '*.+(z|Z)'      compress&lt;br /&gt;complete -f -o default -X '!*.+(z|Z)'     uncompress&lt;br /&gt;complete -f -o default -X '*.+(gz|GZ)'    gzip&lt;br /&gt;complete -f -o default -X '!*.+(gz|GZ)'   gunzip&lt;br /&gt;complete -f -o default -X '*.+(bz2|BZ2)'  bzip2&lt;br /&gt;complete -f -o default -X '!*.+(bz2|BZ2)' bunzip2&lt;br /&gt;&lt;br /&gt;complete -f -o default -X '!*.ps'  gs ghostview ps2pdf ps2ascii&lt;br /&gt;complete -f -o default -X '!*.dvi' dvips dvipdf xdvi dviselect dvitype&lt;br /&gt;complete -f -o default -X '!*.pdf' acroread pdf2ps&lt;br /&gt;complete -f -o default -X '!*.+(pdf|ps)' gv&lt;br /&gt;complete -f -o default -X '!*.texi*' makeinfo texi2dvi texi2html texi2pdf&lt;br /&gt;complete -f -o default -X '!*.tex' tex latex slitex&lt;br /&gt;complete -f -o default -X '!*.lyx' lyx&lt;br /&gt;complete -f -o default -X '!*.+(htm*|HTM*)' lynx html2ps&lt;br /&gt;&lt;br /&gt;complete -f -o default -X '!*.+(jp*g|gif|xpm|png|bmp)' xv gimp&lt;br /&gt;complete -f -o default -X '!*.+(mp3|MP3)' mpg123 mpg321&lt;br /&gt;complete -f -o default -X '!*.+(ogg|OGG)' ogg123&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;complete -f -o default -X '!*.pl'  perl perl5&lt;br /&gt;&lt;br /&gt;_get_longopts ()&lt;br /&gt;{&lt;br /&gt;   $1 --help | sed  -e '/--/!d' -e 's/.*--\([^[:space:].,]*\).*/--\1/'|    grep ^"$2" |sort -u ;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;_longopts_func () #there are functions for the long function in example for configure&lt;br /&gt;{&lt;br /&gt;   case "${2:-*}" in&lt;br /&gt;   -*)    ;;&lt;br /&gt;   *)    return ;;&lt;br /&gt;   esac&lt;br /&gt; &lt;br /&gt;   case "$1" in&lt;br /&gt;   \~*)    eval cmd="$1" ;;&lt;br /&gt;   *)    cmd="$1" ;;&lt;br /&gt;   esac&lt;br /&gt;   COMPREPLY=( $(_get_longopts ${1} ${2} ) )&lt;br /&gt;}&lt;br /&gt;complete  -o default -F _longopts_func configure bash&lt;br /&gt;complete  -o default -F _longopts_func wget id info a2ps ls recode&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;_make_targets ()&lt;br /&gt;{&lt;br /&gt;   local mdef makef gcmd cur prev i&lt;br /&gt; &lt;br /&gt;   COMPREPLY=()&lt;br /&gt;   cur=${COMP_WORDS[COMP_CWORD]}&lt;br /&gt;   prev=${COMP_WORDS[COMP_CWORD-1]}&lt;br /&gt; &lt;br /&gt;   # if prev argument is -f, return possible filename completions.&lt;br /&gt;   # we could be a little smarter here and return matches against&lt;br /&gt;   # `makefile Makefile *.mk', whatever exists&lt;br /&gt;   case "$prev" in&lt;br /&gt;   -*f)    COMPREPLY=( $(compgen -f $cur ) ); return 0;;&lt;br /&gt;   esac&lt;br /&gt; &lt;br /&gt;   # if we want an option, return the possible posix options&lt;br /&gt;   case "$cur" in&lt;br /&gt;   -)      COMPREPLY=(-e -f -i -k -n -p -q -r -S -s -t); return 0;;&lt;br /&gt;   esac&lt;br /&gt; &lt;br /&gt;   # make reads `makefile' before `Makefile'&lt;br /&gt;   if [ -f makefile ]; then&lt;br /&gt;   mdef=makefile&lt;br /&gt;   elif [ -f Makefile ]; then&lt;br /&gt;   mdef=Makefile&lt;br /&gt;   else&lt;br /&gt;   mdef=*.mk               # local convention&lt;br /&gt;   fi&lt;br /&gt; &lt;br /&gt;   # before we scan for targets, see if a makefile name was specified&lt;br /&gt;   # with -f&lt;br /&gt;   for (( i=0; i &lt; ${#COMP_WORDS[@]}; i++ )); do     if [[ ${COMP_WORDS[i]} == -*f ]]; then         eval makef=${COMP_WORDS[i+1]}       # eval for tilde expansion         break     fi     done         [ -z "$makef" ] &amp;&amp;amp; makef=$mdef         # if we have a partial word to complete, restrict completions to     # matches of that word     if [ -n "$2" ]; then gcmd='grep "^$2"' ; else gcmd=cat ; fi         # if we don't want to use *.mk, we can take out the cat and use     # test -f $makef and input redirection     COMPREPLY=( $(cat $makef 2&gt;/dev/null | awk 'BEGIN {FS=":"} /^[^.#   ][^=]*:/ {print $1}' | tr -s ' ' '\012' | sort -u | eval $gcmd ) )&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;complete -F _make_targets -X '+($*|*.[cho])' make gmake pmake&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# cvs(1) completion&lt;br /&gt;_cvs ()&lt;br /&gt;{&lt;br /&gt;   local cur prev&lt;br /&gt;   COMPREPLY=()&lt;br /&gt;   cur=${COMP_WORDS[COMP_CWORD]}&lt;br /&gt;   prev=${COMP_WORDS[COMP_CWORD-1]}&lt;br /&gt; &lt;br /&gt;   if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then&lt;br /&gt;   COMPREPLY=( $( compgen -W 'add admin checkout commit diff            export history import log rdiff release remove rtag status            tag update' $cur ))&lt;br /&gt;   else&lt;br /&gt;   COMPREPLY=( $( compgen -f $cur ))&lt;br /&gt;   fi&lt;br /&gt;   return 0&lt;br /&gt;}&lt;br /&gt;complete -F _cvs cvs&lt;br /&gt;&lt;br /&gt;# svn completion , I'm not sure that this all is right&lt;br /&gt;_svn ()&lt;br /&gt;{&lt;br /&gt;   local cur prev&lt;br /&gt;   COMPREPLY=()&lt;br /&gt;   cur=${COMP_WORDS[COMP_CWORD]}&lt;br /&gt;   prev=${COMP_WORDS[COMP_CWORD-1]}&lt;br /&gt; &lt;br /&gt;   if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then&lt;br /&gt;   COMPREPLY=( $( compgen -W 'add admin checkout commit diff            export history import log rdiff release remove rtag status            tag update' $cur ))&lt;br /&gt;   else&lt;br /&gt;   COMPREPLY=( $( compgen -f $cur ))&lt;br /&gt;   fi&lt;br /&gt;   return 0&lt;br /&gt;}&lt;br /&gt;complete -F _svn svn&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;_killall ()&lt;br /&gt;{&lt;br /&gt;   local cur prev&lt;br /&gt;   COMPREPLY=()&lt;br /&gt;   cur=${COMP_WORDS[COMP_CWORD]}&lt;br /&gt; &lt;br /&gt;   # get a list of processes (the first sed evaluation&lt;br /&gt;   # takes care of swapped out processes, the second&lt;br /&gt;   # takes care of getting the basename of the process)&lt;br /&gt;   COMPREPLY=( $( /usr/bin/ps -u $USER -o comm  |    sed -e '1,1d' -e 's#[]\[]##g' -e 's#^.*/##'|    awk '{if ($0 ~ /^'$cur'/) print $0}' ))&lt;br /&gt; &lt;br /&gt;   return 0&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;complete -F _killall killall killps&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;# A meta-command completion function for commands like sudo(8), which need to&lt;br /&gt;# first complete on a command, then complete according to that command's own&lt;br /&gt;# completion definition - currently not quite foolproof (e.g. mount and umount&lt;br /&gt;# don't work properly), but still quite useful - By Ian McDonald, modified by me.&lt;br /&gt;&lt;br /&gt;_my_command()&lt;br /&gt;{&lt;br /&gt;   local cur func cline cspec&lt;br /&gt; &lt;br /&gt;   COMPREPLY=()&lt;br /&gt;   cur=${COMP_WORDS[COMP_CWORD]}&lt;br /&gt; &lt;br /&gt;   if [ $COMP_CWORD = 1 ]; then&lt;br /&gt;   COMPREPLY=( $( compgen -c $cur ) )&lt;br /&gt;   elif complete -p ${COMP_WORDS[1]} &amp;&gt;/dev/null; then&lt;br /&gt;   cspec=$( complete -p ${COMP_WORDS[1]} )&lt;br /&gt;   if [ "${cspec%%-F *}" != "${cspec}" ]; then&lt;br /&gt;    # complete -F &lt;function&gt;&lt;br /&gt;    # COMP_CWORD and COMP_WORDS() are not read-only,&lt;br /&gt;    # so we can set them before handing off to regular&lt;br /&gt;    # completion routine&lt;br /&gt;    # set current token number to 1 less than now&lt;br /&gt;       COMP_CWORD=$(( $COMP_CWORD - 1 ))&lt;br /&gt;    # get function name&lt;br /&gt;       func=${cspec#*-F }&lt;br /&gt;       func=${func%% *}&lt;br /&gt;    # get current command line minus initial command&lt;br /&gt;       cline="${COMP_LINE#$1 }"&lt;br /&gt;    # split current command line tokens into array&lt;br /&gt;       COMP_WORDS=( $cline )&lt;br /&gt;       $func $cline&lt;br /&gt;   elif [ "${cspec#*-[abcdefgjkvu]}" != "" ]; then&lt;br /&gt;    # complete -[abcdefgjkvu]&lt;br /&gt;    #func=$( echo $cspec | sed -e 's/^.*\(-[abcdefgjkvu]\).*$/\1/' )&lt;br /&gt;       func=$( echo $cspec | sed -e 's/^complete//' -e 's/[^ ]*$//' )&lt;br /&gt;       COMPREPLY=( $( eval compgen $func $cur ) )&lt;br /&gt;   elif [ "${cspec#*-A}" != "$cspec" ]; then&lt;br /&gt;    # complete -A &lt;type&gt;&lt;br /&gt;       func=${cspec#*-A }&lt;br /&gt;       func=${func%% *}&lt;br /&gt;       COMPREPLY=( $( compgen -A $func $cur ) )&lt;br /&gt;   fi&lt;br /&gt;   else&lt;br /&gt;   COMPREPLY=( $( compgen -f $cur ) )&lt;br /&gt;   fi&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;complete -o default -F _my_command nohup exec eval trace truss strace sotruss gdb&lt;br /&gt;complete -o default -F _my_command command type which man nice&lt;br /&gt;&lt;/type&gt;&lt;/function&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34849900-115892826116165067?l=0xffffffc0h.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://0xffffffc0h.blogspot.com/feeds/115892826116165067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34849900&amp;postID=115892826116165067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/115892826116165067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34849900/posts/default/115892826116165067'/><link rel='alternate' type='text/html' href='http://0xffffffc0h.blogspot.com/2006/09/bash-completion-mini-how-to.html' title='bash completion mini-HOW-TO'/><author><name>Supervisor</name><uri>http://www.blogger.com/profile/08902164699244474146</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://bp1.blogger.com/_IoVmxPCd5fk/SFuvWcQzLNI/AAAAAAAAAfc/VEW7vuWeyK8/S220/elk02.jpg'/></author><thr:total>0</thr:total></entry></feed>
