- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 1301 Articles for MCA
6K+ Views
Multithreaded programs allow 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.Threads improve the application performance using parallelism. They share information like data segment, code segment files etc. with their peer threads while they contain their own registers, stack, counter etc.Some of the issues with multithreaded programs are as follows −Let us see them one by one −Increased Complexity − Multithreaded processes are quite complicated. Coding for these can only be handled by expert programmers.Complications due to Concurrency − It is difficult to ... Read More
8K+ Views
Priority inversion is a operating system scenario in which a higher priority process is preempted by a lower priority process. This implies the inversion of the priorities of the two processes.Problems due to Priority InversionSome of the problems that occur due to priority inversion are given as follows −A system malfunction may occur if a high priority process is not provided the required resources.Priority inversion may also lead to implementation of corrective measures. These may include the resetting of the entire system.The performance of the system can be reduces due to priority inversion. This may happen because it is imperative ... Read More
39K+ Views
Single threaded processes contain the execution of instructions in a single sequence. In other words, one command is processes at a time.The opposite of single threaded processes are multithreaded processes. These processes allow the execution of multiple parts of a program at the same time. These are lightweight processes available within the process.Multithreaded Processes ImplementationMultithreaded processes can be implemented as user-level threads or kernel-level threads. Details about these are provided using the following diagram −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 ... Read More
12K+ Views
Deadlock detection, deadlock prevention and deadlock avoidance are the main methods for handling deadlocks. Details about these are given as follows −Deadlock DetectionDeadlock can be detected by the resource scheduler as it keeps track of all the resources that are allocated to different processes. After a deadlock is detected, it can be handed using the given methods −All the processes that are involved in the deadlock are terminated. This approach is not that useful as all the progress made by the processes is destroyed.Resources can be preempted from some processes and given to others until the deadlock situation is resolved.Deadlock ... Read More
59K+ Views
A deadlock happens in operating system when two or more processes need some resource to complete their execution that is held by the other process.A deadlock occurs if the four Coffman conditions hold true. But these conditions are not mutually exclusive. They are given as follows −Mutual ExclusionThere should be a resource that can only be held by one process at a time. In the diagram below, there is a single instance of Resource 1 and it is held by Process 1 only.Hold and WaitA process can hold multiple resources and still request more resources from other processes which are ... Read More
8K+ Views
Cooperating processes are those that can affect or are affected by other processes running on the system. Cooperating processes may share data with each other.Reasons for needing cooperating processesThere may be many reasons for the requirement of cooperating processes. Some of these are given as follows −ModularityModularity involves dividing complicated tasks into smaller subtasks. These subtasks can completed by different cooperating processes. This leads to faster and more efficient completion of the required tasks.Information SharingSharing of information between multiple processes can be accomplished using cooperating processes. This may include access to the same files. A mechanism is required so that ... Read More
531 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 AlgorithmsProcess scheduling algorithms are used to handle the selection of a process for the processor or distribute resources maong processes.Some of the process scheduling algorithms are given as follows −First Come First ServedThis algorithm handles the processes in the order they arrive in the ready queue. FCFS is the simplest scheduling algorithm. There is no preemption in FCFS and so no ... Read More
4K+ Views
Details about the zombie, orphan and daemon processes are given as follows −Zombie ProcessesA zombie process is a process whose execution is completed but it still has an entry in the process table. Zombie processes usually occur for child processes, as the parent process still needs to read its child’s exit status. Once this is done using the wait system call, the zombie process is eliminated from the process table. This is known as reaping the zombie process.A diagram that demonstrates the creation and termination of a zombie process is given as follows −Zombie processes don't use any system resources ... Read More
9K+ Views
In Operating System, the fork() system call is used by a process to create another process. The process that used the fork() system call is the parent process and process consequently created is known as the child process.Details about these are given as follows −ProcessA process is an active program i.e 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. Compared to this, the program code is only the text section.A process changes its state as it executes. This state partially depends on the ... Read More
39K+ Views
A deadlock happens in operating system when two or more processes need some resource to complete their execution that is held by the other process.In the above diagram, the process 1 has resource 1 and needs to acquire resource 2. Similarly process 2 has resource 2 and needs to acquire resource 1. Process 1 and process 2 are in deadlock as each of them needs the other’s resource to complete their execution but neither of them is willing to relinquish their resources.Coffman ConditionsA deadlock occurs if the four Coffman conditions hold true. But these conditions are not mutually exclusive.The Coffman ... Read More