OS File1
OS File1
cd – change directory
ls – list all the files/directories
clear – used to clear the terminal
exit – used to exit
cat – displays the contents of the file
cal & date – calendar and date & time commands respectively
SYSTEM CALL
fork() is used to create a new child process
getpid() is used to get ID of the parent thread
getppid() is used to get process ID of parent process
FCFS Algorithm
SJF Algorithm
Banker’s Algorithm
Memory Mangement
First Fit Algorithm
allocation[i]=-1;
break;
cout << "\nProcess No.\tProcess Size\tBlock no.\n"; for (int i = 0; i < n; i++)
int main()
{
int blockSize[] = {100, 500, 200, 300, 600}; int processSize[] = {212, 417, 112 ,
426}; int m = sizeof(blockSize) / sizeof(blockSize[0]); int n =
sizeof(processSize) / sizeof(processSize[0]); firstFit(blockSize, m, processSize,
n);
return 0 ;