Sleeping Barber Problem of Synchronization in Operating System

It is a synchronization and inter-process communication problem. This problem is based on a barbershop. A barbershop has a single barber, single barber chair and n number of chairs for customers. When there is no customer in the barbershop then the barber sleeps. When a customer comes, he has to get up the barber. When … Read more

Reader-Writer Problem in Operating System with Code

The readers and writers problem based on an object like a file which is shared in different processes. Some processes are readers so that they can only read the data and some processes are writers so that they can only write the data. This problem is generally used to manage synchronization.  A writer should achieve … Read more

Discuss the Classical problem of synchronization

Using semaphores for synchronization is the traditional way to present the solutions. There are four types of the classical problem of synchronization, and these are the following:  Four types of the classical problem of synchronization 1). Bound buffer problem It is also named as Producer-consumer problem. A bounded buffer allows many producers and many consumers … Read more

Semaphore in Operating System and its types

A semaphore is simply an integer variable that is shared between multiple threads. We can also say A semaphore is a data structure with an initialization operation and two usage operations. The data structure consists of a counter and a queue for picking up blocked processes. The concept comes from Dijkstra and was presented in … Read more

Mutual exclusion in Operating System with its four conditions

When a process is executed in a critical section, then no other process can be executed in their critical section. It consists of a single process temporarily excluding all others from using a shared resource in a way that guarantees the integrity of the system. It assures that when one thread is functioning read or … Read more

Critical Section Problem in Operating System

A contention situation arises if two independent programs or processes want to access common data, and this can lead to a collision. Code segments that access common data areas, are prone to collisions known as critical sections. A critical section is understood as program parts that must not be interrupted by other processes or threads … Read more

Concurrency in Operating System and Principle of Concurrency

Concurrency in Operating System refers to the execution of several programs at the same time. It takes place in OS when multiple processes are executing in parallel. It is the execution of processes to provide an impression of a synchronous computation. In Concurrency, resources are shared among the processes that result in troubles such as … Read more

Dispatcher in Operating System. Write Functions of Dispatcher

Dispatcher provides control of the CPU to the process picked by the short-term scheduler. When the scheduler finishes its task of selecting a process, then the dispatcher takes that process to the destination state.  For example, Suppose there are 5 processes P1, P2, P3, P4, and P5.  The arrival times of these processes are T1, … Read more

What is Thread in OS? User and Kernel level thread

A thread is a part of a process. A process is classified into a number of light-weighted processes, each light weighted process is known as a thread. It is a track of execution in process. The thread has a program counter that holds the path of which instruction to execute next. It has a register … Read more

Hi, Welcome back!
Forgot Password?
Don't have an account?  Register Now