Showing posts with label SPOS (TE-II). Show all posts
Showing posts with label SPOS (TE-II). Show all posts

TE Comp Sem-II SPOS Prac 9 (Scheduling RR)

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>

typedef struct process

TE Comp Sem-II SPOS Prac 9 (Scheduling SJF)

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>

typedef struct process
{
    int pid,at,bt,ct,wt,tat;

TE Comp Sem-II SPOS Prac 5 (Banker)

#include<iostream.h>
#include<iomanip.h>
#include<conio.h>

struct process
{
    int finish,request[6],all[6],max[6],need[6];
}p[10];

TE Comp Sem-II SPOS Prac 6 (Page replacement)

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
int search(int pf[10],int pno)
{
    for(int i=0;i<3;i++)
    {
        if(pf[i]==pno)
            return i+1;

TE Comp Sem-II SPOS Prac 7 (Producer Consumer)

/* buffer.h */
typedef int buffer_item;
#define BUFFER_SIZE 5

/* main.c */

#include <stdlib.h>
#include <stdio.h>

TE Comp Sem-II SPOS Prac 8 (Reader Writer - reader priority)

//READER WRITER WITH READER PRIORITY

#include<stdio.h>
#include<semaphore.h>
#include<pthread.h>
int readcnt=0;
sem_t x,wsem;

TE Comp Sem-II SPOS Prac 9 (Scheduling FCFS)

#include<iostream.h>
#include<conio.h>
#include<iomanip.h>

typedef struct process
{