FAQ Database Discussion Community


Is dynamic scheduling better or static scheduling (Parallel Programming)?

multithreading,parallel-processing,openmp,scheduling
I understand my question title is rather broad, I am new to parallel programming and openmp. I tried to parallelize a C++ solution for the N-body problem and study it for different schedule types and granularity. I collected data by running program for different cases and plotted the data, this...

Running a scheduler on more than one machine

java,db2,locking,scheduling
I have a Java service which creates x games in the future every y seconds (calculating start time and end time for each of them) and inserts them into a DB2 table. The code basically looks for the end time of the last created game, if it exists and is...

Algorithm for technician time window scheduling

algorithm,scheduling,job-scheduling,bin-packing
I am looking for an algorithm (and hopefully a .net implementation) that can do the following: I have the following data: a list of technicians each one with different skills (could be more than one). a service time window (e.g. 8-12) a list of all previously scheduled jobs within this...

FCFS simulator I think my pop function is not working?

c,linked-list,scheduling
Heres my C code. I am trying to simulate an FCFS scheduler. By reading in command line arguments I create a timer to simulate time. Everytime it increases I check if a process arrived (using the array), if it did I put it into a LinkedList to represent the Ready...

Windbg: break on timer / scheduler interrupt and print EIP

windows,windbg,scheduling
Is there a way to setup a breakpoint on the interrupt service routine on Windows which is responsible to trigger thread scheduling and print the EIP of the thread which was interrupted? I tried to with hal!HalpClockInterrupt but it seems its not the right place. nt!KeUpdateRunTime seams better: Breakpoint 3...

Class Scheduling to Boolean satisfiability [Polynomial-time reduction]

c,algorithm,scheduling,reduction,sat
I have some theorical/practical problem and I don't have clue for now on how to manage, Here it is: I create a SAT solver able to find a model when one is existing and to prove the contradiction when it's not the case on CNF problems in C using genetics...

How to calculate awerage turnaround time - Round Robin and FIFO scheduling

scheduling,fifo
Five processes begins with their execution at (0, 0, 2, 3, 3) seconds and execute for (2, 2, 1, 2, 2) seconds. How do I calculate awerage turnaround time if: a) we use Round Robin (quantum 1 sec.) b) we use FIFO scheduling? I am not sure how to solve...

How to Schedule a job run at multiple time intervals

java,spring,scheduling
We've a simple requirement to download files from different end point servers. We'll be scheduling these file downloads to happen at various time in the day (customizable from the GUI). We've been using Spring Scheduling & its working for a single job to download from a single server. Now we...

Append to linked list not working?

c,pointers,linked-list,scheduling
I am trying to make a Round Robin scheduling simulator in C. I made it so that the program reads an input file and stores all of the processes info into an array. Then I put all that info into an array of "jobs". Then I made a Counter function...

Doubly linked list of process control block in Operating Systems

operating-system,scheduling,doubly-linked-list,rtos
What is the reasoning behind maintaining doubly linked lists of PCB's(process control blocks) in an OS for scheduling. I have seen this mentioned multiple times for Real time operating systems. I would ideally go for a circular singly linked list , so that you could do a round robin and...

SCAN and C-SCAN disk scheduling

operating-system,scheduling,disk
http://www.slideshare.net/myrajendra/scan-scheduling-50-1 http://www.slideshare.net/myrajendra/c-scan-scheduling-50-2 In the above links both SCAN and C-SCAN was explained with a same example but why does SCAN moves towards left and C_SCAN moves towards right?...

Using Whenever gem with Rails Active Job to schedule a batch email job

ruby-on-rails,ruby,scheduling
I'm trying to understand how to use whenever properly, or if I'm even using it for the right thing. I've created a job: class ScheduleSendNotificationsJob < ActiveJob::Base queue_as :notification_emails def perform(*args) user_ids = User. joins(:receipts). where(receipts: {is_read: false}). select('DISTINCT users.id'). map(&:id) user_ids.each do |user_id| SendNotificationsJob.create(id: user_id) Rails.logger.info "Scheduled a job...

Achive interleaving multi-thread execution

c,multithreading,scheduling
I have two methods, fun1 and fun2, which are called by two different set of threads. I want to interleave their execution in a random order, the same way the order is random inside each of the two set of threads. How can I achieve this? #include <stdio.h> #include <stdlib.h>...

what's the difference between pthread_attr_setschedparam and pthread_setschedparam?

linux,pthreads,posix,scheduling
what's the difference between pthread_attr_setschedparam and pthread_setschedparam? How should I make decision to choose one to use?

The job queue and the ready queue

operating-system,scheduling,scheduler
What is the difference between the job queue and the ready queue and are they mutually exclusive? The ready queue contains all the process stored in main memory, awaiting execution or simply all the processes that are ready to execute - which can be in the job queue? When a...

