Sponsored Links


Results 1 to 10 of 10

Thread: operating assinment solution help

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    5

    Icon51 operating assinment solution help

    Sponsored Links1


    . 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}

    Sponsored Links

    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...

  2. #2
    Junior Member
    Join Date
    Nov 2012
    Posts
    5
    24 hours nae hoye abe kia????????????????????????????????????????????/

  3. #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.

  4. #4
    Administrator Xpert's Avatar
    Join Date
    May 2010
    Location
    Jhelum
    Posts
    6,239
    pm main dey dia hai..... hahhaha

  5. #5
    Junior Member
    Join Date
    Nov 2012
    Posts
    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..........

  6. #6
    Administrator Xpert's Avatar
    Join Date
    May 2010
    Location
    Jhelum
    Posts
    6,239
    g aesi bat nahi hai app tu naraz ho gai han...

  7. #7
    Junior Member
    Join Date
    Nov 2012
    Posts
    5
    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

  8. #8
    Administrator Xpert's Avatar
    Join Date
    May 2010
    Location
    Jhelum
    Posts
    6,239
    yahan jo nalayak students hotay han hum un ki help kertay han. app bata den nalayak han tu ker detay han. no problem.

  9. #9
    Junior Member
    Join Date
    Nov 2012
    Posts
    5
    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........

  10. #10
    Administrator Xpert's Avatar
    Join Date
    May 2010
    Location
    Jhelum
    Posts
    6,239
    Help ek alag cheaz hai and total solution alag cheaz hai.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 05-05-2011, 01:10 AM
  2. Replies: 4
    Last Post: 04-18-2011, 07:00 PM
  3. Replies: 2
    Last Post: 01-29-2011, 10:24 PM
  4. Need solution of cs402 assinment#3
    By ANI in forum Get Solution In 24 Hour
    Replies: 1
    Last Post: 01-04-2011, 03:34 AM
  5. FIN630 Assinment solution required .....plz help me!!!
    By em-ad in forum Get Solution In 24 Hour
    Replies: 3
    Last Post: 07-03-2010, 02:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft