Finally Full Scale :)

Almost two years of being an AT&T loyal customer, I have been suffered with low or no signal from my area. Its very frustrated so, I went to apply a new service today and yeah before I open a new account, I double check for a wireless signal strength for my area. Totally recemmend for anyone who is about to get a phone service to check the wireless signal first before sign up for an account.

7 Habits of Highly Effective People

I have been reading “The Seven Habits of Highly Effective People”, one of the books that my brother recommend me to read years ago, since I was 19-20, and I just finished reading the book today. Whew 🙂
I found the book quite interest and very useful for anyone who wants alternate way to improve or change his/herself. The book describes solid principle approaches to archive a personal effectiveness, and emphasizes of how important of the seven habits. To make the book shorten, I ran across many sites which gives a good summarize of the book as below.

Oh, while I google the websites, I found a list of relevant topic about self-improvement which is written by John H. Patterson, interestingly, the list below he wrote is about 100 years ago, and still work effectively today.
1. Simple food, quality, quantity.
2. Regularity in eating and sleep.
3. Masticate; leave table hungry.
4. We are a part of all we have eaten.
5. Exercise, five minutes, three times daily.
6. Air — most important.
7. Sunlight, artificial light.
8. Water inside and outside.
9. Loose clothing.
10. Early to sleep; get plenty.
1. Think sanely.
2. Learn from mental superiors.
3. Learn to listen attentively.
4. Read best newspapers and books.
5. Improve the memory.
6. Concentrate.
7. Don’t worry unnecessarily.
8. Be systematic.
9. Weigh both sides.
10. Avoid inferior minds.
1. Right is right, wrong is wrong.
2. Be truthful.
3. Ignore precedent if wrong.
4. Seek elevating recreation.
5. Don’t deceive yourself.
6. Learn to say “no.”
7. Live up to your principles.
8. Avoid temptation.
9. Form good habits.
10. Have a constitution.
1. Increase my earnings.
2. Decrease unnecessary expense.
3. Save money, U.S. Postal Bank.
4. Money makes money.
5. Invest — don’t gamble.
6. Make family budget.
7. Hard work.
8. Study the business.
9. Pay cash for everything.
10. Increase credit balance.
1. Avoid bad associates.
2. Select helpful friends.
3. Think alone.
4. Learn to be happy alone.
5. Family best company.
6. Work out, alone, my problems.
7. Avoid so-called society.
8. Entertain economically.
9. Stand well with neighbors.
10. Do some welfare work.

Thai Style Pork Noodle Toss

It’s spring break, and now I can take some breaths 🙂
I rarely cook meal thesedays, so it is a good time for me to cook something complicated.

Starcraft 2 here it comes

Been waiting for this game almost ten years since 1998, a great game that I recommend for everyone to play. A true intense real time stretegy, An epic master piece game in history. The clip below is a game demo for terran units.

Why Thread?

Here is a quick brief about a concept of thread. Thread is a light weight process, it takes less time to create, context switch or destroy thread than a process. We want simultaneous activities for a better interraction with a user or take advantages of multi-processors to archieve a maximum system resourse utilization.

For instance, in word processor, one thread responses for I/O, while another is doing a grammar check. Now, lets take a look at a simple JAVA program to see how the thread create, run, and how threads assignment work in JAVA.