Multilevel Feedback Queue scheduling - Paper & Pencil example

scheduling,dlx
I cannot seem to find a good example of a multilevel feedback queue online showing what will happen. I don't necessarily need the whole question answered, just how to do a few iterations, given the following problem: Process A: p nice = 2, run for 0.1s, sleep for 0.6s, run...

Crontab - simple echo not running

linux,cron,scheduling
I've got such situation: I want to schedule a job with crontab on a linux server. I'm not super-user, so I'm editing (with crontab -l, editor vim) only my crontab file. For testing, I put there: * * * * * echo asdf And the job is not running. Is...

CPLEX/OPL model - constraints with subset index

constraints,scheduling,subset,cplex,opl
I am currently programming a CPLEX/OPL model using IBM ILOG CPLEX Optimization Studio. I have a problem with using sums or indexes which contain a subset and depend on another parameter/variable, e.g. check the following constraints: NB 2,3,4,8). Can anyone help me with incorporating these constraints properly? Please find the...

How is a process state updated to blocked state (TASK_INTERRUPTABLE)?

kernel,process,io,block-device,scheduling
When a process is waiting for IO, how is the task state updated to TASK_INTERRUPTABLE (that is, blocked)? Imagine this case, a process issues an IO request to a block device. According to my previous thread, the process finally invokes elv_add_request() to add the request to the IO queue. So...

Scheduling a Peoplesoft SQR Process from SQR

scheduling,peoplesoft,sqr
In our project, we have a situation where we need to schedule an SQR on a specific date at the end of processing of another SQR. We can't set a recurrence since the date of the next run will be calculated based on rules and is not constant. Can anyone...

scheduling service using AlarmManager in android

android,service,alarmmanager,scheduling
I'm trying to schedule a service through AlarmManager with following code: The onCreate() of MainActivity is as follows: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); /* if(isMyServiceRunning(MyService.class)) { Toast.makeText(this, "Service already Running", Toast.LENGTH_LONG).show(); } else{ startService(new Intent(getBaseContext(), MyService.class)); } */ AlarmManager alarmManager; PendingIntent alarmIntent; Calendar calendar = Calendar.getInstance();...

Scheduling an ersatz background fetch in iOS

ios,cocoa-touch,scheduling,background-fetch
I'm trying to get my app to perform a background fetch at a specific, scheduled time. I had the idea of letting iOS sort this out for itself, so (in AppDelegate): - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)]) { [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert|UIUserNotificationTypeSound...

How to schedule a batch script file biweekly?

batch-file,scheduled-tasks,scheduling
I have batch file which calls multiple batch files within itself. I need this file to run biweekly (Friday's 10 A.M) when a file drops in a specific path. I checked the Windows task scheduler but it doesn't have biweekly option. I think we can use the trigger option (to...

Round Robin C scheduling simulator

c,scheduling,round-robin
I am making a simulator for Round Robin scheduling algorithm in C. Right now I made it so that the time quantum is 2. So every 2 seconds it takes a "process" from the front of the list, reduces its remaining time by 2, and then sticks it to the...

How do I know the last sched time of a process

linux,process,linux-kernel,scheduling
I current run into an issue that a process seems stuck somehow, it just doesn't gets scheduled, the status is always 'S'. I have monitored sched_switch_task trace by debugfs for a while, didn't see the process get scheduled. So I would like to know when is that last time scheduled...

using system call in Linux kernel file

linux-kernel,scheduling,scheduler,system-calls
I am implementing a custom process scheduler in Linux. And I want to use a system call to record my program so that I can debug easily. The file I write is source code : linux-x.x.x/kernel/sched_new_scheduler.c In sched_new_scheduler.c could I use syscall(the id of the system call, parameter); directly? It...

Web Audio - AudioParam scheduling functions not working

javascript,scheduling,web-audio
I think i am completely missing something. None of the setValueAtTime(), linearRampToValueAtTime(), exponentialRampToValueAtTime(), setTargetAtTime() methods of the AudioParam interface are working for me. The simplest possible example below: var context = new window.AudioContext(); gain = context.createGain(); gain.connect(context.destination); // none of this is working, gain stays at 1 gain.gain.setValueAtTime(0.5, 0); gain.gain.setValueAtTime(0.2,...

Kernel spin-lock enables preemption before releasing lock

linux,linux-kernel,kernel,locking,scheduling
When I was discussing the behavior of spinlocks in uni- and SMP kernels with some colleagues, we dived into the code and found a line that really surprised us, and we can’t figure out why it’s done this way. short calltrace to show where we’re coming from: spin_lock calls raw_spin_lock,...