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
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
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
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
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:
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