13 May 2005

The Road to Sys Admin Magazine......

Thursday, May 12th 2005.... after 3 months of hard work, my writing about Staircase scheduler was finally finished. Certainly not an easy task, because previously I thought this would be a bit easier than what I had done for IBM DeveloperWorks publication. But it is proved to be totally false.....

But let's throw out the "pain side"......here are the "lovely side"
1. Understanding scheduler code better. I said "better", not 100% mastering it. By looking at the core code everyday, slowly but sure I gain insight on how kernel schedulers do their works. For example: how the scheduler maintains global statistics, how time slice is actually assigned, preemption policy, etc

2. Re-exercising my statistic skill. Statistics play important here, because it helps me to understand the behaviour of a scheduler in number. Although scheduler is made to tackle dynamic situation which is unpredictable and doesn't follow certain statistic distribution, we still need to quantify it using everything we got. No fancy stuff here, just plain average, standart deviation, exponential regression, and scaling.

3. Learning boot scripts sequence. Not hard, only a bit tricky. I only need to find out where to put commands to be executed after the moment Linux enter single user state.

4. Bash scripting. Eufhh, this is the first I combine tbe knowledge of two opposite worlds (kernel space and user space) and put them into a single job. Scripting does the magic here to automate my testing procedure. Anyway, who wants to sit for 4 hours just to wait and type commands after a single iteration of benchmark is done? Type them into scripts, do several try out....launch them, extract the result using "grep"...and kazaaammm, you get the results without pain in the ass :-) Isn't that great?

5. Intensive discussion with many people (mostly are kernel hackers). "Hackers" here are not someone who breaks into a website and buy something with other people's credit card. No, far from it. I am referring to a person who write codes and has deep understanding of an operating system. Since I was writing about scheduler, I contacted people who work on scheduler area. The most wanted hacker is Con Kolivas, of course. The rest are Jake Moilanen, Rick Lindsley, Zwane Mwaikambo. Too bad I missed Ingo Molnar.... From these intensive discussions, I try to merge their ideas with mine, get the best from both sides and throw the useless part and put them as "sentences".

6. Improving my English writing :-) "Practice makes perfect", that's what I heard, and that's what I was doing. You can say that I am kinda of man who learn almost 99% of his own skill purely from exercise and self learning. Surely theory is helpful, but what can we do if we just "know" without actually "understand" and "implement"?

Now, the article has been submitted...the only thing left is awaiting the editorial feedback. Previously, the technical editor had sent me "green light", meaning it had big chance to enter the printed version of the magazine. Great ! I wish once it is actually published, the readers will learn a bit more about schedulers and how to pick one according to their need.

And...next stop? I am thinking about ClusterWorld again..or Linux Magazine....

12 April 2005

Things I learned from Linux kernel :))

The title might sounds funny for some people, especially for non "geek" (Hey, I am not a geek, I dig Linux internal for money :) ). usually, when we want to code something into computer "realm", humans bring analogy and perception he has and tranform it into block of codes. But in my case, the reverse happens, looks like I learn several stuffs from Linux kernel (version 2.4.x and 2.6.x). Note: Linux kernel itself is a result of bunch of people's ideas and thinking, thus as the time goes (more than a decade), it is getting stable and mature.

OK, here we are:

1. Top halves and bottom halves. In Linux, kernel acknowledges incoming interrupt (e.g. keyboard), grab the important data and put it into a buffer and defers the real task sometime later via bottom halves. This trick make sure interrupt is acknowledged fast but the kernel itself won't get busy doing things everytime interrupt comes

What I learned : Response fast if you face something emergency. Take a note on every important facts or interesting event. Then, if this thing doesn't risk your life or bring doomsday, I am sure it can be "deferred". Later, if there is no higher priority task than those emergency events, I'll try to work on it

Example: brainstorming for article idea. I got idea, i write it down on my agenda...and later ....I'll working on it

2. Dynamic priority of individual task. On Linux kernel,it tries to award bonuses toward a task which sleeps a lot and punish a task which hogs CPU. Periodic sleep is considered a sign by most kernel developer that the task is interactive task, thus whenever it is woken up, it needs to react and run again as fast as possible. At the time a process sleep, the scheduler will pick another runnable process with highest dynamic priority

What I learned: First of all, it doesn't mean that I told you to sleep a lot :)) (more than 10 hours of sleep, gee, low blood pressure? go to a doctor !).

