Navigation

Saturday 28 December 2013

Round robin Scheduling

Four processes A, B, C and D are in a ready queue of a real time operating system. Round robin Scheduling is to be used.
Process A requires 430μS to complete and is executed every 850μS.
Process B requires 200μS to complete and is executed every 700μS.
Process C requires 250μS to complete and is executed every 600μS.
Process D requires 410μS to complete and is executed every 710μS.

The clock tick period is 145μs while the context switch period is 11μs.

Solution
In Round robin Scheduling, each process gets equal time and execution of the processes is in the order they were submitted. The time slice diagram for the above question is as shown:


Total time required for Process A:
145 + 11 + 145 + 11 + 145 + 11 +145 + 11 + 145 + 11 + 55 + 11 + 105 + 11 + 145 + 11 + 140 = 1258μS
Total time required for Process B:
145 + 11 + 145 + 11 + 145 + 11 +145 + 11 + 145 + 11 + 55 = 835μS
Total time required for Process C:
145 + 11 + 145 + 11 + 145 + 11 +145 + 11 + 145 + 11 + 55 + 11 + 105 = 951μS
Total time required for Process D:
145 + 11 + 145 + 11 + 145 + 11 +145 + 11 + 145 + 11 + 55 + 11 + 105 + 11 + 145 + 11 + 140 + 11 + 120 = 1389μS

Therefore, none of the processes met their timing requirements

Friday 25 October 2013

How to prevent a paragraph text from moving to the next line in MS-Word

When typing on MS-Word, it is quite annoying to see a piece of text moving to the next page even after a specified margin has been set. This can be corrected through the following steps

Step 1: Highlight the offending paragraph by selecting it, right click and choose "Paragraph" from the menu as shown in the figure below.


Step 2: Click on "Line and Page Breaks" Tab. On the Pagination Title, a set of check boxes will be seen. Make sure the "Window/Orphan Control" check box is deselected as shown in the figure below. Then click the OK tab.



As easy as that! The problem is now solved!

Wednesday 18 September 2013

Coursera.org

Coursera.org is a free online resource for educational learning. Courses offered range from Humanities, Medicine, Biology, Social Sciences, Mathematics, Business, Engineering, and Computer Science. Whether you are looking to improve your resume, advance your career, or just learn more and expand your knowledge, Coursera is the place to be.

I took a course on Machine Learning with Prof. Andrew Ng last year, the knowledge and experience I gained was awesome. The software used for the class was also free which makes it possible for anyone with an internet connection to learn. I am currently taking a course on Vaccines and other medical courses.

Why not visit www.coursera.org today and discover what I am saying!

How to make a simple HTML page

First, open Notepad and type the following as shown below



The title tag indicate what appears on the title of the webpage while the contents of the body tag indicate what appears as text of the webpage. Save this text file as any name you want but remember to add the .html at the end. That is if the name used to save the document was web, then web.html should be used to save the file.

Open the saved file (it should appear as a webpage) as shown below


So simple. Why not try it today!


Wednesday 28 August 2013

Home-made Thermometer Project built on a Veroboard

Components Required

  • ·         LM35 Temperature sensor
  • ·         4MHz Resonator
  • ·         PIC16F876A microcontroller
  • ·         28-pin DIL socket, for the PIC microcontroller
  • ·         LCD
  • ·         1KΩ Resistor
  • ·         4.7KΩ Resistor
  • ·         220Ω Resistor
  • ·         1N4148 diode
  • ·         100nF capacitor
  • ·         Green LED, a power ON LED
  • ·         6-way male header row, a connector for programming the PIC.
  • ·         3AA Batteries
  • ·         Battery Holder
  • ·         Veroboard
  • ·         Jumper wires
Tools Required
  • ·         Soldering iron
  • ·         Solder
  • ·         Crimping tools
  • ·         Wire cutter
  • ·         Solder sucker
  • ·         Voltmeter
Connect the circuit as shown in the figure below in Proteus ISIS or any other suitable simulation software. The code should be tested first in simulation before it is built physically on a veroboard. 




The code written was in C and was compiled using CCS compilier on the MPLAB platform. The screen below shows an excerpt of the code.


When the compiled HEX file was loaded into the PIC, and the circuit simulated, the result is as shown below.


The circuit was built on a veroboard as shown below



When the PIC was programmed and power applied, the output is as shown below




The cost of this project is not more than £20! Why not try it today.