php hit counter

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
operating assinment solution help
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
. Write a C program in Linux operating system to calculate the average waiting time for the given number of process with their CPU burst times.

You have to calculate average waiting time using Shortest Job First Scheduling.

For calculating avg. waiting time using SJF, you should create a child process using fork system call.

The parent process will contain an array of integers containing CPU burst times required by each process. There will be a variable int numberOfProcesses that indicates that how many elements are there in the array. Then a child process will be created which will calculate avg. waiting time using SJF and display the waiting time of each process followed by avg. waiting time.

You would need to sort the array in order to get the shortest job first in the array.

For example, using the following data in the array where the first element contain the CPU burst of Process 1 and second element corresponds to CPU burst of Process P2 and so on...:

{5 ,15,12,25,5} >> {P1, P2, P3, P4, P5}

We will sort the array in CHILD process like (processes order changed):

{5, 5, 12, 15, 25} >> {P1, P5, P3, P2, P4}

The output from the child process will be as (we will assume that all processes arrive at time zero):

Running Child for SJF................

Waiting time of process P1: 0
Waiting time of process P2: 22
Waiting time of process P3: 10
Waiting time of process P4: 37
Waiting time of process P5: 5

Avg. waiting time using SJF is: 14.8

The parent process should wait for the child process until it generates it output as given above. Once the child process terminates, the parent process resume execution and display the following line on the shell:

Well done KID!

The above line should not be displayed if fork system call fails!!!!! If fork system call fails, following line should be displayed by the parent process:

Fork failed!

kindly mujy is assinment ka solution day den jaldi...
Reply


Messages In This Thread
operating assinment solution help - by nenanena - 11-23-2012, 07:20 PM
operating assinment solution help - by Xpert - 08-18-2013, 03:53 AM
operating assinment solution help - by nenanena - 11-27-2012, 04:04 AM
operating assinment solution help - by princesss - 11-27-2012, 04:14 AM
operating assinment solution help - by Xpert - 11-27-2012, 04:43 AM
operating assinment solution help - by nenanena - 12-23-2012, 05:00 PM
operating assinment solution help - by Xpert - 12-23-2012, 05:28 PM
operating assinment solution help - by nenanena - 12-25-2012, 11:23 PM
operating assinment solution help - by Xpert - 12-26-2012, 12:16 AM
operating assinment solution help - by nenanena - 12-27-2012, 12:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  get your solution in 24 hours 2020 Xpert 0 8,891 10-11-2020, 10:09 PM
Last Post: Xpert
  get your solution in 24 hours 2020 Xpert 0 3,248 10-11-2020, 10:09 PM
Last Post: Xpert
  vuhelp.com forum is providing solution of virutal university students in 24 hour 2014 Xpert 3 2,568 11-17-2014, 06:11 PM
Last Post: leo861323
  GDB of FIN730 - Investment Analysis & Portfolio Management (Need Solution) Muhammad Husnain Mughal 1 1,941 05-15-2014, 08:21 PM
Last Post: hondasr8
  GDB of FIN723 - Taxation Management (Need Solution) Muhammad Husnain Mughal 1 2,987 05-07-2014, 04:09 AM
Last Post: Vuhelper
  Need ACC501 - Business Finance Assignment No 2 Solution. Umar Abbas 2 4,323 02-07-2014, 08:23 PM
Last Post: Umar Abbas
  Need Assignments solution detailer 2 3,233 11-21-2012, 02:52 PM
Last Post: Vuhelper
  need fall 2012 mgt111 gdb solution urgently eshal ch 1 3,147 11-16-2012, 12:16 AM
Last Post: Vuhelper
  Urgent need Cs201 first assignmt solution r_traveler 4 2,358 11-07-2012, 01:47 AM
Last Post: Xpert
  sta301 assignment 4 solution vudecent 0 2,455 06-25-2012, 01:51 AM
Last Post: vudecent

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support