Tuesday, March 22, 2011

CASE STUDY #6 - PROCESS LIFE CYCLE


            In order to fully understand the process state diagram shown above, I will narrate how one job is process:
  1. Every process that is created by the process manager is in the hold state at the beginning. For each process there is information stored about how many memory and which devices must be allocated to allow the processor work on the process.
  2. When a process has been given all the resources it needs it is scheduled to the ready state.
  3. After some time, the process will now go to the running state where we can now say it is “in the CPU”, that is, it has been given the CPU. A process enters the running state by decision of the process manager. That decision follows a certain scheduling scheme depending on the operating system.
  4. While the process is in the running state there a three possible occurrences that your process may meet:
    • If your scheduling scheme is preemptive which means there is a possibility of an interrupt and if the process is interrupted by another process due to a certain reason from the algorithm of the scheduling scheme, it goes back to the ready state and wait until it is called to the running state.
    • If the process needs an I/O operation to finish or there is an occurrence of a page fault, the process goes to the waiting state where the I/O request or page fault will be given solution and if a signal is issued to continue processing the process goes back to the waiting state.
    • Lastly, if there are no interrupts, I/O requests, or page fault encountered, the process come to an end.
  5. During the concluding of the process, the process will be issued as finished and all the resources that the process owned will be freed.

Now, questions are raised why there is no transition from the READY state to the WAITING state and from the WAITING state to RUNNING state.

READY state to WAITING state

As written above, the process in the ready state is ready in all aspects to make effective use of the CPU while the process goes to the waiting state if it is waiting for an I/O response or there is a page fault to be resolved. I/O response and page faults are only detected in the running state therefore if the process which is in the ready state cannot proceed due to device failure it is sent back to the hold state and not to the waiting state.

WAITING state to RUNNING state

            The process scheduler only chooses from the queue of processes from the ready state to put into the running state therefore the transition from waiting-state-to-running-state bypass transition is not possible.

Saturday, March 5, 2011

ROBOTICS COMPETITION

            I had another competition. I had another loss. But what matters most is --- I had another fun and rewarding experience.

            Last March 03, 2011, Holy Cross of Davao College - College of Engineering and Technology hosted an Inter-school Robotics Competition for their Techno Fair 2011. Luckily, I was one of the chosen students to represent our university, University of Southeastern Philippines, along with Michael Palacio (BSCS - 2), Ian Glenn Salce (BSECE - 5) and Jay Rell Vic Guy-ab (BSECE - 5). I and Michael were assigned to do the programming while Ian and Jay were assigned to assemble the robot. The competition was participated by the University of Southeastern Philippines, Holy Cross of Davao College, Ateneo de Davao University, STI Davao, University of Mindanao and John Paul II College. 

            Our task was, from a starting point, the robot will transfer the objects (plastic cups) from point A to point B one by one then after that it will halt at the designated end point. And the robot should not go outside the presentation area.


           It was a very hard task even our coach said it was a difficult task. Our first problem was we, the programmers, was not adept how the hardware parts function so we studied the parts one by one in order to   give them the right instruction in the program which took a lot of time. Next problem was due to the environment we did not expected that our sensor will not work as it was supposed to function on the presentation area because it was too bright so we had no other choice but to change our plan. We had problems on calculating the delay of the motor in order to make precise movements. Unfortunately, we lacked in time and the program for our robot was not finished and the troubleshooting for getting at least one cup was not also finished.

            During the presentation, all robots from the six participating schools failed to took at least one object from point A so the judges ended up with the decision to base the winners from their prepared criteria of judging.

The declared winners were:
            Champion – Ateneo de Davao University
            1st runner-up – STI Davao
            2nd runner-up – Holy Cross of Davao College

            It was a very fun event. I learned a little bit about hardware and I got to learn assembly language(the PL that we thought we would use) even though it wasn’t included in our curriculum and we were very FULL (LOL) because of the free snack and the delicious lunch that they ordered for the participants and coaches!! THANKS HCDC - CET :)

Pictures during the competition:




Photo Credits: Sir Mark Van Buladaco

Saturday, February 12, 2011

Am I worthy of my freedom?

            Like any person in the world, I also have my personal secrets in life. Now, I’m going to share you one. But first let me tell you the details, it started during my sophomore year in high school. I was in the midst of my puberty stage therefore I have problems with keeping my interaction to the society. Moreover, it was harder for my part to be in a school governed mostly with students with wealthy families. My allowance was, for other students, just for load. So I resorted to the biggest mistake that I done in my life, to steal money from my parents. The amount I stole varied time to time. Sometimes just P20 but there was once I stole P1000. But as they say, “Nothing lasts forever”, my parents knew what I did. They were very disappointed to the point that my dad didn’t look at me when my mother was scolding me.
           
            I took for granted the gift of freedom just because I was insecure about others family status. I realized that time that it doesn’t mean that I can do it; I also have the right to do it. It was a bit too late though to correct my mistakes but all I can do now is not to make the same mistake again.

            I may not be born in a wealthy family but it doesn’t mean that I can’t change the way it is. So now, I’m studying at my best to get good grades in order to graduate in time and eventually and hopefully get a good stable job someday so that I can help my family uplift our status in the society. Not only for them but also for the family I will have someday.

