answersLogoWhite

0

C program for first fit algorithms of operating system?

Updated: 8/16/2019
User Avatar

Wiki User

11y ago

Best Answer

#include<stdio.h>

#include<conio.h>

void main()

{

int n,i,p,f=1,part[10];

clrscr();

printf("enter no.of partitons:");

scanf("%d",&n);

for(i=0;i<n;i++)

{

printf("enter %d partitions:",i);

scanf("%d",&part[i]);

}

while(f)

{

printf("enter process size:");

scanf("%d",&p);

for(i=0;i<n;i++)

{

if(p<=part[i])

{

printf("partition goes to %d location\n",i);

part[i]=part[i]-p;

printf("internal frag is %d \n",part[i]);

break;

}

}

}

printf("enter 1 if next process to be entered");

scanf("%d",&f);

}

getch();

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program for first fit algorithms of operating system?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What was the first Microsoft Windows program?

It was actually operating system: MS-DOS.


What is first operating system or software?

The first operating system or software is widely considered to be the program ENIAC, which was created in the 1940s by the University of Pennsylvania's Moore School of Electrical Engineering. ENIAC was the first large-scale electronic general-purpose computer and was used to solve complex calculations for the US military. The program used a variety of different software components, including a control program and an arithmetic unit. ENIAC was an important milestone in the development of software and was the first program to be able to manipulate data stored in memory. It was also the first program to introduce the concept of a stored program, which allowed for faster and more efficient computing.


When was the first operating system created?

the first computer to use operating system was mark1


What was the first opperating system?

What operating system was coined the operating system of the century?


Do all computers have an operating system?

On the first computers, without an operating system, every program needed the full hardware specification to run correctly and perform standard tasks, and its own drivers for peripheral-2like printers and card-readers. Not every computer had an operating system.


What was the first major operating system?

D.O.S (Disk Operating System)


Which was the first operating system lounced by the Microsoft in 1981?

Microsoft 95 was the first operating system by Microsoft


What is the first operating system name?

microsoft disk operating system


What is Function of loader in system software?

Whenever the assembly program is to be executed, it has to be assembled again; Programs ...loads the first program to be run by the computer -- usually an operating system ...


What is the 6 operating system?

The 6 operating system is a computer operating system that was released in 1985. It was developed by Microsoft and was the first operating system to be released by the company. The 6 operating system is based on the MS-DOS operating system and was the first version of Windows to be released. The 6 operating system was succeeded by the Windows 3.1 operating system.


What was the first operating system software?

The first simple "operating system" was a program called IBSYS that IBM released for the IBM 7090 transistorized computer in 1960. IBSYS was derived from a program IBM's customer General Motors had written for their IBM 701 and IBM 704 computers and contributed to the IBM computer users group SHARE. SHARE had rewritten General Motor's original program, calling it SHARE Operating System for the IBM 704 and IBM 709 which was the version adapted by IBM to make IBSYS. IBSYS was not like modern operating systems however and would now be called a batch monitor program..


Which was the first widely used operating system in personal computers?

disk operating system