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

Optimized algorithm to schedule tasks with dependency?

There are tasks that read from a file, do some processing and write to a file. These tasks are to be scheduled based on the dependency. Also tasks can be run in parallel, so the algorithm needs to be optimized to run dependent tasks in serial and as…
user2186138
  • 337
  • 1
  • 5
  • 9
27
votes
3 answers

How to schedule a task in Tomcat

I have a web application deployed in Tomcat. I have a set of code in it, that checks database for certain data and then sends a mail to users depending on that data. Can somebody suggest how to schedule this in Tomcat.
dileepVikram
  • 890
  • 4
  • 14
  • 30
26
votes
4 answers

Quartz Java resuming a job executes it many times

For my application I create jobs and schedule them with CronTriggers. Each job has only one trigger and both the job name and the trigger names are the same. No jobs share a trigger. Now when i create a cron trigger like this "0/1 * * * * ?" which…
Savvas Dalkitsis
  • 11,476
  • 16
  • 65
  • 104
25
votes
4 answers

real time scheduling in Linux

This morning I read about Linux real time scheduling. As per the book 'Linux system programming by Robert Love', there are two main scheduling there. One is SCHED_FIFO, fifo and the second is SCHED_RR, the round robin. And I understood how a fifo…
theB
  • 2,048
  • 2
  • 20
  • 29
23
votes
4 answers

How to calculate Average Waiting Time and average Turn-around time in SJF Scheduling?

In SJF (Shortest Job First) Scheduling method. How to calculate Average Waiting Time and average Turn-around time? Is Gannt Chart correct ?
Failed_Noob
  • 1,347
  • 18
  • 51
  • 67
23
votes
5 answers

Practical Alternative for Windows Scheduled Tasks (small shop)

I work in a very small shop (2 people), and since I started a few months back we have been relying on Windows Scheduled tasks. Finally, I've decided I've had enough grief with some of its inabilities such as No logs that I can find except on a…
AlanR
  • 1,162
  • 4
  • 14
  • 26
22
votes
4 answers

How does select work when multiple channels are involved?

I found when using select on multiple non buffered channels like select { case <- chana: case <- chanb: } Even when both channels have data, but when processing this select, the call that falls in case chana and case chanb is not balanced. package…
Terry Pang
  • 359
  • 1
  • 2
  • 6
22
votes
9 answers

A priority queue which allows efficient priority update?

UPDATE: Here's my implementation of Hashed Timing Wheels. Please let me know if you have an idea to improve the performance and concurrency. (20-Jan-2009) // Sample usage: public static void main(String[] args) throws Exception { Timer timer =…
trustin
  • 12,231
  • 6
  • 42
  • 52
22
votes
4 answers

Is there a scheduling algorithm that optimizes for "maker's schedules"?

You may be familiar with Paul Graham's essay, "Maker's Schedule, Manager's Schedule". The crux of the essay is that for creative and technical professionals, meetings are anathema to productivity, because they tend to lead to "schedule…
John Feminella
  • 303,634
  • 46
  • 339
  • 357
22
votes
9 answers

Spring scheduler which is run after application is started and after midnight

How to describe Spring scheduler which is run after application is started and after 00:00 ?
Nawa
  • 2,058
  • 8
  • 26
  • 48
21
votes
6 answers

Cooperative Scheduling vs Preemptive Scheduling?

In the book Core Java : Volume 1 Fundamentals -> chapter MultiThreading . The Author wrote as follows : "All modern desktop and server operating systems use preemptive scheduling. However, smaller devices such as cell phones may use …
Roshan
  • 667
  • 1
  • 5
  • 15
21
votes
7 answers

how to schedule a task in MVC4 C#?

I wanna create a notification system on my website?(something like stack-overflow) How can we schedule a task for mailing the notification for users on each 24 hours? Can we use MVC4 or we should use windows service ? Edit: My Experience with using…
Mohammad Dayyan
  • 21,578
  • 41
  • 164
  • 232
20
votes
4 answers

Windows task scheduler to execute tasks in seconds

I'm looking for an open source/free task scheduler for Windows 7 (development machine) that will allow me to schedule tasks (HTTP requests to a web service) to run every x seconds. I've tried a couple of Cron clones and windows own Task Scheduler…
Barry Jordan
  • 2,666
  • 2
  • 22
  • 24
20
votes
1 answer

Niceness and priority processes on Linux system

I am looking for a way to modify a process' priority through command line. I found the builtin (bash) nice and the command renice which allow to modify the niceness of the process, but not the actual priority which is calculated by the kernel. Is…
Hugo
  • 535
  • 1
  • 3
  • 13
20
votes
4 answers

Goroutines are cooperatively scheduled. Does that mean that goroutines that don't yield execution will cause goroutines to run one by one?

From: http://blog.nindalf.com/how-goroutines-work/ As the goroutines are scheduled cooperatively, a goroutine that loops continuously can starve other goroutines on the same thread. Goroutines are cheap and do not cause the thread on which they…
m0meni
  • 16,006
  • 16
  • 82
  • 141