Results 1 to 6 of 6
  1. #1

    Default Kinsa naa pre-programmed Process Scheduling in C


    Katong First Come First Serve, Shortest Job first, Non-preemptive Priority, Preemptive Priority and Round Robin? or bisan idea lang unsay paagi pag program..nakahimo nako sa FCFS. array ra gyud ako gamit tanan. sequential ra gyud. pero sa SJF. wala pakoy idea.

    kung naa moy running program ani tanan in C..ok ra ninyo share. if dli, gai lang ko idea.. thanks

  2. #2
    search google.. google code is your best friend

  3. #3
    Pwede pud ka kuha ug idea sa linux kernel scheduler katong pre 2.6 kernel. Nag implement to siya ug 0(n) task scheduling non-preemptive. Naa pud toy patch si Nick Piggin para sa round robin algo.

    Naa daghan info about sa linux scheduler sa kerneltrap mailing list.

  4. #4
    Quote Originally Posted by ajboy13 View Post
    Katong First Come First Serve, Shortest Job first, Non-preemptive Priority, Preemptive Priority and Round Robin? or bisan idea lang unsay paagi pag program..nakahimo nako sa FCFS. array ra gyud ako gamit tanan. sequential ra gyud. pero sa SJF. wala pakoy idea.

    kung naa moy running program ani tanan in C..ok ra ninyo share. if dli, gai lang ko idea.. thanks
    CIT's OS nga subject? lewlz.
    i have the code kaso pangitaonon pa. (i really dont have the patience to look for old codes)
    <-- will post if maaksidente makitan ang codes

    well since nahimo na nimo ang FCFS, kaya rana nimo ang uban bro.
    round robin ramay lisod2x ana.

  5. #5
    bro,

    mao ni ako nahibal-an sa SJF algorithm... this is sample sub-program code on how CPU scheduling algorithm created ... kindly supply the missing block para pud ma-analyze pud nimo ang structure. understand the logic how it do ...

    code as follows:

    #include<stdio.h>
    #include<conio.h>
    #include<process.h>
    void main()
    {
    char p[10][5],temp[5];
    int tot=0,wt[10],pt[10],i,j,n,temp1;
    float avg=0;
    clrscr();
    printf("enter no of processes:");
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
    printf("enter process%d name:\n",i+1);
    scanf("%s",&p[i]);
    printf("enter process time");
    scanf("%d",&pt[i]);
    }
    for(i=0;i<n-1;i++)
    {
    for(j=i+1;j<n;j++)
    {
    if(pt[i]>pt[j])
    {
    temp1=pt[i];
    pt[i]=pt[j];
    pt[j]=temp1;
    strcpy(temp,p[i]);
    strcpy(p[i],p[j]);
    strcpy(p[j],temp);
    }
    }
    }
    wt[0]=0;
    ..........
    your next tasks is to display the amount of waiting time for each of the processes when executing scheduling algorithm.
    the remaining line will be of your final resolution on how to initialize an output ... most of the logic are mentioned already ... so, good luck ...=)
    Last edited by hsgb77; 09-24-2009 at 11:56 AM. Reason: revision

  6. #6
    ana amo instructor nga dapat naka Stack daw..bati kuno array tanan........ahehehe gamay ra ako score FCFS

  7.    Advertisement

Similar Threads

 
  1. Kinsa naa experience ug repacking nga business......
    By rcadism in forum Business, Finance & Economics Discussions
    Replies: 22
    Last Post: 07-01-2016, 10:11 PM
  2. Kinsa naa banda dira / looking for new bands in town
    By MERCONCEPT in forum Parties & Events
    Replies: 12
    Last Post: 10-22-2009, 11:46 AM
  3. Looking For: Microsoft Office or iWork for my MacBook (kinsa naa program kay magpainstall ko)
    By markepogi in forum Computers & Accessories
    Replies: 2
    Last Post: 10-06-2008, 07:17 AM
  4. kinsa kamao og priority process scheduling
    By acegear in forum Programming
    Replies: 7
    Last Post: 03-21-2007, 01:17 PM
  5. kinsa naa baligya altec(speakers w/subwooper) and 17" pc monitor
    By spongebobrasta in forum Computer Hardware
    Replies: 0
    Last Post: 08-05-2005, 12:11 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
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top