473,378 Members | 1,507 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Giving inputs at random intervals of time

I am doing the implementation of ATC using CPU Scheduling Algorithms.

I will give a group of flights information(landing time,arrival time) at the beginning.Then it will schedule the landing based on SHORTEST JOB FIRST.

At random time interval,it should again ask for another sets of flights info.Then the flights are rescheduled based on SJF.

Now the problem is how to make the computer ask for the flight info at random time intervals?

Please help me..its urgent..
Apr 9 '07 #1
1 1625
ilikepython
844 Expert 512MB
I am doing the implementation of ATC using CPU Scheduling Algorithms.

I will give a group of flights information(landing time,arrival time) at the beginning.Then it will schedule the landing based on SHORTEST JOB FIRST.

At random time interval,it should again ask for another sets of flights info.Then the flights are rescheduled based on SJF.

Now the problem is how to make the computer ask for the flight info at random time intervals?

Please help me..its urgent..
HI,
try the rand() and srand() functions to generate random integer then delay for that amount of time.
Apr 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Keith Tellinghuisen | last post by:
I have developed some courses whereby a php script reads and displays a textfile. Clicking a "Next" button increments a variable and submits the form to the same page, which then reads and displays...
28
by: Paul Rubin | last post by:
http://www.nightsong.com/phr/python/sharandom.c This is intended to be less predicable/have fewer correlations than the default Mersenne Twister or Wichmann-Hill generators. Comments are...
2
by: Salmo Bytes | last post by:
I want to make an animated gif that runs through one loop and then stops. But I want to invoke it at random time intervals...so, for instance, a tight head shot of a person's face winks at the...
23
by: Alvin | last post by:
Well, I'm developing a Tetris game in SDL, but when it comes to deciding the next block, I'm stuck. It's random, but when I try something like seeding the randomizer with the time, it won't update...
15
by: Papajo | last post by:
Hi, This script will write a random number into a document write tag, I've been trying to get it to write into a input form box outside the javascript, any help is appreciated. Thanks Joe ...
14
by: Anthony Liu | last post by:
I am at my wit's end. I want to generate a certain number of random numbers. This is easy, I can repeatedly do uniform(0, 1) for example. But, I want the random numbers just generated sum up...
11
by: TreatmentPlant | last post by:
I need to generate a few thousand true random numbers using C++. I have some code now that does alright, but when you plot the results on a graph, you notice patterns, so the numbers are not...
7
by: Brian | last post by:
Hi there I have been looking for a script that can randomly rotate 8 different images on 1 page. I used to have a script that did this but can't find it now. I have found loads of script that...
34
by: Johannes Baagoe | last post by:
About Math.random(), ECMA 262 just says "Returns a number value with positive sign, greater than or equal to 0 but less than 1, chosen randomly or pseudo randomly with approximately uniform...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.