Second, sometimes we are dealing with a kind of task that heavily depends (or probably 100%?) on the response of external sources. What happen if the response we are waiting for isn't arrived yet? Force it? If you can, do so....but if you can't, the best you can do is wait. I know it sounds boring, but sometimes life gives us limited (hard) choice. While awaiting, you can do another job or simply rest. If the response comes, react as fast as you can while suspending everything you do.

Example: It happened to me while searching the answer for "how to make cache condition nearly the same everytime I do mysql benchmark?" Several possible solution fell down from the sky after 3-4 days. So, I simply drop it and do another writing...but still let my brain open for new ideas. when an idea seems like a reasonable one....i quickly test it.

The opposite also happens. Writing mainly occupied my daily life, but I also start an IT consultancy firm. When writing "hogs" my time, I try to lower its priority so I can work on something else, especially when dealing with new clients. This way, clients won't feel abandoned, the business is rolling and I can still write :)

3. Demand paging and Copy on Write, study case on forking new task. Linux has unique method called demand paging whenever it creates new process address space. It does the memory mapping, but it doesn't actually allocates pages for the new task (let's say, when you execute Firebird). So when it allocates a page? If a task refers to a linear address that is mapped to non existent page (but still inside valid address space), kernel will generate page fault, grab the data from block device (e.g. hard disk) and store it on a page frame inside process' VMA list

Copy on Write has another story, if a task fork new child, the child will be assigned (via pointer) the pages of its parent but marked as read only. When the child writes something on it, the memory management system will copy the page into the child's address space. This way, memory usage will be conserved and prevent a worst case, fork-then-exec..because if you do copy the whole pages of parent and then throw it again....guess what....memory thrashing !

What I learned: I try to widen my perspective, but I consider it as milestone only. To fill the actual knowledge, I learn it step by step. This way, I grow with the same speed as my brain grows :) I don't think, being smart but end up in mental house is a smart choice :)

Example: Doing business (real business, not "busy"-ness ) is a tough thing to do (at least for me). There are many things demand big attention. But, there is always major rule such as doing preliminary approach, make proposals, negotiating fee, etc etc. If you try to mmap()-ing all business aspects in your brain, i guess you will get segfault under 5 seconds, maybe a bit longer if you take viagra :) (will you test it for me? ) :)))

cu soon !

25 March 2005

Iklan dengan sentuhan bela diri

Ini dia topik omongan paling favorit gw....bela diri ! belakangan gw lihat ada dua iklan yang sangat bagus menampilkan koreografi:
1. Iklan Shampoo Clear
2. Iklan rokok Surya Pro

Kebetulan juga, dua duanya ini memakai gerakan-gerakan bela diri asal Brazil, namanya capoeira. Capoeira menurut sejarahnya diciptakan oleh budak-budak di Brazil pada jaman penjajahan Portugis. Karena tangan mereka diraintai erat, maka diciptakanlah gerakan menyerang dan bertahan yang mengandalkan gerakan kaki dan bertumpu pada tangan pada beberapa variasi gerakan.

Jika loe pernah lihat tae kwon do dan merasa udah kagum ama tendangannya, maka pastikan lihat gerakan capoeira di 2 iklan itu dan loe bakal menyadari ternyata badan manusia bisa melintir dan berputar dengan variasi tendangan yang hampir tak terbatas. Apalagi di iklan surya pro, perhatikan...ada teknik tendangan putar di udara yang sekaligus memutar dua kaki secara bersamaan. Teknik ini namanya cabecada (gw dikit dikit ingat dari istilah2x nya di game tekken, soalnya di tekken karakter gw pake ahli capoeira juga). Dilihat mungkin sekilas tidak butuh tenaga, tapi yang jelas kalo loe gak stretching dulu dan tiba2x coba gerakan ginian, pasti minimal loe malem2x pasang koyo cabe 10 biji di kaki ama pinggang loe :))))

Mungkin kalo soal art, capoeira ini cuma bisa ditandingi ama wushu (ini kungfu juga, cuma teknik yang udah distandartkan). yang gue ingat, iklan mastercard yang menampilkan Zhang Zi Yi. Zhang disitu pake teknik pedang yang lumayan bagus dan wire-fu nya lumayan juga, pretty smooth pergerakan. In short, terlihat natural. Sayang gak jelas siapa martial choreographer nya. Biasanya yang bisa level koreografi bagus gitu cuma dua orang, kalo gak master Yuen Wo Ping (koreografer trilogi Matrix, Kung Fu master, Taichi master), ya master Corey Yuen (saudara seperguruan jacky chan dan samo hung, handle koreografi XMen, romeo must die, craddle to the grave)

