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
36
votes
5 answers

Controlling scheduling priority of python threads?

I've written a script that uses two thread pools of ten threads each to pull in data from an API. The thread pool implements this code on ActiveState. Each thread pool is monitoring a Redis database via PubSub for new entries. When a new entry is…
backus
  • 4,076
  • 5
  • 28
  • 30
34
votes
3 answers

How to create a new Linux kernel scheduler

Looking through the scheduler source code (2.6.34, kernel/sched.c), I can see how the "pluggable" schedulers are used, and I believe I understand the interface to be implemented. What I don't understand yet is how to get my code built into the…
J Teller
  • 1,421
  • 1
  • 11
  • 14
33
votes
3 answers

How Linux handles threads and process scheduling

I'm trying to understand how Linux handles process scheduling and thread scheduling. I read that Linux can schedule both processes and threads. Does Linux have a thread scheduler AND a process scheduler? If yes, how do they cooperate?
whitefox
  • 955
  • 2
  • 10
  • 7
32
votes
4 answers

Python script scheduling in airflow

Hi everyone, I need to schedule my python files(which contains data extraction from sql and some joins) using airflow. I have successfully installed airflow into my linux server and webserver of airflow is available with me. But even after going…
Abhishek Pansotra
  • 947
  • 2
  • 13
  • 17
31
votes
4 answers

Quartz.NET vs Windows Scheduled Tasks. How different are they?

I'm looking for some comparison between Quartz.NET and Windows Scheduled Tasks? How different are they? What are the pros and cons of each one? How do I choose which one to use? TIA,
Serge Wautier
  • 21,494
  • 13
  • 69
  • 110
31
votes
14 answers

Spring Scheduler does not work

I have a problem with Spring's annotation based task scheduler - I can't get it working, I don't see any problem here... application-context.xml
user219882
  • 15,274
  • 23
  • 93
  • 138
31
votes
3 answers

How to stop a task in ScheduledThreadPoolExecutor once I think it's completed

I have a ScheduledThreadPoolExecutor with which I schedule a task to run at a fixed rate. I want the task to be running with a specified delay for a maximum of say 10 times until it "succeeds". After that, I will not want the task to be retried. So…
mystarrocks
  • 4,040
  • 2
  • 36
  • 61
30
votes
10 answers

Teacher time schedule algorithm

This is a problem I've had on my mind for a long time. Being the son of a teacher and a programmer, it occurred to me early on... but I still haven't found a solution for it. So this is the problem. One needs to create a time schedule for a school,…
Sklivvz
  • 30,601
  • 24
  • 116
  • 172
30
votes
5 answers

Calling a function every 10 minutes

I'm not an expert, just a beginner. So I kindly ask that you write some code for me. If I have two classes, CLASS A and CLASS B, and inside CLASS B there is a function called funb(). I want to call this function from CLASS A every ten minutes. You…
user149537
29
votes
4 answers

Wait on multiple condition variables on Linux without unnecessary sleeps?

I'm writing a latency sensitive app that in effect wants to wait on multiple condition variables at once. I've read before of several ways to get this functionality on Linux (apparently this is builtin on Windows), but none of them seem suitable for…
Joseph Garvin
  • 20,727
  • 18
  • 94
  • 165
29
votes
6 answers

When are lock free data structures less performant than mutual exclusion (mutexes)?

I read somewhere (can't find the page anymore) that lock free data structures are more efficient "for certain workloads" which seems to imply that sometimes they're actually slower or the gain from them can be zero in some situations. Taking the…
Joseph Garvin
  • 20,727
  • 18
  • 94
  • 165
28
votes
1 answer

How does DateTimeOffset deal with daylight saving time?

I am storing schedules in the database as a day of the week, hour and minute. When the data is read we create a DateTime object for the next occurrence of that day, hour and minute, but I need to modify this to be DST-aware. I am able to modify the…
Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
28
votes
4 answers

Best fit scheduling algorithm

There are several events, each with multiple meeting times. I need to find an arrangement of meeting times such that each schedule contains any given event exactly once, using one of each event's multiple meeting times. I could use brute force, but…
stillinbeta
  • 1,977
  • 3
  • 17
  • 23
28
votes
3 answers

DAG(directed acyclic graph) dynamic job scheduler

I need to manage a large workflow of ETL tasks, which execution depends on time, data availability or an external event. Some jobs may fail during execution of the workflow and the system should have the ability to restart a failed workflow branch…
27
votes
1 answer

Using the GWT Scheduler

I'm having a tough time understanding the difference between various methods of the com.google.gwt.core.client.Scheduler interface, specifically, the scheduleDeferred, scheduleFinally, and scheduleIncremental methods. I'm hampered in my…
David
  • 5,184
  • 3
  • 41
  • 67