[algogeeks] Scheduling Algo

2013-05-02 Thread amarkrdubedy
Design a scheduler to run many functions at different times. It needs to (obviously) be thread-safe. Each task which is scheduled to run will have a time stamp, containing a desired execution time, a function pointer (containing the desired function). Also, find a way to supply the arguments

Re: [algogeeks] Scheduling

2011-06-07 Thread sunny agrawal
Sort in decreasing order of Ci ? On Tue, Jun 7, 2011 at 8:22 AM, aanchal goyal goyal.aanch...@gmail.comwrote: Given n jobs, each ith job has a cost Ci associated with it. The waiting time for a job i is defined as Ci*Delay, where Delay is the number of days it takes from the first day to

Re: [algogeeks] Scheduling

2011-06-07 Thread Aakash Johari
yes, it's correct. simply sort according to their costs (in decreasing order) On Mon, Jun 6, 2011 at 11:52 PM, sunny agrawal sunny816.i...@gmail.comwrote: Sort in decreasing order of Ci ? On Tue, Jun 7, 2011 at 8:22 AM, aanchal goyal goyal.aanch...@gmail.comwrote: Given n jobs, each ith

[algogeeks] Scheduling

2011-06-06 Thread aanchal goyal
Given n jobs, each ith job has a cost Ci associated with it. The waiting time for a job i is defined as Ci*Delay, where Delay is the number of days it takes from the first day to complete a job. Assume each job can be completed in 1 day. So, a job started at day 1 will have delay=1, the one

[algogeeks] Scheduling dp problem - MSFT interview

2011-05-30 Thread ross
You are given a sequence of jobs. The no. of days which each job takes to complete is also provided. You are also given the penalty amount to be paid per day each day a job left done. Give an optimal ordering among jobs to minimize penalty. There are no concurrent jobs. eg: Jobs:

[algogeeks] scheduling problem

2006-03-17 Thread aj
Hello, Suppose we want to add n numbers using multi processors. Each of these numbers arrive at different time. The goal is to find a scheduling such that the final sum can be computed as early as possible (assume that each addition takes unit time). As can be verified easily that the