Results 1 to 6 of 6
- 11-08-2009, 08:51 AM #1
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
- 11-08-2009, 09:57 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,400
- Blog Entries
- 7
- Rep Power
- 17
There are a lot more details you have to fill in:
- does a thread/process run from start to finish without relinguishing control?
- what is the scheduling algorithm for submitted processes?
- does it take time to start and clean up a process?
kind regards,
Jos
- 11-08-2009, 02:56 PM #3
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
rep
Write a program to list the waiting time of the processes based on the arrival time and the burst time under non preemptive scheduling. In the Non Preemptive Scheduling, the current process keeps the CPU until it releases the CPU by terminating. The operating system never initiates a context switch from a running process to another process.
when there is more than one processes waiting for the CPU, the process which will release the cpu first by calculating the sum of arrival time and burst time, will be allocated.
Input
int process[] = {1, 2, 3, 4}
int arrival[] = {0, 2, 4, 5}
int burst[] = {7, 4, 1, 4}
Output
The function getWaitingList() returns {0, 6, 3, 7}
Explanation:
process 1 3 2 4
0 7 8 12 16 Start time of the process
The waiting time should be: 0, 6, 3, 7
- 11-08-2009, 03:16 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,400
- Blog Entries
- 7
- Rep Power
- 17
Ah, this is homework, there is nothing challenging about it; so, what have you done yourself so far?
kind regards,
Jos
- 11-10-2009, 09:12 AM #5
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
rep
actually i am very new to java with a very little programming experience, i hav no idea how to solve this. Its my university assignment. Kindly help me to find a solution 4 this
- 11-10-2009, 09:23 AM #6
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Similar Threads
-
challenging problems
By jayant3001 in forum JCreatorReplies: 24Last Post: 10-30-2008, 05:41 AM -
Is it possible to make this in Java? Challenging question.
By matt_well in forum New To JavaReplies: 24Last Post: 07-29-2008, 04:04 PM -
Quartz scheduling in EJB3
By Niveditha in forum Enterprise JavaBeans (EJB)Replies: 0Last Post: 06-30-2008, 08:34 AM -
Scheduling tasks using Threads
By Java Tip in forum Java TipReplies: 0Last Post: 12-11-2007, 10:24 AM -
Scheduling a task
By bugger in forum Advanced JavaReplies: 3Last Post: 12-04-2007, 12:32 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks