Questions tagged [scheduling]

In computer science, scheduling is the method by which threads, processes or data flows are given access to system resource.

Source: "Scheduling (computing)" article on Wikipedia

Types of scheduling

  • Round-robin

    Processes are given a set amount of time. For more information see

  • First come first serve

    Processes are executed in the order of the queue.

  • Shortest job first

    Processes are executed in order of estimated time.

  • Shortest remaining time

    Similar to shortest job first; however, if a new, shorter process joins the queue, then the scheduler will switch to that one.

  • Multi-level feedback queue

    There is more than just one queue, each queue has a certain priority and the scheduler can move jobs between queues when necessary. Modern operating systems like Windows use this.

2772 questions
10
votes
2 answers

A task/job scheduling problem

I have a task/job scheduling problem and I would like to find preferably efficient algorithms to solve it. Let's say there are some workers. Every worker is able to do a different set of tasks/jobs. The following example may make it clear: Worker…
yanjiang qian
  • 101
  • 1
  • 1
  • 4
10
votes
5 answers

What is the best way to schedule a sending-email task with Ruby on Rails?

I would like to schedule a daily task : every day at 7 AM, I want an email to be sent (without human intervention). I'm working on the RoR framework and I'm wondering what is the best way to do that? I've heard about BackgrounDRB, OpenWFEru…
Flackou
  • 3,631
  • 4
  • 27
  • 24
10
votes
3 answers

in ps -l, what does wchan=stext mean?

when I try to fine-tune my process, I see that the waiting channel is stext, what does it mean?
akiva
  • 2,677
  • 3
  • 31
  • 40
10
votes
2 answers

Is Work Stealing always the most appropriate user-level thread scheduling algorithm?

I've been investigating different scheduling algorithms for a thread pool I am implementing. Due to the nature of the problem I am solving I can assume that the tasks being run in parallel are independent and do not spawn any new tasks. The tasks…
Il-Bhima
  • 10,744
  • 1
  • 47
  • 51
10
votes
6 answers

Optimal room count and sizes for N overlapping Meeting Schedules

I bumped into this question and I am not sure if my solution is optimal. Problem Given N weighted (Wi) and possibly overlapping intervals (representing meeting schedules) , find the minimum number "&" capacity of meeting rooms needed to conduct all…
10
votes
1 answer

SCHED_FIFO process with priority of 99 gets preempted?

this is from sched_setscheduler(2) - Linux man page: "Processes scheduled under one of the real-time policies (SCHED_FIFO, SCHED_RR) have a sched_priority value in the range 1 (low) to 99 (high)." "A SCHED_FIFO process runs until either it is…
Piotr S
  • 95
  • 1
  • 1
  • 4
10
votes
1 answer

Replacing Celerybeat with Chronos

How mature is Chronos? Is it a viable alternative to scheduler like celery-beat? Right now our scheduling implements a periodic "heartbeat" task that checks of "outstanding" events and fires them if they are overdue. We are using python-dateutil's…
Goro
  • 9,919
  • 22
  • 74
  • 108
9
votes
1 answer

Does a context switch occur in a system whose ready queue has only one process and which uses round-robin scheduling?

Does a context switch occur in a system whose ready queue has only one process and which uses round-robin scheduling? Assume that current cpu burst of the lone process spans more than one time-slice of the round-robin algorithm. My reasoning is as…
Abhijith Madhav
  • 2,748
  • 5
  • 33
  • 44
9
votes
3 answers

scheduling a job every minute Rails 3.1 on Heroku

I want to run a task every minute on Heroku to check if conditions are met to time-out certain user tasks. I can only run a Heroku cron job every hour, so what's the best way to set up a timed task like this. I am using Rails 3.1 on Heroku.
Richard Jordan
  • 8,066
  • 3
  • 39
  • 45
9
votes
2 answers

Task Scheduling with complex dependencies

I'm looking for a way of scheduling tasks where a task starts once several previous tasks have completed. I have several hundred "collector" processes which collect data from a variety of sources and dump it to a database. Once these have finished…
Crashthatch
  • 1,283
  • 2
  • 13
  • 20
9
votes
1 answer

In the scheduler of the GHC RTS, why should it mark a capability as free?

When I read through the GHC Wiki commentary on the scheduler I was confused about this section: One reason behind marking a Capability as free when it is handed over is to support fast callouts. When making a safe foreign call we have to…
wuxb
  • 2,572
  • 1
  • 21
  • 30
9
votes
1 answer

How to schedule tasks in Ktor microservice app

I am trying to schedule a task in my Ktor application, however I have not been able to find anything online about how to do this. Does anyone have any recommendations or been able to do this before?
Anesh P.
  • 155
  • 1
  • 7
9
votes
3 answers

Spring3 's @Transactional @Scheduled not committed to DB?

This is my 1st time trying Spring3's @Scheduled , but found I cannot commit to DB. This is my code : @Service public class ServiceImpl implements Service , Serializable { @Inject private Dao dao; @Override @Scheduled(cron="0 0 * * * ?") …
smallufo
  • 11,516
  • 20
  • 73
  • 111
9
votes
3 answers

scheduling dynamic jobs in resque scheduler

I'm trying to test out scheduling jobs in future using rails 3 and resque scheduler: Following is the code I'm using but I'm getting NoMethodError set_schedule. Resque.set_schedule("1", { :cron => "30 6 * * 1", :class => "Notify", :queue =>…
ed1t
  • 8,719
  • 17
  • 67
  • 110
9
votes
3 answers

How does the scheduler know that a thread is blocked waiting for input?

When a thread executing user code is waiting for input, how does the scheduler know to interrupt it or how does the thread know to call the scheduler, seeing as the average programmer of a simple single threaded application is unlikely to insert …
Lewis Kelsey
  • 4,129
  • 1
  • 32
  • 42