Posts

Showing posts from June, 2017

Assignment I

1. Explain the Dual-mode operation of an Opearting System. 2. With neat sketch, describe the services that an operaying system provides to users, processes and other system 3. Explain the difference between micro-kernel and macro-kernel. 4. What is system call? Explain the various types of system calls provided by an operating system

Round Robin Schudling Algorithm

#include<stdio.h> int main() {    int count,j,n,time,remain,flag=0,time_quantum;   int wait_time=0,turnaround_time=0,at[10],bt[10],rt[10];   printf("Enter Total Process:\t ");   scanf("%d",&n);   remain=n;   for(count=0;count<n;count++)   {     printf("Enter Arrival Time and Burst Time for Process Process Number %d :",count+1);     scanf("%d",&at[count]);     scanf("%d",&bt[count]);     rt[count]=bt[count];   }   printf("Enter Time Quantum:\t");   scanf("%d",&time_quantum);   printf("\n\nProcess\t|Turnaround Time|Waiting Time\n\n");   for(time=0,count=0;remain!=0;)   {     if(rt[count]<=time_quantum && rt[count]>0)     {       time+=rt[count];       rt[count]=0;       flag=1;   ...

Priority Schudling Algorithm

#include<stdio.h> int main() {     int bt[20],p[20],wt[20],tat[20],pr[20],i,j,n,total=0,pos,temp,avg_wt,avg_tat;     printf("Enter Total Number of Process:");     scanf("%d",&n);     printf("\nEnter Burst Time and Priority\n");     for(i=0;i<n;i++)     {         printf("\nP[%d]\n",i+1);         printf("Burst Time:");         scanf("%d",&bt[i]);         printf("Priority:");         scanf("%d",&pr[i]);         p[i]=i+1;           //contains process number     }     //sorting burst time, priority and process number in ascending order using selection sort     f...

Computer system and operating system overview

computer system and operating system overview   click here

Operating System R13 Syllabus

UNIT-I: Computer System and Operating System Overview:  Overview of computer operating systems, operating systems functions, protection and security, distributed systems, special purpose systems, operating systems structures and systems calls, operating systems generation. UNIT-II: Process Management Process concept process scheduling, operations, Inter process communication. Multi Thread programming models. Process scheduling criteria and algorithms, and their evaluation. UNIT-III: Concurrency : Process synchronization, the critical- section problem, Peterson’s Solution, synchronization Hardware, semaphores, classic problems of synchronization, monitors, Synchronization examples UNIT-IV: Memory Management: Swapping, contiguous memory allocation, paging, structure of the page table, segmentation Virtual Memory Management: virtual memory,  demand paging, page-Replacement, algorithms, Allocation of Frames, Thrashing UNIT-V: Principles o...

FCFS Scheduling Algorithm

FCFS program in c #include<stdio.h> int main() {     int n,bt[20],wt[20],tat[20],avwt=0,avtat=0,i,j;     printf("Enter total number of processes(maximum 20):");     scanf("%d",&n);     printf("\nEnter Process Burst Time\n");     for(i=0;i<n;i++)     {         printf("P[%d]:",i+1);         scanf("%d",&bt[i]);     }     wt[0]=0;    //waiting time for first process is 0     //calculating waiting time     for(i=1;i<n;i++)     {         wt[i]=0;         for(j=0;j<i;j++)             wt[i]+=bt[j];     }     printf("\nProcess\t\tBurst Time\tWai...

SJF Scheduling Algorithm

SJF programming in C #include<stdio.h> void main() {     int bt[20],p[20],wt[20],tat[20],i,j,n,total=0,pos,temp;     float avg_wt,avg_tat;     printf("Enter number of process:");     scanf("%d",&n);     printf("\nEnter Burst Time:\n");     for(i=0;i<n;i++)     {         printf("p%d:",i+1);         scanf("%d",&bt[i]);         p[i]=i+1;           //contains process number     }     //sorting burst time in ascending order using selection sort     for(i=0;i<n;i++)     {         pos=i;         for(j=i+1;j<n;j++)         { ...

Operating System Services

An operating system provides an environment for the execution of programs. The specific services provided are differing from one operating system to another, but we can identify common classes. These operating system services are provided for the convenience of the programmer to make the programming task easy. Program  Creation: the operating system provides editors, debuggers, to assist the programmer in creating programs. Programs Execution: A number of tasks required to execute a program, the tasks include instructions and data must be loaded into main memory, I/O devices and files must be initialized, and other resources must be prepared. The OS handles these tasks for the user. Input/Output Operations: A running program may require input and output. This I/O may involve a file or an I/O device. A user program cannot execute I/O operations directly, the OS must provide some means to do so. Error Detection: the operating system detects the different types of erro...

Operating System and structure of OS

 “An operating system is a program that acts as an intermediary between the user and the computer hardware and controls the execution of all kind of programs”        An operating system is a program that manages the computer hardware. It also provides a basic for application program and acts as an interface between the computer user and the computer hardware.     Operating systems for handheld computers are designed to provide an environment in which a user can easily interface with the computer to execute programs. Thus, some operating systems are designed to be convenient, others to be efficient , and others some combination of the two.      Because an operating system is large and complex, it must be created piece of piece. Each of these pieces should be a well-delineated portion of the system, with carefully defined inputs and outputs and functions. Linux, UNIX, Windows, OS X, VMS, OS/400, AIX, Z/OS, etc are the few...