473,378 Members | 1,471 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.

Scheduler in C

Can anyone help me in writing a scheduler in C ... here is the description of what i want :-


Description
Create a C program that simulates the scheduler component of an operating system. Your scheduler will be based upon a real-life situation. Select one of the following situations as the processing model for your simulated scheduler:
1. A line at the bank : This involves the use of a single queue but multiple tellers (processors).

Your program will simulate process flow through your model. Processes would enter at random intervals, but arrange your program so that part of your test run has many processes (busy time) and part has few processes (slow time).

While executing, your program should provide some form of displayed output. You can graphically represent what is happening, or continually update a chart or summary. When all of your processes have completed, your program should display a summary with the following information:
* Total number of processes
* Average wait time incurred by the processes
* Average total time for each process
Feb 25 '08 #1
2 2307
gpraghuram
1,275 Expert 1GB
Can anyone help me in writing a scheduler in C ... here is the description of what i want :-


Description
Create a C program that simulates the scheduler component of an operating system. Your scheduler will be based upon a real-life situation. Select one of the following situations as the processing model for your simulated scheduler:
1. A line at the bank : This involves the use of a single queue but multiple tellers (processors).

Your program will simulate process flow through your model. Processes would enter at random intervals, but arrange your program so that part of your test run has many processes (busy time) and part has few processes (slow time).

While executing, your program should provide some form of displayed output. You can graphically represent what is happening, or continually update a chart or summary. When all of your processes have completed, your program should display a summary with the following information:
* Total number of processes
* Average wait time incurred by the processes
* Average total time for each process

Please read the Posting Guidelines before doing any blind posting like this

Raghuram
Feb 25 '08 #2
weaknessforcats
9,208 Expert Mod 8TB
This can be done with linked lists.

First, you create a linked list of empty nodes. These will be used for tasks.
Second, create other lists for the priority of the tasks. Maybe 1,2,3,4,5,6,7,8,9.
Third, to schedule a task, move a node from the empty list to the end of desired queue.
Fourth, to compete a task, move the node back to the empty list.
Fifth, to re-prioritize a task, kisy move the node from one queue to another.
Sixth, when the empty list has no more nodes, your scheduler is full.
Good luck.
Feb 25 '08 #3

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

Similar topics

4
by: keepyourstupidspam | last post by:
Anyone know of a reliable design for a Windows C++ Task Scheduler Class. The scheduler will expose a member function that will add schedules, its parameters will be an interval to run the tasks...
1
by: Mike Thomas | last post by:
I want to start this thread again - on my first attempt I was a little ambiguous and was not able to get the answer I need. I am trying to start Access 2000 on Windows NT 2000 Server by using the...
1
by: Neil Ginsberg | last post by:
I am having trouble using Windows Scheduler with an A2K database that has a password. The password is a db password, not a user-level security password. I have a routine I am looking for Scheduler...
4
by: LongBow | last post by:
Hello all, I have been working on my first embedded project which has been exciting and stressfull at the same time. My task now is to develop a good scheduler for transmitting ARINC labels....
7
by: Shane Story | last post by:
Have an app and would like to allow easy addition of MYAPP.EXE /F /P (for example) my prog with command line args, as a job to be run. Would like to make it easier on the user to run the app. ...
8
by: VMI | last post by:
I'm searching for a way to build a scheduler that will store its data in sql server. I've searched google but it mostly displays sites that sell scheduler controls. Anyone know of any sites that...
3
by: mayur_hirpara | last post by:
Hi, I am writing a VB.NET application. It is a Windows application at the moment. The application contains a button. the click event of button perform a long running task. It needs to be started...
2
by: yamca | last post by:
I want to write a task scheduler. But i cant make the logic between the scheduler and tasks. For example a have an external process which can add and delete tasks from scheduler. Every task has...
4
by: Sid Price | last post by:
Is there a .NET (2003) class available somewhere that might provide a comprehensive task scheduler with a better granularity than the one minute of the built-in scheduler on XP? Even down to 15...
1
by: =?Utf-8?B?YXVzdGlyb2I=?= | last post by:
Hi, While I realise that this may not be a very nice solution architecturally, I kick off a Scheduler in an ASP.NET 2.0 webservice in Application_Start() which is supposed to call a stored proc...
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
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.