Tinggal satu yang kurang: kapan iklan yang secara apik menampilkan pencak silat? dulu kayaknya ada di iklan Dji Sam Soe, tp seperti minim banget gregetnya. Padahal kembangan silat itu secara pergerakan cukup bagus, terutama sapuan bawah dan pukulan pukulan jarak pendek.

Any comments people?

01 March 2005

"You won't truly know someone until you fight them...."

The above quote comes from a movie titled Matrix reloaded. For those
who don't know what Matrix is or really don't have any clue on what it
is, I will explain it a bit. Matrix is a sci-fi movie describing about
human race live under computer control. These humans are grown on
a very very large field. Yes, grown, not born. And computer (or let's
just say robot with superb Artificial Intelligent) are sucking the electricity
generated by human body. Well, using a lowly physics, you will realize that
human body do generates electricity....

And when actually the words come out? Recall when Neo visits Seraph on
tea depot. Seraph is the guardian of Oracle and he is the one who in charge
on allowing or forbidding someone to meet Oracle, or worse..to destroy anyone
who want to harm Oracle. So, Neo visit Seraph in hope to guide him and show
where Oracle is. Right at the time Neo meet Seraph, Neo ask Seraph to
guide him....and Seraph reply "I can take you to her, but first I must apologize.."
And then...whamm, a kungfu fight is started. The fight lasts in about 5 minute
and Seraph give signal to stop a fight.

Seraph said "I need to be sure that you are actually The One" Neo replied
" You could just ask..". And Seraph (here it comes, my favourite quite) said
"No, you won't truly someone until you fight them"...

So, what is the moral of the story? try to teach you about brutality? Or introducing
new concept that fighting is a brilliant way to get familiar with someone?
Not at all. Here is my understanding. Sometimes we are in deep need to know
someone, right? I mean, yeah, you try to understand his/her mind, try to
hook up with a girl, convince yourself that he or she is the right team mate
on your office and so on. In short, kinda of close relationship. If you are
a sane man, you obviously need to know him/her better, because..if not,
bad thing can happen sooner or later. Man is not a paper with clear bold character
printed on top of it so you can easily understand him thoroughly

recently, I also have similar problems. I thought I truly know some of
my friends...and yes, silly me, the great news is I don't know them entirely.
But accidentally, problems are coming one by one. Through the problems,
I can understand my friends better and perhaps they can understand me better either.
Some of the cases reveals the unseen bright side, but the rest reveals the bad side.
And thank God, by this experience I can learn a lot about them.

The conclusion is: dont underestimate the positive effect of suffering problems
related with someone. Maybe it can make the relationship better...but also
prepare for the worst. sometimes you need to introduce a competition, a debate
, even a fight (if you have to, but think twice okay?) to test your friendship.
If you can go through, congratulations....you both grow...if not, well..don't be sad.
Bad things happen sometimes. Either good or bad, you will gain precious lessons.

"everything has purpose...purpose defines us"

22 February 2005

Constantine.....

No, I am not going to talk about Russian emperor or Russian witch
or stuff like that. This is a title of new movie starring Keanu Reeves.
here, Keanu reeves plays as Constantine, a supernatural detective who
work to "send devil back to the place they belong"...in short...hell :)

The interesting things about Constantine are:
1. He was born with unusual gift. He can see devils in their real form
and communicate with them. Now, if you are 3 years old kid with this
ability, you must be scare to the death looking old women with melted face :)

2. He smokes a lot .... a lot here truly means God damn tons of cigarrette :).
There are many scenes show Constantine cough so badly, perhaps an acute TBC?
Don't worry, Constantine won't die so easily. In fact, if he dies, he can just
call Lucifer to cancel it :)) Now, tell me, is it awesome or what?

3. His weapons...Jesus, cool ! I saw a shotgun with cross shape. The bullets
are filled with some sort of holy water, so it can destroy demons. There is
also a weapon called "Dragon breath", guess what...it spills out fire ! Don't
forget, a steel ring crafted with cross sign, COnstantine wear it on his
knuckles to knock out Balthazar ! Wait, he also bring Bible .... certainly
not to be read in the middle of shooting demons :)))

4. Constantine was committed a suicide when he was young (not sure
how old he was at that time). He died and he should entered hell for his
action. Here, I am not sure, but Constantine back to earth realm in exchange...
well, you can say, a holy work...to send devils back to hell.

