
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 620 Articles for Computer Science

56K+ Views
Both process and thread are related to each other and quite similar as these are the independent sequence of execution. The basic difference between a process and a thread is that a process takes place in different memory spaces, whereas a thread executes in the same memory space. Read through this article to find out how a process is different from a thread, in the context of operating systems. Let's start with some basics of threads and processes. What is a Process? A process is an active program, i.e., a program that is under execution. It is more ... Read More

4K+ Views
Message passing model and shared memory model are models of interprocess communication. Details about these are given as follows −Message Passing Process Communication ModelMessage 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 diagram that demonstrates message passing model of process communication is given as follows −In the above diagram, both the processes P1 and P2 can access the message queue and store ... Read More

41K+ Views
Race conditions, Critical Sections and Semaphores are an key part of Operating systems. Details about these are given as follows −Race ConditionA race condition is a situation that may occur inside a critical section. This happens when the result of multiple thread execution in critical section differs according to the order in which the threads execute.Race conditions in critical sections can be avoided if the critical section is treated as an atomic instruction. Also, proper thread synchronization using locks or atomic variables can prevent race conditions.Critical SectionThe critical section in a code segment where the shared variables can be accessed. ... Read More

4K+ Views
Monitors and semaphores are used for process synchronization and allow processes to access the shared resources using mutual exclusion. However, monitors and semaphores contain many differences. Details about both of these are given as follows −MonitorsMonitors are a synchronization construct that were created to overcome the problems caused by semaphores such as timing errors.Monitors are abstract data types and contain shared data variables and procedures. The shared data variables cannot be directly accessed by a process and procedures are required to allow a single process to access the shared data variables at a time.This is demonstrated as follows:monitor monitorName { ... Read More

7K+ Views
Starvation and Deadlock are situations that occur when the processes that require a resource are delayed for a long time. However they are quite different concepts.Details about starvation and deadlock are given as follows −StarvationStarvation occurs if a process is indefinitely postponed. This may happen if the process requires a resource for execution that it is never alloted or if the process is never provided the processor for some reason.Some of the common causes of starvation are as follows −If a process is never provided the resources it requires for execution because of faulty resource allocation decisions, then starvation can ... Read More

29K+ Views
Mutex and Semaphore both provide synchronization services but they are not the same. Details about both Mutex and Semaphore are given below −MutexMutex is a mutual exclusion object that synchronizes access to a resource. It is created with a unique name at the start of a program. The Mutex is a locking mechanism that makes sure only one thread can acquire the Mutex at a time and enter the critical section. This thread only releases the Mutex when it exits the critical section.This is shown with the help of the following example −wait (mutex); ….. Critical Section ….. signal (mutex);A ... Read More

214K+ Views
Semaphores are integer variables that are used to solve the critical section problem by using two atomic operations, wait and signal that are used for process synchronization.The definitions of wait and signal are as follows −WaitThe wait operation decrements the value of its argument S, if it is positive. If S is negative or zero, then no operation is performed.wait(S) { while (S

5K+ 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

11K+ Views
The shell is the command interpreter on the Linux systems. It the program that interacts with the users in the terminal emulation window. Shell commands are instructions that instruct the system to do some action.Some of the commonly used shell commands are −basenameThis command strips the directory and suffix from filenames. It prints the name of the file with all the leading directory components removed. It also removes a trailing suffix if it is specified.Example of basename is as follows −$ basename country/city.txtThis gets the name of the file i.e. city which is present in folder country.city.txtcatThis command concatenates and ... Read More

1K+ Views
The loadable kernel modules in an operating system is an object file that contains code to extend the running kernel, which is also known as the base kernel. The loadable kernel modules are used to add support for file systems, hardware, system calls etc.An image that shows the loadable modules of the operating system is as follows −The different types of kernels in the operating system that may require loadable kernel modules are −MicrokernelA microkernel is the minimum software that is required to correctly implement an operating system. This includes memory, process scheduling mechanisms and basic inter-process communication.The microkernel contains ... Read More