Monday, January 28, 2013

Operating Systems Day 10 Process Scheduling

A Comparison of Process Scheduling Algorithms

 

Algorithm Preemptive? Description Characteristics Advantages Disadvantages
FCFS (first come first serve) No Handles jobs
according to their
arrival time: the earlier
they arrive, the sooner they served.
Suitable for batch systems. Not suitable for interactive systems because interactive users expect quick response times. Easy to implement Unpredictable turnaround times
SJN (shortest job next) No Handles jobs based on the length of their CPU cycle time. Suitable for batch system (i.e. all of the jobs are available at the same time and the CPU estimates are available and accurate). Minimizes average waiting time Indefinite postponement of some jobs
SRT (shortest remaining time) Yes The CPU is allocated to the job closest to completion. Suitable for batch system. Requires advance knowledge of the CPU time required to complete each job. Ensures fast completion of short jobs Overhead (i.e. OS frequently monitors CPU time for all jobs in the READY queue) incurred by context switching
Round Robin Yes It's easy to implement. It is based on a predetermined slice of time that is given to each job.
Suitable for interactive systems.
Provides reasonable response times to interactive users; provides fair CPU allocations. Requires selection of good time quantum
Priority No It allows the programs with the highest priority to be processed first. Suitable for batch systems Ensure fast completion of important jobs Indefinite postponement of some jobs

References

McHoes, A., & Flynn, I.M. (2011). Understanding operating systems (6th ed.). CENGAGE Learning.

Artificial neural networks Day 06

Problems Classification Clustering Pattern association Optimization Forecasting Function approxi-mation
Determine a function that approximates a stock market index.




Yes
Remember the name of a person.

Yes


Determine whether a person has a lung cancer. Yes




Develop a customer profile that would purchase a sport magazine.
Yes



Determine the genre of a playing song. Yes




Predict the company sales revenue for the next quarter.



Yes
Predict which product(s) a customer would likely buy next if they already bought milk and eggs

Yes


Arranging components on a circuit board such that the total length of wires is minimized.


Yes


References

Kishan Mehrotra, Chilukuri Mohan and Sanjay Ranka (1996). Elements of Artificial Neural Networks. A Bradford Book

Motivation Messages Day 01

At some point in the various journeys we embark on in our lives, we get to a part where we feel like giving up. Sometimes we give up before we even start and other times we give up just before we are about to make that huge break-through that we have been putting so much effort in to achieve.
 
The following shows 16 reasons that you should never give up and inspire other people around you to keep them going.

1- As Long As You Are Alive Anything Is Possible
The only valid excuse you have to give up is if you are dead. As long as you are alive (and healthy and free) you have the choice to keep trying until you finally succeed.
2- Be Realistic
The chance of mastering something the first time you do it is almost non-existent. Everything takes time to learn and you will make mistakes. Learn from them.
3- Michael Jordan
Arguably the best basketball player of all time. He attributes his success to all his failures. He just never gave up even when he knew he had missed over 300 shots and had missed the  winning shot of the game many times. Every time he got knocked down he got back up again.
4- Chris Gardner – The Pursuit of Happiness
Have you seen the movie “The Pursuit of Happiness”? It is based on the life story of Chris Gardener, a man who went for the lowest of the lows in an environment where most people would give up (no money, no job) to the highest of the highs (A millionaire with his own investment firm). If you ever think about giving up, watch this movie!
5- You Are Strong
You are stronger than you think. One little setback is not enough to stop you from achieving your goals. Neither are 10 or 100 or 1000 setbacks.
6- Prove Yourself
You don’t want to be known as someone that is weak and gives up. Go out there and prove yourself to the world and to yourself. You CAN and WILL achieve what you set out to do. The only time you fail is when you give up.
7- Has It Been Done Before?
If someone else can do it then so can you. Even if it is only one other person in the world that has achieved what you have set out to achieve, that should be reason enough for you to never give up.
8- Believe In Your Dreams
Don’t sell yourself short. In life there are going to be many people who will try to bring you down and tell you what you want to achieve is not possible. Don’t let anyone destroy your dreams.
9- Your Family and Friends.
Let the people you love and who mean the world to you be your inspiration to persist and persevere. Maybe you need to try a different angle, study more or practice more but don’t give up!
10- There Are People Worse-Off
Right now there are many people who are in a worse situation and environment than you are right now. Are you thinking about giving up running 5 miles a week? Think about the people who are unable to even walk and how much they would give to be able to run 5 miles every day.
11- Improve Our World
When you achieve whatever you set out to achieve you can use your success to make a difference to the world or other peoples lives.
12- Get Rich or Die Trying
Like Fiddy (50 cent) says, “Get rich or die trying”. 50 Cent is rich, he made it (although he did get shot 9 times). Face your fears and don’t take the easy way out by giving up.
13- Let The Haters Hate
There will always be haters. There will always be plenty of naysayers  and people who try to tear you down. Don’t pay attention to them and don’t take what they say to heart. Let the haters hate and you keep believing in yourself.
14- You Deserve To Be Happy
Don’t ever let anybody tell you otherwise. You deserve to be happy and you deserve to have success. Keep that mindset and never give up until you reach your destination!
15- Inspire Others
Be an inspiration to others by refusing to give up. Who knows what someone else can achieve because you never gave up and in turn inspired them not to give up.
16- You Are So Close
Often when you feel like you want to give up and you are about to give up you are so close to making a huge break-thru. Seth Godin has written an awesome book about this called “The Dip” – a riveting read that teaches that at any given time you are always just a heartbeat away from success.