public class thread extends Thread{
public void run() {
for(int i = 0; i < 10; i++) {
System.out.println("Child thread " + i);

public static void main(String[] args) {
thread t = new thread();

for(int i = 0; i < 10; i++) {
System.out.println("Parent thread " + i);
}// end main
}// end class thread

In the code above, we created two threads. When the new thread create, it will go to the run() method and do the job, so we can see from the output from the program that there will be two threads execute concurrently.

program output:

Parent thread 0
Parent thread 1
Child thread 0
Parent thread 2
Child thread 1
Parent thread 3
Child thread 2
Parent thread 4
Child thread 3
Parent thread 5
Child thread 4
Parent thread 6
Child thread 5
Parent thread 7
Child thread 6
Parent thread 8
Child thread 7
Parent thread 9
Child thread 8
Child thread 9

Microsoft DreamSpark Gives Free Software to All Students

“Microsoft gives students access to technical software at no charge to inspire success and make a difference”
I just read a forward email from my Professor and found that the email is interested. Yes, Microsoft has been pushing theirs products to students to get used to their softwares, so that many of the students will most likely work with MS products after they graduated. This includes MS Visual studio, Window 2003 server and so on. In my opinion, these softwares are too expensive for student to own, approximately 300$ each?, so most of the students take alternate way by going to open sources or illegal softwares.
Microsoft already has the MSDN Academic program which is supported only specific universities. Now, It seems to me that they are distributing for all the student around the world by having a verification system such as International Student Identity Card (ISIC). This card will become a standard for student to be able to download their software properly. Here they comes, another strategy. For those who would like to read more about DreamSpark, you can follow the following link,

A Dynamic Data Race Detector for Multithreaded Programs

Eraser: A Dynamic Data Race Detector for Multithreaded Programs, by Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, and Thomas Anderson, ACM Transactions on Computer Systems, Vol. 15, No. 4, November 1997, pp. 391-411.

According to the paper, Erase: A dynamic Race Detector for Multithread Program, the authors claim that dynamic data race is hard to detection, so programmers are suffered when programming by using thread. There are already work that solving about the data race problem from Lamport’s happen relation, however, it costly so they would like to introduce a new method. These are the main motivations of the author regarding to the paper.

The authors contribute by introducing a dynamic race detection tool which is called “Eraser” this tool will monitor the program when it reads and writes when it executes, they state that the tool is more effective and un-sensitive than manual debugging. Another important of the main contributes of this paper is a Lockset algorithm, which will use to detect the data race in multithread programs.

Moreover, about the Eraser detection program, the program can detect race condition in Operating Kernel. For their experiment, the authors test Eraser on the real programs and applications. the HTTP server and indexing engine from AltaVista, the Vesta cache server, the Petal distributed disk system and various programs from programming assignment from students. However, the author is not concerned about its performance due to the high overhead. However, but the authors believe that it is fast enough to debug most of the programs and focus on the false alarms of the program when it found the data race.

The most efficiency of this paper is that the program Eraser cannot prove that the test program is race data free. Also, checking for dynamic data race is impractical. The experiment methods should cover most of the operating systems that we use these days and various of programming language should be tested instead of having only C++ programming language. Moreover, the use of the Eraser program should be describe for the audience, so they can know how the program works out for each test programs. The graph and performance should be provide instead of describing what happen for the program they run on.I would rate the significant of this paper 4/5(modest) due to the challenge topic and idea.

Simpson’s Adaptive Quadrature Algorithm

Simpson’s Adaptive Quadrature Algorithm to compute integrals in JAVA for CSC5561 CP2

In general
1. procedure integrate ( f , a , b , tau )


4. if e > t then
5. m = (a + b) / 2
6. Q = integrate(f,a,m,tau) + integrate(f,m,b,tau)
7. endif
8. return

Source code

Scalable Threads for Internet Services

Capriccio: Scalable Threads for Internet Services, R. V. Behren, J. Condit, F. Zhou, G. C. Necula, E. Brewer, Proc. of the Nineteenth Symposium on Operating System Principles (SOSP-19), Lake George, New York. October 2003, pp. 268-281.

Thread-based versus event-based programming has been a popular topic recently. For this paper, the authors have shown a strong motivation and contribution such as developing a scalable thread packet for use with high-concurrency servers which is called Capriccio.

The authors have noticed a lot of disadvantages of using event-based programming. For instance, the “stack ripping” where programmers have to save and restore live state is too complicated to use. The authors believed that by using thread-based could make life easier and could also achieve high currency just like the event-based programming as well.

In order to make thread-based model to be better than event-based model, they have build the thread package under the user-level threads, due to the fact that the user-level thread have more advantages in term of performance and flexibility over the kernel one. The implementation of Capriccio is amazing such that we don’t have to modify our applications to be able to use features from the thread package. Capriccio uses and takes advantages of new mechanisms from the latest Linux for its synchronization, I/O and Scheduling mechanisms. This is the reason why the result from the benchmark which they showed in the paper is surprisingly good for thread creation, context switch and so on; it is faster when comparing to the original Linux threads and the others comparators.

The idea of introducing linked stack management, resource-aware scheduling, blocking graph and modify some algorithm are surely improve the system utilization. Base on the performance from their evaluation which they compare between the default web servers such as Apache, Haboob, the results looks realistic. Because of the benchmarks they use are the real world application, and the Capriccio performs very well for both scalability and scheduling.

However, we already know that there must be some disadvantages of using thread-based model. One of them which I am very concerned is the issue when having multiple processors for both homogeneous and heterogeneous chip types. The authors mentioned the drawback of user-level threading such that it could make it more difficult to take advantage of multiple processors. As we know, SMP (symmetric multiprocessing) or CMP (chip multi processor) like Intel duo core has been increasing in the computer market these days. I wonder if the thread-based model will take advantages of having multiple processors more than the event-based model or not. What if we try to fix both user-level and kernel level threads instead of employ only the user-thread level. The future work section in the paper doesn’t give much detail regarding to the issue.

Lastly, I would rate the significant of this paper 5/5 (breakthrough) because they have use and modify many mechanisms and creating a new thread packet to show us that thread-based programming is better to use for high-concurrency internet servers. Their dedication and ideas are impressive