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
13
votes
3 answers

What context does the scheduler code run in?

There are two cases where the scheduler code schedule() is invoked- When a process voluntarily calls schedule() Timer interrupt calls schedule() In case 2, I think schedule() runs in interrupt context, but what about the first case? Does it run in…
Pavan Manjunath
  • 27,404
  • 12
  • 99
  • 125
13
votes
3 answers

Methods for scheduling

I am working on a PHP application for an at home care company. They have x amount of carers that are scheduled every week to attend the houses of x amount of service users (clients). Each service user has a set 'schedule' of when they are to be…
Daniel Greaves
  • 987
  • 5
  • 24
13
votes
2 answers

Is this algorithm an existing real-time system algorithm?

I have developed a scheduling algorithm that provides probabilistic soft real-time guarantees, but it seems too obvious and simple to be novel. I have had a hard time though relating it to published real-time scheduling algorithms (EDF, sporadic…
Mike
  • 211
  • 2
  • 4
13
votes
4 answers

jruby on rails scheduling options

I'm using JRuby 1.5.6 on Rails to build myself an application that will periodically go away and retrieve any RSS podcasts that I have subscribed too. I've chosen JRuby primarily because I'm familiar with Java, wish to utilise the Rails framework…
Phil Ostler
  • 429
  • 3
  • 14
13
votes
4 answers

GcmNetworkManager scheduling issues

I am using GcmNetworkManager in my application for periodic and one of task task execution. I am getting these 2 errors and unable to figure out the reason. Implementation is correct as i am unable to reproduce these issue on staging. Fatal…
13
votes
1 answer

Timed Tasks (cron-like) in PHP

Is there a full featured, job scheduling package available for PHP? I'm looking for the PHP equivalent to Java's Quartz. I'm fine having things triggered externally from cron to drive the system. The functionality I'd be looking for: Ability to…
Tim
  • 6,851
  • 11
  • 42
  • 46
13
votes
1 answer

What is difference between sched_batch and sched_other scheduling?

I am working on Ubuntu project. Have not found clear difference between sched_batch and sched_other. Can anyone tell me the difference?
Tasneem
  • 118
  • 2
  • 14
13
votes
2 answers

In Celery, how can I keep long-delayed tasks from blocking newer ones?

I have two kinds of tasks. Task A is generated by celerybeat every hour. It runs immediately, and generates a thousand (or many thousand) instances of Task B, each of which has an ETA of one day in the future. Upon startup, an instance of Task A…
user620316
  • 435
  • 4
  • 11
13
votes
2 answers

Scala - futures and concurrency

I am trying to understand Scala futures coming from Java background: I understand you can write: val f = Future { ... } then I have two questions: How is this future scheduled? Automatically? What scheduler will it use? In Java you would use…
Bober02
  • 15,034
  • 31
  • 92
  • 178
13
votes
2 answers

Understanding discrepancy between POSIX and Linux/glibc sched_* functions

POSIX XSH 2.8.4 Process Scheduling defines the behavior of scheduling attributes for threads and processes. The sched_* interfaces are specified to affect the scheduling properties of the process, not the thread. This is clarified in the following…
R.. GitHub STOP HELPING ICE
  • 208,859
  • 35
  • 376
  • 711
12
votes
3 answers

Which is the better of the django event apps?

I've been looking at django-swingtime, django-schedule and django-agenda. Any recommendations of which is them easier to use, and if so any practical code examples out there? Couldn't find useful documentation or examples in the respective…
Swaroop C H
  • 16,902
  • 10
  • 43
  • 50
12
votes
2 answers

Java scheduled executor accuracy

There is a peculiarity that I encountered while using Java scheduled executors and was wondering if what I experienced is normal. I need to schedule tasks that execute at a predefined rate of 5 seconds. It is expected that these tasks will take…
Sevas
  • 4,215
  • 3
  • 27
  • 26
12
votes
3 answers

Pros and cons of using java.util.timer vs Quartz for scheduling?

I've got to write an app that performs a series of tasks: task to be run once at 0200 hours every day. task to be run once at 0400 hours ever day task to be run at 15 minute intervals starting at 0003 hours task to be run at 15 minute intervals…
Omar Kooheji
  • 54,530
  • 68
  • 182
  • 238
12
votes
1 answer

foreground threads vs background threads

MSDN states that: Background threads are identical to foreground threads with one exception: a background thread does not keep the managed execution environment running Is there any dereference in the Thread Quantum that given by OS to the…
Jalal Said
  • 15,906
  • 7
  • 45
  • 68
12
votes
1 answer

Java Timer Service running multiple times

I have created a function doWork() that's scheduled to run every day at 1:00 am, the function is as follows: @Schedule(hour = "1", persistent = false) public void doWork() { System.out.println("Starting .....\nTIME: " +…
Ahmed Anwar
  • 688
  • 5
  • 25