Explain Problem Solving Techniques

The process of working through details of a problem to reach a solution. There are three approaches to problem solving: 1. Algorithm 2. Flowchart 3. Pseudo Code Algorithm: The algorithm is a step-by-step procedure to be followed in solving a problem. It provides a scheme to solve a particular problem in finite number of unambiguous […]

Explain Pseudo code

It is a form of structured English that describes algorithms. It facilitates the designers to focus on the logic of the algorithm without getting bogged down by the details of language syntax. Pseudocode is a compact and informal high-level description of an algorithm that uses the structural conventions of a programming language. It is meant […]

Memory Management

 Memory consists of a large array of words or bytes, each with its own address. The CPU fetches instructions from memory according to the value of the program counter. These instructions may cause additional loading from and storing to specific memory addresses. Memory unit sees only a stream of memory addresses. It does not know […]

Recovery from Deadlock

When a detection algorithm determines that a deadlock exists, several alternatives exist. One possibility is to inform the operator that a deadlock has occurred, and to let the operator deal with the deadlock manually. The other possibility is to let the system recover from the deadlock automatically. There are two options for breaking a deadlock. […]

Safety Algorithm

1. Let Work and 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 […]

Resource Allocation Graph Algorithm

In this graph a new type of edge has been introduced is known as claim edge. Claim edge Pi→Rj indicates that process Pj may request resource Rj; represented by a dashed line.Claim edge converts to request edge when a process requests a resource.Request edge converted to an assignment edge when the resource is allocated to […]

Binary Semaphore

A binary semaphore is a semaphore with an integer value which can range between 0 and 1. Let ‘S’ be a counting semaphore. To implement the binary semaphore we need following the structure of data. Binary Semaphores S1, S2; int C; Initially S1 = 1, S2 = 0 and the value of C is set […]

Methods for Handling Deadlocks

The problem of deadlock can deal with the following 3 ways. We can use a protocol to prevent or avoid deadlock ensuring that the system will never enter to a deadlock state.  We can allow the system to enter a deadlock state, detect it and recover. We can ignore the problem all together. To ensure […]

Deadlock Characteristics

In a deadlock process never finish executing and system resources are tied up. A deadlock situation can arise if the following four conditions hold simultaneously in a system. • Mutual Exclusion: At a time only one process can use the resources. If another process requests that resource, requesting process must wait until the resource has […]