Implement pipe concept in Inter Process Communication using C program

Algorithm: 1.      create the pipe and create the process. 2.      get the input in the main process and pass the output to the child process using pipe. 3.      perform the operation given in the child process and print the output. 4.      stop the program. Program: #include<stdio.h> #include<unistd.h> #include<string.h> int main() { int p1[2],p2[2],p3[2],p4[2]; int i,j=0,k=0,l=0; … Continue reading Implement pipe concept in Inter Process Communication using C program

Shell program to find the sum of n numbers

Program: sum=0 i=1 echo "Enter the number of terms:" read n echo "Enter the numbers:" while [ $i -le $n ] do read a sum=`expr $a + $sum` i=`expr $i + 1` done echo "Sum is $sum" Output: chmod +x {filename.sh} ./filename.sh Enter the number of terms: 5 Enter the numbers: 1 2 3 4 … Continue reading Shell program to find the sum of n numbers

Round Robin Scheduling

Program: #include <stdio.h> int main() { int i,x=-1,k[10],m=0,n,t,s=0; int a[50],temp,b[50],p[10],bur[10],bur1[10]; int wat[10],tur[10],ttur=0,twat=0,j=0; float awat,atur; printf("Enter no. of process : "); scanf("%d", &n); for(i=0; i<n; i++) { printf("Burst time for process P%d : ", (i+1)); scanf("%d", &bur[i]); bur1[i] = bur[i]; } printf("Enter the time slice (in ms) : "); scanf("%d", &t); for(i=0; i<n; i++) { b[i] … Continue reading Round Robin Scheduling

Graphene Battery

Graphene is a composition of carbon atoms tightly bound in a hexagonal or honeycomb-like structure. What makes graphene so unique is that this structure is just one atomic layer thick, essentially making a graphene sheet two-dimensional. This 2D structure produces very interesting properties, including excellent electrical and thermal conductivity, high flexibility, high strength, and low … Continue reading Graphene Battery

Evolution of Operating Systems

The evolution of operating systems is directly dependent on the development of computer systems and how users use them. Here is a quick tour of computing systems through the past fifty years in the timeline. Early Evolution 1945: ENIAC, Moore School of Engineering, University of Pennsylvania.1949: EDSAC and EDVAC1949: BINAC - a successor to the ENIAC1951: UNIVAC by Remington1952: IBM 7011956: The interrupt1954-1957: FORTRAN was developed Operating … Continue reading Evolution of Operating Systems

Remote Procedure Call and Remote Method Invocation

RPC stands for Remote Procedure Call which supports procedural programming. Tt’s almost like IPC mechanism wherever the software permits the processes to manage shared information Associated with an environment wherever completely different processes area unit death penalty on separate systems and essentially need message-based communication. The above diagram shows the working steps in PRC implementation. … Continue reading Remote Procedure Call and Remote Method Invocation

CPU Scheduling Algorithms

A Process Scheduler schedules different processes to be assigned to the CPU based on particular scheduling algorithms. There are six popular process scheduling algorithms which we are going to discuss in this chapter − First-Come, First-Served (FCFS) SchedulingShortest-Job-Next (SJN) SchedulingPriority SchedulingShortest Remaining TimeRound Robin(RR) SchedulingMultiple-Level Queues Scheduling These algorithms are either non-preemptive or preemptive. Non-preemptive … Continue reading CPU Scheduling Algorithms