This is a C program to simulate First come first served (FCFS) CPU scheduling algorithm. First come first served algorithm serves each processes (or jobs) in the order of arrival. The process with lowest arrival time is executed first.
Program:
#include<stdio.h>
struct process
{
int burst,wait;
}p[20]={0,0};
Information about resetting and configuring Mobile phones (Java, Android, Symbian etc), educational articles especially for programming in C, C++ and Java and more about Computers and operating systems
Simulation of FCFS CPU Scheduling Algorithm in C
Labels:
$ccpp
,
average
,
c program
,
CPU
,
FCFS
,
first come
,
first serve
,
lab
,
operating Systems
,
OS lab
,
scheduling algorithm
,
served
,
simulate
,
simulation
,
turn around time
,
wait time
C Program to Simulate grep Command in Linux
This post contains C program to simulate grep command in Linux or Unix operating systems
Simulation of grep command in Linux
#include<stdio.h>
#include<string.h>
main()
{
Simulation of grep command in Linux
#include<stdio.h>
#include<string.h>
main()
{
Labels:
$ccpp
,
c program
,
code
,
command
,
compiled
,
GREP
,
lab
,
Linux
,
operating Systems
,
OS lab
,
programming
,
simulate
,
simulation
,
source code
,
terminal
,
UNIX
C Program to Simulate the ls Command in Linux Operating system
This is a c program to do Simulation of ls Command in linux. The ls command lists all the contents of the directory including filse and sub-directories. The following program in C language will simulate the ls command.
#include<stdio.h>
#include<dirent.h>
main()
{
#include<stdio.h>
#include<dirent.h>
main()
{
C Program to Remove (Delete) a Directory using LINUX System Calls
This is a C program to delete or remove a directory using the system calls in Linux or Unix operating systems. The program make use of the remove() system call in Linux.
#include<stdio.h>
#include<fcntl.h>
main()
{
#include<stdio.h>
#include<fcntl.h>
main()
{
C Program to open, read and write files and perform file copy operation usingSystem Calls in UNIX
Write a program to open, read and write files and perform file copy operation. This program show how to open, read, write and copy files using Linux or Unix system calls like open(), read() and write().
#include<stdio.h>
#include<fcntl.h>
main()
{
#include<stdio.h>
#include<fcntl.h>
main()
{
C Program to Open, Read and Write a file using System Calls
This is a C program to open , read and write files using system calls in Linux (UNIX) operating systems. The system calls open(), read() and write() are used in the C program to open, read and write files in Unix/Linux operating systems.
#include<stdio.h>
#include<fcntl.h>
main()
{
#include<stdio.h>
#include<fcntl.h>
main()
{
Using System calls in C Program to rename a Directory in Linux
C Program to rename a directory in Unix or Linux operating systems using system call rename().
#include<stdio.h>
main()
{
#include<stdio.h>
main()
{
Labels:
$ccpp
,
c program
,
code
,
compiled
,
directory
,
How to
,
lab
,
Linux
,
operating Systems
,
OS
,
OS lab
,
programming
,
rename
,
source code
,
system call
,
UNIX
How to Create process and display Process ID (pid) of Both Parent and Child
This program shows how to create process and display Process ID (pid) of Both Parent and Child processes. The process is created using the fork system call in UNIX (Linux) operating systems.
#include<stdio.h>
#include<dirent.h>
main(int argc,char **argv)
{
#include<stdio.h>
#include<dirent.h>
main(int argc,char **argv)
{
Labels:
$ccpp
,
c program
,
code
,
compiled
,
create
,
display
,
fork
,
getpid
,
lab
,
Linux
,
operating Systems
,
OS
,
Oslab
,
process
,
process id
,
programming
,
source code
,
system call
,
UNIX
How to use fork and exec System Call
Using fork and exec System calls in Linux (UNIX) operating systems. Fork system call is used to create a child process from a parent process.
#include<stdio.h>
main()
{
#include<stdio.h>
main()
{
Subscribe to:
Posts
(
Atom
)