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
Showing posts with label operating Systems. Show all posts
Showing posts with label operating Systems. Show all posts
The following C program implements Simulation of priority scheduling (CPU Scheduling algorithm). Each process or job is given a priority. The priority is represented using a positive integer. The priority increases as the value of the integer decreases.
This is a C program to simulate Shortest Job First (SJF) CPU scheduling algorithm. In Shortest Job first CPU scheduling algorithm, the process with shortest CPU burst time is executed first. The following program is to simulate non preemptive SJF scheduling. Preemptive SJF CPU scheduling algorithm will be discussed in another post.
Program:
#include<stdio.h>
struct process{
int burst,wait,no;
}p[20]={0,0};
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};
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.
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.
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().
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.
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.
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()
{
C program to show how to use exit system call. The function exit() is used to exit from a process (or to terminate a process). This works both in Linux or UNIX and Windows operating systems.