Although COnstantine is not an Oscar level movie with awesome storyline,
I must say this movie brings us a different perspective. What kind of
perspective? Perspective that devil and angels are actually far far away
from us, but they bring influence to our life. If you go with angels (let's
assume God is also on angel's side, shall we?), you will approach
salvation. What if you go with devil, certainly you will get near to
self destruction. I personally call it "lock, stock and two smoking barrels"
:))

Another positive message from this movie, everyone deserve second chance.
Maybe you do something really nasty in the past (actually, who doesn't anyway?)
Hey, we are mortals with tons of weakness, right? So, get up, ask for His
forgiveness and go within God's way. "What if I fall again?" OK...are
you so badly injured? I guess not, so get up again and repeat the same
routine. Eventually, you will enter Heaven and peace be with you eternally.
End of story.....

The similarity between me and Constantine? That story will stay with
me 'till the day I die.....

21 February 2005

Pemikiran terhadap pernyataan Sekretaris MUI

Yth Bapak Din Syamsudin dan fungsionaris MUI terkait

Sebelum tulisan ini saya lanjutkan, saya himbau pada siapapun yang kebetulan mampir dan membaca tulisan ini agar sejenak berdoa dulu kepada Tuhan YME agar diberi penerangan mata batin dan akal dan dijauhkan dari bisikan setan yang hendak memanipulasi diri kita. Saya sendiri sempat merenung lama dan meminta petunjuk Tuhan agar tulisan saya ini tidak tendensius namun semata menyuarakan kebenaran.

Dari pemberitaan salah satu stasiun TV swasta Indonesia pada sekitar minggu ke-2 Januari 2005, ada sebuah statement dari sekretaris MUI yang kurang lebih isinya sbb (mari berdoa ingatan saya masih segar) "kami mensinyalir ada sebuah kelompok fundamentalis Kristen yang hendak mengadopsi anak-anak Aceh dan memurtadkan mereka......" Sekarang mari kita kupas isi kalimat yang sederhana namun penuh makna ini

1. Kata mensinyalir selalu logikanya disertai bukti-bukti konkret atas dugaan yang dilontarkan. Tapi sampai detik ini sinyalemen hanya tinggal sinyalemen. Dengan demikian, sinyalemen ini hanya diam di tempat alias hanya jadi issue.

2. Dalam segmentasi Kristen, saya tidak melihat dan tidak ada literatur yang menyebutkan bahwa aliran ini fundamentalis, yang lainnya modern, dst dst. Kalau yang dimaksud fundamentalis disini adalah aliran yang masih asli bersandar pada Injil atau Alkitab, maka semua aliran Kristen dan Katolik pada hakekatnya adalah fundamentalis. Jika yang dimaksud adalah Kristen Ortodoks, maka benar, memang ada aliran itu.

3. Mengadopsi anak Aceh yang kesusahan dan ditimpa musibah saya kira adalah hak dan kewajiban semua orang, jadi tidak ada komentar lebih lanjut soal ini

4. Murtad..... ok. Saya akan menyitir salah satu kutipan Al Quran atas sabda Allah(maaf, saya bukan Muslim, tp semoga saya pas mencupliknya), ayat ini memang hendak mengutarakan maksud yang lain, tp ada kalimat yang sangat baik untuk direnungkan "...dan hendaknya menjadi tanda bagi kaum yang berpikir". Dari ayat ini jelas, Tuhan menghendaki ciptan Nya (manusia) berpikir sejernih mungkin dan selebar mungkin. Menyebut kata "murtad" adalah suatu tuduhan serius. Saya kira, lebih serius dari tuduhan yang diarahkan ke Polycarpus sehubungan dengan racun arsenik dalam tubuh Almarhum Munir.

Sehubungan nomer 4 diatas, saya mencoba diskusikan hal ini dengan beberapa rekan, baik yang seagama dan yang tidak seagama.

berikut tanggapan dari rekan muslim:
"itu suatu reaksi karena belakangan dunia memojokkan kaum muslim....tolonglah dimengerti...."

tanggapan saya: Saya pribadi berani mengatakan bisa mengerti, tapi tidak semua orang bisa dijamin mengerti. Nah kalo yang tidak mengerti implikasinya apa? masih untung kalo cuma dongkol dalam hati...kalau merencanakan pembalasan secara diam-diam bagaimana? Nanti saling menyerang...kalau udah saling menyerang? ujung-ujungnya yang susah rakyat kecil. Udah kejepit, ditambah harus menonton tonjok-tonjokan antar umat beragama.

tanggapan dari umat katolik dan kristen tidak saya cuplik disini, karena terlalu keras menurut saya. Tapi pada intinya mereka menyesalkan ucapan Bpk Din Syamsudin.

tanggapan umat Buddha sempat saya tangkap, intinya ada satu kenalan saya yang agak bingung dengan maksud statement Bpk Din. Masih untung cuma bingung......

Saya pribadi mengharap, sehubungan dengan no.4 diatas, sudilah kiranya Bpk Din memikirkan ulang implikasi kata-kata "murtad". Sebagai sesama umat beragama, saya kira niatan mengalihkan iman apalagi pada saudara-saudara yang ditimpa musibah sangatlah kecil, boleh saya katakan nol. Jika ada niat menolong, itu semata-mata saya kira justru perwujudan solidaritas yang didorong rasa prihatin. Itu juga jadi sarana untuk menambah amalan sekaligus mengurangi dosa-dosa yang kita perbuat. Saya kuatir, jika Bpk Din tidak mengklarifikasikan ucapannya, beliau ganti akan ditimpakan dosa-dosa orang yang sudah sudi menolong itu. Apa Bpk siap di set sebagai container dosa? Segeralah minta ampun pada Allah sebelum terlambat, minimal istigfar atau berzakat sesuai anjuran Nabi. Anda juga sebaiknya sekarang berfokus mengawai rekonstruksi Aceh yang hingga kini masih kembang kempis sementara pengungsi Aceh semakin didera penyakit dan masalah-masalah lain.

Semoga Tuhan menerangi setiap kata dan perbuatan kita, agar di masa depan tidak ada lagi dengki, dendam dan rasa curiga antar sesama umat beragama.

02 February 2005

(Another) Dream come true, IBM DeveloperWorks....

Whenever I remember how this is started 4 months ago, I always said to myself "Gee, this article is considered to published on IBM DeveloperWorks where top notch writer and scientist share his/her idea. Maybe they are not God but surely they are among the best on earth !" To be honest, the article wasn't planned to shoot for IBM DeveloperWorks. I was targetting to another online publication but....shortly...maybe it is faith or something, IBM DeveloperWorks editor accepted my idea and I strongly considered it as big challenge.

The article is titled "Build a heterogeneous cluster with coLinux and openMosix". As the title said, it describes about the basic idea and how to create cluster of mixed platform. Here I used coLinux and openMosix as basic "igredients" because those are so far the tools me and Andreas Schaefer (my co-author) know best. Actually, it would be more comprehensive if we took another tool such as openSSI into account but I decide to leave that for now. If I already get sufficient knowledge, maybe I'll come back and do more extensive reserarch about it.

"Co-author you said?" Yes, you read it correctly. This is the first time I write something with another people. His name is Andreas Schaefer and he is (together with his colleague) the one who bring the idea of merging coLinux patch onto openMosix so openMosix can be executed on Windows platform. The first report about the successful test was about 9-10 months ago and it drew my attention quickly. I think "this is a simple but very useful idea so it deserve wider exposure. A well written article will do the work !". So, I asked Andreas whether he was interested and he agreed.

Sadly I am not inside openMosix community anymore so I can't share this joy, but I hope this is still considered as "contribution". I am always happy to share my idea and opinion with anyone , so via this article I hope I can draw more people's attention toward cluster technology and support it in every aspect available.

I also found several small surprises here. I and Andreas Schaefer share same birthday ! :)) Holy cow ! And Andreas said "what? your baptist name is Andreas? So we share same name and same birthday?" :)) At that time, I realize this is another wonderful experience God send to me so I can learn how to work with other people. Maybe God understand the difficulty of writing complex subject with other people so He send me someone who has more or less same thinking with me :))

And the conclusion is? I won't make this IBM article my last writing. Conversely, I will make it as another stepping stone to move into higher stage. And...i won't forget a clumsy words spilled at me 5 years ago "....i am not supposed to talk with people from your country..." Let see, which side is actually SHOULD GET MORE RESPECT, his side or my side?

I dedicate this article for the people of Aceh who had been swept away by Tsunami. I hope they regain their spirit to live normally as I also wrote this article using almost my fullest capability and struggle together with the editor to make it better. Live is too short to be spent for cry or sadness. Work hard, expand your knowledge, do something for others..that will make your live a valuable journey and shine eternally like sun through ages.

regards

Mulyadi Santosa

How to execute multiple commands directly as ssh argument?

 Perhaps sometimes you need to do this: ssh user@10.1.2.3 ls It is easy understand the above: run ls after getting into 10.1.2.3 via ssh. Pi...