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

Limit number of simultaneously running containers per application in yarn

Suppose a yarn application has long-running tasks (running for 1 hour or longer). When a MR job starts, all cluster resources are blocked, at least until one container is finished, which sometimes can take a long time. Is there a way to limit the…
Ivan Balashov
  • 1,897
  • 1
  • 23
  • 33
8
votes
6 answers

Heuristic algorithm for load balancing among threads

I'm working on a multi-threaded program where I have a number of worker threads performing tasks of unequal length. I want to load-balance the tasks to ensure that they do roughly the same amount of work. For each task Ti I have a number ci …
Il-Bhima
  • 10,744
  • 1
  • 47
  • 51
8
votes
2 answers

Linux kernel scheduling

I wish to know how Old Linux scheduling algorithm SJF (shortest job first) calculates the process runtime ?
Arpit
  • 4,259
  • 10
  • 38
  • 43
8
votes
3 answers

Launch an App on Samsung Smart TV startup

I want to automatically launch an app on TV startup. i.e. when the user power on the TV, TV will powerup and my app will start
eric
  • 199
  • 2
  • 3
  • 11
8
votes
1 answer

Mass Transit with Quartz / Scheduling - Are there any example implementations out there?

I have searched high and low for an example implementation or blog post on how to use Mass Transit's Quartz integration (https://github.com/MassTransit/MassTransit-Quartz). At the moment I have to make do with just looking at the unit tests that…
Mark Robinson
  • 13,128
  • 13
  • 63
  • 81
8
votes
4 answers

Using the default Scheduler in Akka, do I need to manually cancel events when the target actor stops?

When using the methods on the default Akka system scheduler (context().system().scheduler().schedule() from inside an actor), and one of the overloads accepting a destination actor, do I need to explicitly cancel using the returned Cancellable to…
SoftMemes
  • 5,602
  • 4
  • 32
  • 61
8
votes
4 answers

Run a function once on bottle.py startup

I have a bottle app that I eventually wan't to deploy on apache (just fyi in case that's important). Now I need to run a function once after the bottle app is started. I can't just put it into a routed function because it has to run even if no user…
pypat
  • 1,096
  • 1
  • 9
  • 19
8
votes
3 answers

Why one non-voluntary context switch per second?

The OS is RHEL 6 (2.6.32). I have isolated a core and am running a compute intensive thread on it. /proc/{thread-id}/status shows one non-voluntary context switch every second. The thread in question is a SCHED_NORMAL thread and I don't want to…
Prasoon Tiwari
  • 840
  • 2
  • 12
  • 23
8
votes
1 answer

KornShell (ksh) Scheduling Algorithms (SRT)

I have been given an assignment to read mock processes from a txt file that looks like this. ID: 35; Arrival_Time: 0; Total_Exec_Time: 4; ID: 65; Arrival_Time: 2; Total_Exec_Time: 6; ID: 10; Arrival_Time: 3; Total_Exec_Time: 3; ID: 124;…
Alex Naspo
  • 2,052
  • 1
  • 20
  • 37
8
votes
4 answers

Constantly monitor a program/process using Python

I am trying to constantly monitor a process which is basically a Python program. If the program stops, then I have to start the program again. I am using another Python program to do so. For example, say I have to constantly run a process called…
Rkz
  • 1,237
  • 5
  • 16
  • 30
8
votes
2 answers

Is there a java library for scheduling dependent runnables (given in a dependency DAG)?

I have a bunch of runnables I want to run in multiple threads and some depend on others to complete before they begin. I wrote a simple utility to do this, but is there a library that already provides this capability?
jonderry
  • 23,013
  • 32
  • 104
  • 171
8
votes
8 answers

How can I do Time based / scheduled events in .NET?

I need to offer scheduling of actions/events, in our web site. A crap analogy could be a calendar system, where a person adds a calendar item and when the date/time has been 'hit', then some logic (eg calculate a report) is fired. I could be having…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
7
votes
4 answers

Storing and retrieving process control block

When a process is in execution, the contents of the PCB (which is in kernel memory space?) are loaded onto the CPU registers, and status registers, kernel stack pointers, user stack pointers, etc. When there is a context switch to another process,…
7
votes
2 answers

Behavior of Java's ScheduledExecutorService.scheduleAtFixedRate()

I have a question regarding the scheduleAtFixedRate() method on ScheduledExecutorService in Java 6. [edit: the Javadoc for 1.6 is more complete than that for 1.5. See comment below] Given that: the ScheduledExecutorService is constructed with N =…
Michael Easter
  • 23,733
  • 7
  • 76
  • 107
7
votes
6 answers

Java - Scheduling a daily task

I'm looking for an effective way to execute a method everyday at 3PM regardless of when the application was initially run or how long it has been running. This must be done entirely from the application with no OS intervention (ex. Windows Task…
user98971
  • 73
  • 1
  • 3