"A little progress everyday adds up to big results"

Sunday 11 November 2018

Fixing a Java bug at runtime without restarting the JVM process

    1. Have you missed something while developing a Java application, that resulted in a bug?
    2. Is that buggy application already running in production?
    3. Are you concerned about the impact of the scheduled (or unscheduled) downtime to deploy your fix?
    4. Do you want to fix the bug in production without redeploying or restarting the application?
    If your answers to all the above questions are "yes", then this post is for you! 
    Let us start with a sample (buggy) Java application

    package com.jrf.sampleapp;
    
    import java.io.InputStreamReader;
    import java.lang.String;
    import java.util.Scanner;
    
    public class SimpleCalculator {
     private static String add(long addend, long augend) {
      return "Sum is " + (addend+augend);
     }
    
     private static String subtract(long minuend, long subtrahend) {
      return "Difference is " + (minuend-subtrahend);
     }
    
     private static String multiply(long multiplier, long multiplicand) {
      return "Product is " + (multiplier*multiplicand);
     }
    
     private static String divide(long dividend, long divisor) {
      return "Ratio is " + (dividend/divisor);
     }
    
     public static void main(String[] args) {
      long input1, input2;
      String command;
    
      Scanner scanner = new Scanner(new InputStreamReader(System.in));
      command = scanner.next();
    
      while(!command.equalsIgnoreCase("exit")) {
       input1 = scanner.nextLong();
       input2 = scanner.nextLong();
    
       switch(command.toLowerCase()) {
        case "add":
         System.out.println(add(input1, input2));
         break;
    
        case "subtract":
         System.out.println(subtract(input1, input2));
         break;
    
        case "multiply":
         System.out.println(multiply(input1, input2));
         break;
    
        case "divide":
         System.out.println(divide(input1, input2));
         break;
    
        default:
         System.out.println("Use \"add x y | subtract x y | multiply x y | divide x y | exit\"");
         break;
       }
    
       command = scanner.next();
      }
     }
    }
    
    
    This is a simple console Java application to perform the basic binary mathematical operations repeatedly until the "exit" command is issued. When we run this, we get the following output:

    Sum is 11
    subtract 3 4
    Difference is -1
    multiply 8 7
    Product is 56
    divide 12 3
    Ratio is 4
    divide 100 0
    Exception in thread "main" java.lang.ArithmeticException: / by zero
     at com.jrf.sampleapp.SimpleCalculator.divide(SimpleCalculator.java:21)
     at com.jrf.sampleapp.SimpleCalculator.main(SimpleCalculator.java:49)
    
    
    Oops!!! The divisor zero check is missing in the "divide" method, resulting in unexpected termination of the application with an ArithmeticException. Now, assume that you had realized your mistake after deploying the application, but, before someone issued a zero divisor. Could you have avoided the mishap without bringing your application down? Perhaps you could have!!! Here is how. 

    Basically, we want to dynamically patch the Java class at runtime, with absolute zero downtime. We all know that a JVM executes bytecode resulting from a compilation. So, we are trying to modify the bytecode at runtime. Here comes our Java's superhero, Instrumentation, to the rescue!  

    Instrumentation is a way to inject/modify bytecode at runtime. Instrumentation can be done either at the time of loading a class or after it is loaded. Here we are going to use the latter since our application's main class "SimpleCalculator" has already been loaded. Since a lot of resources on Java Instrumentation are available online, let us directly jump into writing an agent to fix the bug.

    package com.jrf.agent;
    
    import java.io.ByteArrayInputStream;
    import java.lang.instrument.ClassFileTransformer;
    import java.security.ProtectionDomain;
    
    import javassist.ClassPool;
    import javassist.CtClass;
    import javassist.CtMethod;
    
    public class JavaRuntimeFixApplier implements ClassFileTransformer {
     public byte[] transform(ClassLoader loader, String className,
       Class classBeingRedefined, ProtectionDomain protectionDomain,
       byte[] classfileBuffer) {
      byte[] byteCode = classfileBuffer;
    
      try {
       byteCode = retransform(className, byteCode);
      } catch (Throwable e) {
       e.printStackTrace();
      }
    
      return byteCode;
     }
    
     private byte[] retransform(String className, byte[] original) throws Exception {
      byte[] modifiedByteCode = original;
    
      switch(className) {
       case "com/jrf/sampleapp/SimpleCalculator":
        ClassPool classPool = ClassPool.getDefault();
        CtClass ctClass = classPool.makeClass(new ByteArrayInputStream(modifiedByteCode));
        CtMethod method = ctClass.getDeclaredMethod("divide", 
         new CtClass[] {CtClass.longType, CtClass.longType});
     
        method.insertBefore("if ($2 == 0) {" +
           "return \"Cannot divide by zero\";" +
              "}");
     
        modifiedByteCode = ctClass.toBytecode();
        ctClass.detach();
        break;
      }
    
      return modifiedByteCode;
     }
    }
    
    
    This is the main transformer class, which performs the bytecode modification. To compile the new source code

    if ($2 == 0) {
     return "Cannot divide by zero";
    }
    
    
    and generate the corresponding bytecode, we have used the Javassist library. The transformer code is pretty self-explanatory. If the fully qualified class path matches "com/jrf/sampleapp/SimpleCalculator", we are inserting the above code at the beginning of the "divide" method that takes 2 long arguments. The "$2" in the above code represents the 2nd argument ("divisor") in the "divide" method. The main Agent Class, that applies this transformer goes like this:

    package com.jrf.agent;
    
    import java.lang.instrument.Instrumentation;
    import java.lang.instrument.UnmodifiableClassException;
    
    public class JavaRuntimeFixerAgent {
     public static void agentmain(String args, Instrumentation instrumentation) {
      try {
       addTransformers(args, instrumentation);
      } catch (Exception e) {
       e.printStackTrace();
      }
     }
    
     private static void addTransformers(String args, Instrumentation instrumentation) 
      throws ClassNotFoundException, UnmodifiableClassException {
    
      instrumentation.addTransformer(new JavaRuntimeFixApplier(), true);
       
      if (!instrumentation.isRetransformClassesSupported()) {
       System.out.println("Class retransformation is not supported in this version of JVM");
       return;
      }
    
      Class clazz = Class.forName("com.jrf.sampleapp.SimpleCalculator");
      instrumentation.retransformClasses(clazz);
     }
    }
    
    
    The important thing to note here is that some JVMs do not support class bytecode redefinition once they are loaded. In such cases, this approach would not work.

    These 2 classes need to be packaged into a JAR before it is loaded into the target application's memory. The JAR's manifest file looks like

    Agent-Class: com.jrf.agent.JavaRuntimeFixerAgent
    Can-Redefine-Classes: true
    Can-Retransform-Classes: true
    Class-Path: javassist.jar
    
    
    Modifying the classes at runtime requires the "Can-Redefine-Classes" and "Can-Retransform-Classes" properties to be true. The first line defines the class, whose "agentmain" method is where to start executing the agent from.

    Now that we have the application running and the agent to fix the application handy. What next!? To apply the fix by loading the agent in the application's JVM. In order to do so, let us define a loader class as follows

    package com.jrf.loader;
    
    import com.sun.tools.attach.AgentInitializationException;
    import com.sun.tools.attach.AgentLoadException;
    import com.sun.tools.attach.AttachNotSupportedException;
    import com.sun.tools.attach.VirtualMachine;
    import java.io.*;
    
    public class JavaRuntimeFixLoader {
     public static void main(String[] args) throws AgentInitializationException, 
      AgentLoadException, AttachNotSupportedException, IOException {
    
      if (args.length != 2) {
       System.out.println("Usage: java JavaRuntimeFixLoader  ");
       System.exit(-1);
      }
      
      VirtualMachine jvm = VirtualMachine.attach(args[1]);
      jvm.loadAgent(args[0]);
      jvm.detach();
     }
    }
    
    
    Just run this loader with either the absolute path to the agent JAR or the agent JAR's path relative to the target application and the target application's process id. If you do not see any error in both the loader and the target application, congratulations! Your fix is successfully (and magically) patched at runtime. Let us test it.

    add 5 6
    Sum is 11
    subtract 3 4
    Difference is -1
    multiply 8 7
    Product is 56
    divide 12 3
    Ratio is 4
    divide 100 0
    Cannot divide by zero
    divide 100 10
    Ratio is 10
    exit
    

    Using this approach, at runtime, one can 
    • Overwrite methods 
    • Perform argument checks at the beginning of methods 
    • Surround a method under a try-catch block 
    • Overwrite complete classes 
    • and do many more... 
    all without recompiling, redeploying or restarting the original application. 

    The complete source code of the example explained here is available at https://github.com/sureshprakash/JavaRuntimeFixer. In one terminal run the "make sampleapp" command to compile and run the sample calculator application. After this, in another terminal run the "make instrument" command that will compile the agent and apply the necessary fix at runtime.

    Let us appreciate the power of Java's Instrumentation!

    Sunday 25 September 2016

    Athena Health Interview Experience

                     On 6th and 7th February 2014, Athena Health, a product based company, took off-campus interview for the post of Quality Assurance Tester. Generally, dual placements are not allowed in my college (Sona College of Technology). But, two days before the interview, it was announced that dual placements are allowed for this company as the package was more. Till then, though I knew that this company is going to take a recruitment drive at my college, I had no idea of attending it since I had been already placed in Accenture. I was about to write the GATE examination in March to pursue higher studies (if I had got admission in a good institute). But then, just to give it a try and to get interview experience, I decided to attend the interview and started preparing for it.

    Preparation
                     The day before the interview, one of my friends, Brabu, had collected a few Athena Health interview questions from the Internet and we both discussed the solutions in the college campus. When we were about to leave the college, unexpectedly, we met my department (IT) HOD (Dr. J. Akilandeswari), who had great faith in us. She wished us all the very best.

    Pre-placement talk
                    The interview process was held at my college, Sona College of Technology, Salem. Before the interview, there was a pre-placement talk, where the interview procedure, package, etc, were discussed. The facilities (said by them) like work from home, free health insurance for self and family, etc., impressed me and made me think that Athena was a better place than Accenture. Around 400+ students from several colleges in and around Salem had gathered in Sona Auditorium for the pre-placement talk on 6th February, which was followed by the interview.

    Round 1 (Aptitude test)
                   After the pre-placement talk, we were taken to the PG Auditorium for the aptitude round. The aptitude round consisted of 10 numerical type questions, for which choices were not given. The duration of this round was for an hour. Out of the 10, I could solve only 5. Later, I came to know that I got only 2 correct. As soon as we came out, we (friends) discussed the solutions amongst ourselves. We were really scared and were telling the placement coordinators that if we get selected in this round, the remaining rounds wouldn’t be that tough for us. After some time, the results (list of shortlisted candidates) were announced. Only 51 were qualified for the next round.

    Round 2 (Programming)
                    The programming round consisted of 3 questions.
    1. Given a string made up of parentheses and an index, find the index of the corresponding (opening/closing) parenthesis.
    My approach: Linear search and flag variable

    2. Given an integer, output an integer formed by swapping the odd and even bits in the given integer.
    My approach: Bitwise operators (Shifting operators, bitwise AND and bitwise OR)
    (This question saved me a lot of time)

    3. Arrange the characters in a string in the order given as another string.
    My approach: Counting array for storing the order

                  After completing the code, I started writing comments for them. On seeing it, one of the invigilators from Athena said that it was not expected. But, then since I had time, I did it for my satisfaction. There was no filtration in this round.

    Round 3 (Test case generation)
                  Given a 3 page program, we had to write test cases for it. Actually, this round was the biggest expectation of the company since the interview is for the role of testing. Though 20 to 21 test cases were expected, I could write only 13 test cases within the given time. Results for this round was announced via mobile at around 7 pm. Filtering was based on the cumulative score of the second and the third rounds. Only 7 students, including my best friends, Vignesh Jagadeesan, Ramki R and Brabu Venkatachalam got shortlisted for the next round. Five were from my college and the two others were from Government College of Technology, Salem.

    Round 4 (Technical)
                      One to one (technical and HR) interviews were held on 7th February. My technical interview went for around an hour in placement coordinator's (Mr.Balamurugan) cabin. There was only one panellist. He asked me a lot of question in Database Management System as it was my area of interest. Most of the questions were based on joins. He also asked me to use the conditional operator in a query. I wrote such a query (using conditional operator). He asked whether it would work. I said that it would work in MySQL and added that I wasn’t sure whether it would work in the other DBMSs. He asked me to solve a question from the previous day’s aptitude round. I tried, but, couldn't find the answer, even after getting a hint from him.

                       Then, he asked a few questions from my second-year project, Musical Keyboard Simulator. He told me to write a small program something like removing duplicates in a string. I wrote it. The rest of the interview conversation is presented below. I have mentioned the panellist as 'Tech'.

    Tech : Game me an aptitude puzzle and asked me to solve
    Me    : (Solved it in some time)
    Tech :  Can you explain how you solved
    Me    : (Explained)
    Tech : What will be the test cases when a user performs an ATM transaction?
    Me    : Card validity, PIN correctness, balance sufficiency while withdrawing money, etc.,
    Tech : Consider the card is valid, PIN is correct and sufficient balance is available in the account. But, still, the user is not able to withdraw money. How is it possible?
    Me    : Cash is not available in the ATM..?
    Tech  : No, it is available. Don't say "power cut", "connectivity issue". They are all perfect. The clue is, it is related to the user.
    Me    : (Thought for a while) No idea, sir.
    Tech  : This is very simple. I gave you the clue also. Try to get it.
    Me     : (Again thought for a while) I don't know, sir. (Really nothing stroke my mind)
    Tech  : User enters denomination, which cannot be dispensed. (which is not a multiple of 50/100)
    Me     : Sssss..... (an expression to show that a simple thing is missed). I did not think about it, sir.
    Tech  : You are here for the post of tester. So, you must think about it. In which company are you placed?
    Me     : (Though, I was placed in Accenture, I was nervous to face many questions) I didn't get placed, sir.
    Tech  : Why not Accenture?
    Me     : I do not want to join service based company, sir.
    Tech  : Why?
    Me     : I have heard that there will be more stress in service based companies.
    Tech  : (Reading about 'Software Developer' certification in my resume) Where is Carnegie Mellon University?
    Me     : I think it is in USA, but, I am not sure.
    Tech  : You have done certification, but, don't know where the university is.
    Me     : I am sorry sir, it is my mistake. I will know about it.

                           Then, he asked a few questions from my resume. Finally, he offered me some snacks. As soon as I came out, I told my friends and placement team that I told him that I wasn't placed. Placement coordinator blamed me. I too realized my mistake. But, the placement team members asked me to maintain the same (not placed) throughout the rest of the interview. I really felt guilty.

                          It was very unfortunate that Ramki could not make it to the next round. My friends had two technical interviews, each of short duration. I had one single, but, long technical interview.

    Round 5 (HR 1)
                          My nervousness raised during this round, which was held at the ECE conference hall. Let me call the interviewer (Mr. Ramesh), 'HR'.
    HR    : No need to be nervous. Be calm. Please be seated. If you want, you can place your resume on top of the table.
    Me     : Okay, sir. (felt little bit comfortable)
    HR     : Tell a few lines about yourself.
    Me     : (Told)
    HR     : Why is your score low in aptitude round?
    Me     : (Explained that I have given a try on all the ten questions)
    HR     : Which of the rounds so far you liked the most?
    Me     : Of course, the 2nd round (programming round)
    HR     : Do you know the job role for which you are being interviewed?
    Me     : Yes, sir. Quality Assurance tester
    HR     : Yes. If you are selected, in future, you should not claim for the developer job, because, you are interviewed for the testing role. We let you know in advance because there are people who do it.
    Me     : Okay, sir.
    HR   : Including the salary, everything is common for both the developers as well as the testers at Athena. Only the job role differs. The moment you claim for a developer role, you will be fired.
    Me     : I assure that I will not request for a developer role.
    HR     : What is your expectation from the company?
    Me     : Need some freedom in the company.
    HR     : Like what?
    Me    : For example, if I am late for the office on some day, due to unavoidable situations, I shouldn't be blamed. Of course, I can be questioned.
    HR     : Regarding timings, Athena is very liberal. Where else are you placed?
    Me    : I am not placed anywhere, yet, sir. (To maintain consistency from the previous round. But, felt very nervous to lie this time.)
    HR     : Why?
    Me     : Accenture came, but, I didn't attend as it was a service based company. I attended Microsoft interview when I had been to MSP annual summit to Dehradun as a Microsoft Student Partner. But, couldn't get it.
    HR      : If Athena wouldn't have come, what you would have done.
    Me      : I would have tried some other product based company.
    HR      : You have anything else to ask?
    Me      : No, sir.
    HR      : Thank you. (with a handshake)

    Round 6 (HR 2)
                   When we were thinking that the interview process gets over with the 5th round, one by one, we were called for another HR round, which was held in the Image processing laboratory. The panellist of this round was Mr. Judah (HR).

    HR    : I have no information from the previous panellists. So, you can freely speak to me. Run through your resume.
    Me      : (Explained the highlights seeing the resume)
    HR      : (Interrupted) Why can't you tell without seeing your resume?
    Me      : Sure, sir. (Continued)
    HR      : There are vacancies in both developing and testing roles. Frankly tell me which one you want, if I were to offer you?
    Me      : (From the previous round, I learnt that he is checking whether I am sticking to testing or switching over) Testing is okay, sir.
    HR      : Why you wouldn't like to be a developer?
    Me      : A good tester must also be a good developer, sir. Testing is more challenging than developing, because, in testing, there is no freedom of logic.
    HR      : Where are you placed?
    Me      : I am not placed anywhere, sir. (Again with full fear)
    HR      : Why not in Accenture?
    Me      : I don't want to get placed in a service based company, sir.
    HR      : Why so?
    Me      : I have heard that pressure will be more in service based companies since the deadlines are given by the clients.
    HR      : How will you rank yourself in programming in your college?
    Me      : (After thinking for 3/4 seconds) May be within 10, sir.
    HR      : If you can't work in Accenture, then, how will your friends be able to work?
    Me      : Yes sir, but, I don't want to join a service based company.
    HR      : What is your GRE score?
    Me      : Pardon, sir?
    HR      : What is your GRE score?
    Me      : I haven't written GRE, sir.
    HR      : Why can't you do higher studies?
    Me      : (Though actually I wanted to do higher studies) I wanted to see things in a practical manner, sir.
    HR      : Who said your masters will be theoretical?
    Me      : Except laboratory exercises and project, the others will be theoretical, sir.
    HR      : (Gave me a form) Sit outside and fill this.

                          The form asked for some personal information, GATE score, GRE score, etc. Finally, there was an undertaking saying that, "If I were selected at Athena, I will join, otherwise _____________________________". The sentence was incomplete. On seeing that, I felt very nervous as I will not be joining the company if I get admission in a good institute based on GATE score.

                          After a long hesitation, I went out to approach the placement coordinator. He took the form back to the recruitment team and said, "There is a bug in your form", with a smile. The team asked to strike out that particular incomplete sentence. Then, again Mr. Judah called me and said, "If I ask you to sit at some place, you shouldn't leave the place until I say.". Angry was seen on his face. I said, "Sorry, sir. I had doubt. That's why I ......". "If you have doubts, you have to ask me.", he told.

                          Then, he looked at the form which I had filled and said "There is a bug in the form you filled", pointing out the date below the sign. The date was 7.2.2013, instead of 7.2.2014. Both of us smiled and he corrected it himself in red pen.

    Results
                           I felt extremely nervous before the declaration of results. Actually, it was said that only one will be selected. When the recruitment team was discussing about the results, the placement team members of my college asked me, if I will be definitely joining on selection. They said, if I will not be joining, they would ask the recruitment team to select someone else, who will be given an opportunity. I told them that if selected, I would definitely join. If I were the one, then, it is very difficult to deny the job, even if I would get a good GATE score. Then, I will be forced to join a testing job, which I didn't like previously. Finally, I came to a conclusion that if I had got selected, I would go for the job for a year and then go for higher studies; otherwise, I would either join Accenture or go for higher studies, if admission is obtained in a good institute. To be short, I left the decision to God.

                          I was nervous because I was the only one to have one technical interview. Hence, people (including me) thought that I had better chances of getting selected, which might ruin (or delay) my dream of doing higher studies. Vignesh, my best friend, was nervous because he was not called for the 6th round for a long time. Then, placement coordinator (Mr. Bala) asked Mr. Judah, “What about Vignesh?”. Mr. Judah replied, “The process is not yet over, sir”. Then, after some time, Vignesh was interviewed for the 6th round. Since he was the last one to be interviewed (after a request had been made), his face turned bad.

                           But, to everybody's wonder, something different happened. God has made something unexpected and gave back the decision to me. Athena has recruited all four students (Vignesh. J (CSE), Brabu. V (IT), Amrish Khanna (CSE) and myself (IT)) of Sona College. I felt really so happy. My face turned back to normal.

    The surprise
                      On the same day, there were college cultural selections for performance on Annual day. To see that, the whole college (students and staff) had gathered at the open auditorium. Saying that we are going to meet the college Secretary, at his cabin, we were unexpectedly taken to the open auditorium stage. Placement coordinator introduced us to the crowd and made us proud.



    Each and everyday, something unexpected is expected to happen !

    Saturday 27 June 2015

    நவீன உலகில் லினக்ஸின் பங்கு

       நாம் கணினி உலகில் வாழ்ந்து வருகிறோம். கணினிகள் கிட்டத்தட்ட எல்லா துறைகளிலும் ஏதேனும் ஒரு வகையில் ஒரு முக்கியப் பங்கு வகிக்கின்றன. ஒரு கணினியில் சரியான இயக்கத்திற்கு, இயக்க முறைமை (Operating System) ஒரு முக்கிய பங்கு வகிக்கிறது. வின்டோஸ், லினக்ஸ், மேக் போன்ற பல இயக்க முறைமைகள் உள்ளன. நம் அனைவருக்கும் தெரிந்ததுபோல், தனிமனிதர்களால் பிரபலமாக பயன்படுத்தப்படும் இயக்க முறைமை வின்டோஸாக உள்ளது. ஆனால், கூகுள், ஃபேஸ்புக் போன்ற நிறுவனங்கள் திறந்த மூல இயக்க முறைமைகளை (Open Source Operating Systems)  பயன்படுத்துகின்றன. லினக்ஸ், ஒரு திறந்த மூல இயக்க முறைமை, பல்வேறு நன்மைகள் உள்ளமையால் அது கணினி உலகத்திற்கு அளிக்கப்பட்ட ஒரு மிகப்பெரிய வரம். சில நன்மைகள் கீழே பட்டியலிடப்பட்டுள்ளன.
    பங்கு:
              லினக்ஸ் இயக்க முறைமையின் பயன்பாடு பின்வருமாறு பல பகுதிகளில் பயன்படுகின்றது.
    1. ஆராய்ச்சி மற்றும் அபிவிருத்தி (Research and Development)
    2. உலாவல் மையங்கள் (Browsing centers) (வைரஸ் பிரச்சனையிலிருந்து தங்கள் கணினிகளைப் பாதுகாக்க)
    3. பல நிறுவனங்களின் நூலகங்கள்
    4. கூகுள், விக்கிபீடியா போன்ற அமைப்புகள்.

    1. வைரஸ் அற்றது:
              அதிகமான வைரஸ் உருவாக்குனர்கள் (developers) முக்கியமாக வின்டோஸ் சார்ந்த கணினிகளில் கவனம் செலுத்துவதால், லினக்ஸ் முற்றிலும் வைரஸ் அற்றது. லினக்ஸின் வைரஸ் அற்ற சூழலுக்கு மேலும் ஒரு காரணம் .exe கோப்புக்கள் லினக்ஸில்  நேரடியாக செயல்படுத்த முடியாது; மேலும் தொழில்நுட்பரீதியாக கூறவேண்டுமானால், லினக்ஸின் எதுவும் தாமாக இயங்கக்கூடியவையல்ல.

    2. வன்பொருள் சாராதது:
              அனேகமான வின்டோஸ் பயனாளிகல் (பழைய வன்பொருளின் இருப்பால்), தங்கள் கணினியை சமீபத்திய பதிப்பிற்கு மேம்படுத்த முடியாமல் இருப்பர். ஆனால், லினக்ஸில் அப்படிப்பட்ட பிரச்சனை இல்லை. எந்த பதிப்பும் எந்த வன்பொருளிலும் இயங்கக்கூடியது.

    3. இலவசமாக கிடைக்ககூடியது:
              நிங்கள் ஒரு திருடப்பட்ட (வின்டோஸ்) இயக்க முறைமையை உங்கள் மடிக்கணினியில் வைத்துக்கொண்டு வெளிநாடு செல்கிறீர்கள் என வைத்துகொள்வோம். நீங்கள் திருடப்பட்ட (pirated) இயக்க முறைமையைப் பயன்படுத்துவதால் பிடிபடுவீர்கள். ஆனால், லினக்ஸ் இலவசமாக அனைவருக்கும் கிடைக்கிறது. எனவே, எந்தப் பிரச்சனையும் இருக்காது.

    4. நெகிழ்வுத்தன்மை (Flexibility):
              நீங்கள் ஒரு நிரலாளரானால் (programmer), உங்கள் விருப்பத்திற்கேற்ப லினக்ஸை உங்களால் மாற்றியமைக்க முடியும். அதுவே, திறந்த மூலத்தின் சக்தியாகும். மேலும், இருக்கும் மூல நிரலைக்கொண்டு (source code) நீங்கள் ஒரு இயக்க முறைமையை உருவாக்கக் கற்றுக்கொள்ளலாம்.

    5. பெயர்வுத்திறன் (Portability):
              ஒரு இயக்க முறைமையை நீங்கள் ஒரு நிரல் திரட்டியிலோ (Pen drive) அல்லது குறுந்தகட்டிலோ எடுத்துச் செல்லலாம் என்றால் நம்புவீர்களா? ஆம், லினக்ஸ் மிகச் சிறியதாக உள்ளதால், நீங்கள் அதை ஒரு குறுந்தகட்டிலேயே அடக்கிவிடலாம். உங்கள் கணினியில் நிறுவாமலேயே, குறுந்தகட்டிலுள்ள நேரடி இயக்க முறைமையைக் (Live OS) கொண்டு சோதித்துப் பார்க்கலாம்.

    6. குறைந்த செயலிழக்கம்:
              வின்டோஸ் பயனர்கள் அனேக நேரங்களில் முறைமை செயலிழக்கத்திற்கு வருத்தப்படுவதுண்டு. ஆனால், லினக்ஸில் அப்படிப்பட்ட பிரச்சனைகள் இல்லை.

    7. விரைவான செயலாக்கம்:
              நீங்கள் ஒரு வின்டோஸ் பயனராக இருந்து தற்பொழுது லினக்ஸ் பயன்படுத்தி வருபவரானால், லினக்ஸில் வேகத்தை நீங்கள் மெச்சுவீர்கள் என்று என்னால் உறுதியாகக் கூற இயலும். துவங்குவதற்கும், நிறுத்துவதற்கும் அது நேரமெடுப்பதில்லை.

    8. பாதுகாப்பு:
              நீங்கள் வின்டோஸ் சூழலில் இணையத்தில் உலாவும்போது, பல ஹேக்கர்கள் உங்களைப் பார்ப்பதற்கும், உங்கள் தரவுகளைத் (data) திருடுவதற்கும் வாய்ப்பு உள்ளது. இவை யாவும் வின்டோஸின் கட்டமைப்பால் எளிதாகச் செய்ய முடியும். ஆனால், லினக்ஸில் அப்படிப்பட்ட பிரச்சனைகள் குறைவாகவே காணப்படுகின்றன.

    9. பன்மொழி ஆதரவு:
              அனேக லினக்ஸ் பகிர்மானங்கள் பன்மொழி ஆதரவுடன் கிடைப்பதால், ஒரு சாதாரன மனிதன் கூட கணினியைப் பயன்படுத்த இயலும். வாக்கியங்கள் உலகெங்கும் வசிக்கும் மக்களால் மொழிமாற்றமும் திருத்தமும் செய்யப்படுகின்றன.

    10. மிகப்பெரிய சமூகம்:
              லினக்ஸ் உருவாக்குனர்கள் உலகின் எல்லா பகுதிகளிலும் உள்ளமையால், உங்களுக்கு வேண்டுவதை எளிதாக இணைய கருத்துக்களங்களின் (forums) மூலம் பெற முடியும்.

    11. இயக்கிகள் தேவையில்லை:
              வின்டோஸ் தளத்தின் மேல் லினக்ஸின் மேலுமொரு நன்மை என்னவென்றால், லினக்ஸ் பொதுவாகப் பயன்படுத்தப்படும் சாதன இயக்கிகளை நிறுவுமாறு தொல்லை செய்யாது.

    12. எல்லா மென்பொருள்களும் ஓரிடத்தில்:
              மென்பொருள் மையத்தில், எல்லா மென்பொருள்களையும் ஒரு சொடுக்கில் (click) பெறலாம்.

    13. நன்கு பிரிந்த கெர்னல்:
              கெர்னலும், பயனர் இடைமுகமும் (user interface) நன்கு பிரிக்கப்பட்டுள்ளமையால், (ஃபெடோரா, சென்ட்ஓஎஸ், உபுண்டு, போன்ற) நிறைய பகிர்மானங்களும் (distributions), (குபுண்டு, எடுபுண்டு, போன்ற) பல வகைகளும் லினக்ஸில் சாத்தியமாகியிருக்கிறது.

    14. செயல்பாட்டு மென்பொருள்களை உள்ளடக்கியது:
              வின்டோஸ் நிறுவிய உடன் எம்.எஸ். ஆபீஸ் தொகுப்பு நீங்களே நிறுவும்வரை உங்களுக்குக் கிடைக்காது என்றிருக்க, லினக்ஸில் லிபரே ஆபீஸ், ஓப்பன் ஆபீஸ், ஆகியவை உள்ளடக்கப்பட்டுள்ளன.

    15. புதுப்பிக்கப்பட்டது:
              (C, C++, போன்ற) எல்லா நிரலாக்க மொழிகளின் மேம்படுத்தல்கள் முதலில் லினக்ஸிலேயே கிடைக்கும். பழைய 'டர்போ C++ IDE' (புதிய C++11 ஆதரிக்கும்) விதிவிலக்கு கையாளுதல் மற்றும் மரையிடுதல் (multi-threading) ஆகியவற்றை ஆதரிக்காது.

    நாம் சிறந்த இயக்க முறைமையை புரிந்து அதனையே பயன்படுத்துவோம்;

    நாம் கணினி உலகில் ஒரு புரட்சியை உருவாக்குவோம்!