P.S. NEVER GIVE UP!

The content of the above article has been extracted from the following address with some modifications
 http://www.pickthebrain.com/blog/22-reasons-to-never-give-up/

Sunday, January 27, 2013

Database Day 02: Functions of A Database Management System

Functions of A Database Management System (DBMS)

  1. Create database
  2. Create tables
  3. Create supporting structures (e.g. indexes)
  4. Read database data
  5. Modify (insert, update, or delete) database data
  6. Maintain database structures
  7. Enforce rules
  8. Control concurrency
  9. Provide security
  10. Perform backup and recovery
For example, an organization developes a database that is used to manage its data. The company has two buildings that house different departments. The first building houses Administration, Accouting, Finance and Human Resources departments and the second buidling houses Production, Marketing, and Information Systems departments.The company database contains data about company employees, departments, company projects, company assests (e.g. computer equipment, buildings), and other aspects of company operations (e.g. sale orders, purchasing orders, products).

References

  1. David Kroenke and David Auer (2011). Database Processing: Fundamentals, Design, and Implementation, 12 edition, Prentice Hall.

Friday, January 25, 2013

Operating Systems Day 09 Memory allocation schemes

Fixed size partitions or static partitions

Descriptions

  1. Each partition contains only one job
  2. Entire program is stored contiguously and in memory from the beginning to the end of its execution
  3. This partition scheme is suitable for a system where its jobs have the same size or its sizes are known ahead of time and don't vary between reconfigurations.

Advantages

  1. Protect the job's memory space
  2. Allow several programs to be in memory at the same time, compared with the single-user scheme

Shortcomings

  1. May suffer from internal fragmentation
  2. Large jobs may have a longer turnaround time as they wait for free partitions of sufficient size or may never run
  3. A small job occupies its entire partition. As a result, the unused memory in the partition will remain idle.

Dynamic partitions

Descriptions

  1. Available memory is still kept in contiguous blocks but jobs are given only as much memory as they request.

Advantages

  1. Allocate as much memory as a process requests.

Shortcomings

  1.  May suffer external fragmentation where fragments of memory between blocks of allocated memory cannot be used.

References

  1. McHoes, A., & Flynn, I.M. (2011). Understanding operating systems (6th ed.). CENGAGE Learning.

Saturday, January 19, 2013

Business model tool

Create a business model using a canvas.
Product in the middle


Another business model canvas example captured from the Apple App Store App called "Business Model Toolbox"





Tablet wish list


  1. Long battery >= 12 hours
  2. Responsive
  3. High resolution display (retina display)
  4. Light weigh < 700g
  5. Sharpness
  6. Reasonable price < $AUD 500

Mounting USB drives in Windows Subsystem for Linux

Windows Subsystem for Linux can use (mount): SD card USB drives CD drives (CDFS) Network drives UNC paths Local storage / drives Drives form...