Safety Algorithm

1. Let Workand Finish be vectors of length m and n, respectively. Initialize: Work = Available Finish [i] = false for i = 0, 1, …,n- 1. 2. Find and i such that both: (a) Finish [i] = false (b) Needi Work If no such i exists, go to step 4. 3. Work = Work […]

Banker’s Algorithm

This algorithm can be used in banking system to ensure that the bank never allocates all its available cash such that it can no longer satisfy the needs of all its customer. This algorithm is applicable to a system with multiple instances of each resource type. When a new process enter in to the system […]

Deadlock Prevention

Deadlock prevention is a set of methods for ensuring that at least one of these necessary conditions cannot hold. Mutual Exclusion: The mutual exclusion condition holds for non sharable. The example is a printer cannot be simultaneously shared by several processes. Sharable resources do not require mutual exclusive access and thus cannot be involved in […]

Semaphores

For the solution to the critical section problem one synchronization tool is used which is known as semaphores. A semaphore ‗S‘ is an integer variable which is accessed through two standard operations such as wait and signal. These operations were originally termed ‗P‘ (for wait means to test) and ‗V‘ (for single means to increment). […]

Critical Section Problem

Consider a system consisting of n processes (P0, P1, ………Pn -1 ) each process has a segment of code which is known as critical section in which the process may be changing common variable, updating a table, writing a file and so on. The important feature of the system is that when the process is […]

Operating System Services

An operating system provides an environment for the execution of the program. It provides some services to the programs. The various services provided by an operating system are as follows: Program Execution: The system must be able to load a program into memory and to run that program. The program must be able to terminate […]

virtual machines OS

Virtual Machines

By using CPU scheduling & virtual memory techniques an operating system can create the illusion of multiple processes, each executing on its own processors & own virtual memory. Each processor is provided a virtual copy of the underlying computer. The resources of the computer are shared to create the virtual machines. CPU scheduling can be […]

System structure

Simple structure There are several commercial system that don‘t have a well- defined structure such operating systems begins as small, simple & limited systems and then grow beyond their original scope. MS-DOS is an example of such system. It was not divided into modules carefully. Another example of limited structuring is the UNIX operating system. […]

System Programs

System programs provide a convenient environment for program development & execution. They are divided into the following categories. File manipulation: These programs create, delete, copy, rename, print & manipulate files and directories. Status information: Some programs ask the system for date, time & amount of available memory or disk space, no. of users or similar […]

System Calls

System calls provide the interface between a process & the OS. These are usually available in the form of assembly language instruction. Some systems allow system calls to be made directly from a high level language program like C, BCPL and PERL etc. systems calls occur in different ways depending on the computer in use. […]