Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
operating assinment solution help
#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
#2
24 hours nae hoye abe kia????????????????????????????????????????????/
Reply
#3
@nenanena
nai mily ga yaha app ko solution. don't waste ur time here.
ye log free help nai krty..
pay kr k b nai krty help .

so dear don,t waste ur time here.
Reply
#4
pm main dey dia hai..... hahhaha
Reply
#5
then ye form kyn bna rakha ha??????????/ hey mr xpert nam k xpert help nae kr skty to mazak b mat bnao meri post itni fuzol nae k tm jesy mazak start kr den undstand join kr k galati ki me ny to..........
Reply
#6
g aesi bat nahi hai app tu naraz ho gai han...
Reply
#7
to phr aur kesi bat ha????????????? bhai jb nae help kr skty to form kyn bnaya acha chalo bna he lia to phr haha r overacting ki kia xarort me ny jok to nae sunaya thA KUD KOI KUCH xiada he bhari chex samj lia ha syd..............my foot
Reply
#8
yahan jo nalayak students hotay han hum un ki help kertay han. app bata den nalayak han tu ker detay han. no problem.
Reply
#9
oh ho u mean k nalaykon ka help centre ha........kud b nalaiq r nalaiqi ki dawat........so sad hansny ki bat to ab ha hhhhhhahhhhhhhhhahhhhheeeeeeeheeeeeeeee bt me ny help mangi the mujy nae pata tha k ap apni nalaiqi nawazen gy........
Reply
#10
Help ek alag cheaz hai and total solution alag cheaz hai.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  get your solution in 24 hours 2020 Xpert 0 8,801 10-11-2020, 10:09 PM
Last Post: Xpert
  get your solution in 24 hours 2020 Xpert 0 3,183 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,489 11-17-2014, 06:11 PM
Last Post: leo861323
  GDB of FIN730 - Investment Analysis & Portfolio Management (Need Solution) Muhammad Husnain Mughal 1 1,876 05-15-2014, 08:21 PM
Last Post: hondasr8
  GDB of FIN723 - Taxation Management (Need Solution) Muhammad Husnain Mughal 1 2,930 05-07-2014, 04:09 AM
Last Post: Vuhelper
  Need ACC501 - Business Finance Assignment No 2 Solution. Umar Abbas 2 4,251 02-07-2014, 08:23 PM
Last Post: Umar Abbas
  Need Assignments solution detailer 2 3,146 11-21-2012, 02:52 PM
Last Post: Vuhelper
  need fall 2012 mgt111 gdb solution urgently eshal ch 1 3,065 11-16-2012, 12:16 AM
Last Post: Vuhelper
  Urgent need Cs201 first assignmt solution r_traveler 4 2,267 11-07-2012, 01:47 AM
Last Post: Xpert
  sta301 assignment 4 solution vudecent 0 2,399 06-25-2012, 01:51 AM
Last Post: vudecent

Forum Jump:


Users browsing this thread: 1 Guest(s)