Do I need to be a person because I am rational? Or Do I need to be rational because I am a person?

             In our day to day life, we encounter many instances that we have to make a choice. And in order to justify that choice we have to supply a reason. It is now on the view of the person to determine whether his or her reason is valid enough to justify and support his or her view on what is the right choice.

            Before, I chose to go with what I wanted: played games, slept all day, not doing my house chores, not studying and many more. I had a reason for doing that - and that is because I wanted it to. Well, I had a reason for my choice of slacking around but the question is – was my reason valid? Was my choice the right one to do? My actions resulted to having bad grades, being scolded by my parents and having social discrimination due to my misbehavior.

            Being a person has not only the aspect of rationality it also has the aspect of morality and freedom which leads to responsibility.  Therefore, the power of reason was already within me since I was born, I just needed to become a person in order to fully utilize my gift of rationality. It is wrong to say, “I need to be rational because I am a person” because being rational is already contained in me – it is also what we call human nature and for that reason I just needed to do something to fully use my gift and that is by becoming a person.

            Now, that I know that I need to be a person because I am rational I can integrate my power of reason upon my being as a person in order to make the right choices in my life which are: study hard to get good grades, help with the house chores and many more.

*LOL, I have a low grade on this one.. XD

How much have I valued my body?

            I don’t have a healthy body, physically speaking. I was unfortunately born with asthma. It’s a common disease nowadays you probably heard it from a friend who also has asthma or a relative or from your officemate. But only those who has this ineradicable disease knows how hard and how limited you feel carrying this burden for your whole life. You can’t do strenuous activities nor overdose yourself with sweets. However, funny as it sounds, I used this disease to have an excuse not to go to school before. I almost wished everyday that I will get an asthma attack especially whenever there is an upcoming quiz a day after. I drunk cold water and ate sweets just to make sure of it. Sometimes I failed but most of the time I got a day out of school. I only viewed my body back then as a mere tool. A tool, if incapacitated in doing things, will have time to slack over. That was my life back in the first half of my high school life. That was how I took advantage of my body just for gaining my personal wants not to think that the medicine for asthma is expensive plus the concern of my parents whenever I can’t sleep at night. I already stopped that habit but still I was not that conscious about my body.

            Last year, my grandfather died due to asthma. I was in a state of shock that time. Not only because of the death of my beloved grandfather but also the thought of what if it will also happen to me? What if my body will become immune with the medicines? It was a big slap to my face. It was a go-start-a-healthy-life kind of a slap for me. Now that I already have a goal a life unlike before I don’t want to die early. I decided to slowly start a healthy life starting with controlling myself not to drink soft drinks and eating sweets. Hopefully, after I graduate, whenever it will be, I can start sleeping early properly. I will never take advantage of my body. Now, the value of my body is as twice as my dream for without my body I can never able to reach my dream. 

Tuesday, January 18, 2011

How am I to live my life as a college student?

            In my elementary and high school years, I was enrolled in a private sectarian school but unfortunately I was not one of those gifted children who has the “burning” passion for learning but rather I was one of those who just go to school just to meet friends, to have allowance, to get out of house chores, did not mind to study for quizzes and exams and being satisfied of getting a score of at least 75. That was pretty much how I handled my early years of study. But all things changed when a simple idea got into my mind before I entered my third year in high school: “Magstudy og magpahonor kaya ko…?(What if I’ll study and be a honor student ?...)”. It was a simple idea that changed the course of my life. I started to become an honor student and I was happy with it not only for the high grades and praises from my classmates and teachers but most especially the thought that my family was proud of me. Even though my parents don’t tell it to me directly I know that they are depending on me on uplifting our family because although I’m their third child; my eldest sister already has a family and my other sister has problems of her own, we have a big financial problem in our family.

            Questions were floating in my head: Am I going to let my family down? Am I going to let my family suffer like this? Am I going my future family go through problems like this? Am I going to let obstacles stop me from attaining my dreams? The answer is NO. Now, only one question remains: What am I going to do?
           
            I know that big journeys starts with a single step so as a college student, I’m going to live my life dedicating my studies to my family and to my dream to be successful. I’ll study hard, pray everyday and become a responsible student. I know that some people might say, “Is that all you’re going to do?” But if you’ll just analyze and internalize what I wrote on how I will live my life as a college student you’ll realize that these things are the things that we commonly hear from other students, very easy to say but very difficult to do and maintain. But unlike others, I’m going to finish it.

Saturday, January 8, 2011

HOW WAS YOUR FIRST WEEK IN 2011?

If it was good, then congratulations and get the hell out of here and celebrate!!(joke..) But if it was not, we're in the same boat. It has been a very tiring week. A lot happened in just a span of seven days. Full of revelations, headaches and frustrating exams. I can't tell you all the things that have happened because some are quite personal but I really do hope I can share it with you some other time when I have the guts to do it. Anyway, for those who read my previous post("TSK.. TSK.. TSK.."), I think you already know one of the reasons of my headaches but for just a quick update, our professor said that he will check my complaint when he has the time to check our case studies. I hope it will end up well. 

Actually, the biggest headache for me this week was the exams! And what I hated the most was the fact that the subjects where not aligned with my forté. I really... really... really.. hate memorizing! It's one of my unconquerable weaknesses. Nevertheless, I still hope to pass my exams I'm not losing hope to pass all my exams. I know from myself that I'm not doing well this semester. I just hope it will not be too late before I realize to get serious because honestly, I don't want to have a red mark. I don't care how low my grades are going to be as long as they are all black marks.

What the hell!!! What am I whining for??!! It was only the first term that passed not the whole semester! I still have two more terms to sharpen up my grades and to get serious. I believe that as long as I think positive partnered with dedicated work I WILL SURPASS THIS SEMESTER with no failing grades!!!!! :))