Found 2065 Articles for Operating System

Message Passing Model of Process Communication

Kristi Castro
Updated on 31-Jan-2020 10:14:25

11K+ Views

Process communication is the mechanism provided by the operating system that allows processes to communicate with each other. This communication could involve a process letting another process know that some event has occurred or transferring of data from one process to another. One of the models of process communication is the message passing model.Message passing model allows multiple processes to read and write data to the message queue without being connected to each other. Messages are stored on the queue until their recipient retrieves them. Message queues are quite useful for interprocess communication and are used by most operating systems.A ... Read More

Shared Memory Model of Process Communication

Alex Onsman
Updated on 31-Jan-2020 09:53:45

4K+ Views

Process communication is the mechanism provided by the operating system that allows processes to communicate with each other. This communication could involve a process letting another process know that some event has occurred or transferring of data from one process to another. One of the models of process communication is the shared memory model.The shared memory in the shared memory model is the memory that can be simultaneously accessed by multiple processes. This is done so that the processes can communicate with each other. All POSIX systems, as well as Windows operating systems use shared memory.A diagram that illustrates the ... Read More

Running vs Waiting vs Terminated Process

Ricky Barnes
Updated on 31-Jan-2020 09:51:44

499 Views

A process is an active program. It can also be said as a program that is under execution. It is more than the program code as it includes the program counter, process stack, registers, program code etc.A process passes through different states as it executes. A diagram that illustrates all these states is as follows −Details about the running, waiting and terminated process are given as follows −Running ProcessThe process is said to be in running state when the process instructions are being executed by the processor. This is done once the process is assigned to the processor using the ... Read More

Short-term vs medium-term vs long-term scheduling

David Meador
Updated on 31-Jan-2020 09:47:42

6K+ Views

Process Scheduling handles the selection of a process for the processor on the basis of a scheduling algorithm and also the removal of a process from the processor. It is an important part of multiprogramming in operating system.Process scheduling involves short-term scheduling, medium-term scheduling and long-term scheduling. Details about these are given as follows −Long-Term SchedulingLong-term scheduling involves selecting the processes from the storage pool in the secondary memory and loading them into the ready queue in the main memory for execution. This is handled by the long-term scheduler or job scheduler.The long-term scheduler controls the degree of multiprogramming. It ... Read More

The Benefits of Multithreaded Programming

Kristi Castro
Updated on 31-Jan-2020 09:59:23

8K+ Views

Multithreading allows the execution of multiple parts of a program at the same time. These parts are known as threads and are lightweight processes available within the process. So multithreading leads to maximum utilization of the CPU by multitasking.Some of the benefits of multithreaded programming are given as follows −Resource SharingAll the threads of a process share its resources such as memory, data, files etc. A single application can have different threads within the same address space using resource sharing.ResponsivenessProgram responsiveness allows a program to run even if part of it is blocked using multithreading. This can also be done ... Read More

User-level threads and Kernel-level threads

Alex Onsman
Updated on 04-Nov-2023 01:47:03

23K+ Views

A thread is a lightweight process that can be managed independently by a scheduler. It improves the application performance using parallelism.A thread shares information like data segment, code segment files etc. with its peer threads while it contains its own registers, stack, counter etc.The two main types of threads are user-level threads and kernel-level threads. A diagram that demonstrates these is as follows −User - Level ThreadsThe user-level threads are implemented by users and the kernel is not aware of the existence of these threads. It handles them as if they were single-threaded processes. User-level threads are small and much ... Read More

Critical Section Problem

Ricky Barnes
Updated on 31-Jan-2020 09:55:43

77K+ Views

The critical section is a code segment where the shared variables can be accessed. An atomic action is required in a critical section i.e. only one process can execute in its critical section at a time. All the other processes have to wait to execute in their critical sections.A diagram that demonstrates the critical section is as follows −In the above diagram, the entry section handles the entry into the critical section. It acquires the resources needed for execution by the process. The exit section handles the exit from the critical section. It releases the resources and also informs the ... Read More

Different Models of Interprocess Communication

Alex Onsman
Updated on 24-Jun-2020 08:39:53

12K+ Views

Interprocess communication is the mechanism provided by the operating system that allows processes to communicate with each other. This communication could involve a process letting another process know that some event has occurred or transferring of data from one process to another.A diagram that illustrates interprocess communication is as follows −The models of interprocess communication are as follows −Shared Memory ModelShared memory is the memory that can be simultaneously accessed by multiple processes. This is done so that the processes can communicate with each other. All POSIX systems, as well as Windows operating systems use shared memory.Advantage of Shared Memory ... Read More

Interprocess Communication with Sockets

David Meador
Updated on 24-Jun-2020 08:28:42

5K+ Views

Interprocess communication is the mechanism provided by the operating system that allows processes to communicate with each other. This communication could involve a process letting another process know that some event has occurred or transferring of data from one process to another.One of the ways to manage interprocess communication is by using sockets. They provide point-to-point, two-way communication between two processes. Sockets are an endpoint of communication and a name can be bound to them. A socket can be associated with one or more processes.Types of SocketsThe different types of sockets are given as follows −Sequential Packet Socket: This type ... Read More

Different Operations on Processes

Kristi Castro
Updated on 24-Jun-2020 08:30:14

19K+ Views

There are many operations that can be performed on processes. Some of these are process creation, process preemption, process blocking, and process termination. These are given in detail as follows −Process CreationProcesses need to be created in the system for different operations. This can be done by the following events −User request for process creationSystem initializationExecution of a process creation system call by a running processBatch job initializationA process may be created by another process using fork(). The creating process is called the parent process and the created process is the child process. A child process can have only one ... Read More

Advertisements