Posts

Life teaches us

In life, carrier selection is very important in life. If we know what we can do then it gives us a direction for our life. Trust yourself to choose what's right for you. For that we set a goal and we start working on it. To achieve that goal we start focusing and our life becomes automatically a healthy and wealthy. Dream a life with thinking of future in mind. Dream creates a desires. Desires create determination, which leads us to our destiny. After our achievements we will get success. Live a life which will set inspiration for others. It will be not so easy there will be many obstacles in your life don't get demotivate by it, fight against it after looking back you will say yourself that this obstacle is very small compared to present. Journey of life will collect many memories and many contacts with a confidence. Mistakes may be happened so don't be afraid learn from it and try not to repeat it. A mistake should be your teacher, not your attacker. A mistake i...

Sys pro program for CPU scheduling : Priority algo. - Non premptive

PPRIIORITY.C /* CPU scheduling : Priority algo. - Non premptive ................... */ // jobQ maintained as ascending order priority Q (1st job-highest priority) #include<stdlib.h> #include<stdio.h> #define newnode (struct node *)malloc(sizeof(struct node)) struct node { int jobno,time,proty;  // priority   struct node *next; }*JOBQ=NULL; int job=0; void erase() { struct node *S;   while(JOBQ!=NULL) { S=JOBQ;  JOBQ=JOBQ->next;  free(S);  }   job=0; } struct node *Append(struct node *F) { struct node *s,*t,*s1=NULL;   t=newnode;        t->next=NULL;   t->jobno=++job;   t->time=0;   do  // validation check for job time   {  printf("\nJOB %d - CPU burst : ",job);      fflush(stdin); scanf("%d",&t->time);      if(t->time<=0) printf("\nJob time should be > 0");   }wh...