Simulate Multiple Programming with fixed Number of Tasks

Program No. 7

Aim: Program to Simulate Multiple Programming with fixed Number of Tasks (MFT)

Logic:
#include
#include
void main()
{
int ms,i,ps[20],n,size,p[20],s,intr=0;
clrscr();
printf("Enter size of memory:");
scanf("%d",&ms);
printf("Enter memory for OS:");
scanf("%d",&s);
ms-=s;
printf("Enter no.of partitions to be divided:");
scanf("%d",&n);
size=ms/n;
for(i=0;i
{
printf("Enter process size");
scanf("%d ",&ps[i]);
if(ps[i]<=size)
{
intr=intr+size-ps[i];
printf("process%d is allocated\n",p[i]);
}
else
printf("process%d is blocked",p[i]);
}
printf("total fragmentation is %d",intr);
getch();

}


Download

BY:
PROF CHETNA PATEL
TSEC BURHANPUR

Related topics

Professor Jayesh video tutorial

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.