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