Found 1436 Articles for Linux

Measure the time spent in context switch

Diksha Patro
Updated on 04-May-2023 12:42:15

532 Views

Context switching is a basic procedure in contemporary computer systems that enables different jobs or processes to effectively share the CPU (Central Processing Unit). The operating system employs context switching to swiftly transition between jobs or processes that are vying for the CPU's attention on a computer system. This allows each task or process to run for a specific amount of time, known as a time slice or time quantum. Methods for measuring the time spent in a context switch The length of a context switch can be calculated in a number of ways. Here are a few typical approaches ... Read More

Master Boot Record

Diksha Patro
Updated on 04-May-2023 12:41:10

258 Views

The Master Boot Record (MBR), which is normally located on a conventional hard disc drive, is a tiny but crucial component of a computer's storage device. It includes crucial data required to initiate the computer's starting procedure and boot the operating system. The boot code, the partition table, and the disc signature are the three essential parts of the MBR. MBR Structure and Organization A crucial element of managing storage devices and the startup process of a computer is the Master startup Record (MBR). It has four primary components and is situated at the start of a storage device like ... Read More

Maekawa's Algorithm for Mutual Exclusion in Distributed System

Diksha Patro
Updated on 04-May-2023 12:37:51

1K+ Views

Multiple processes may require concurrent access to common resources in a distributed system. Concurrent access to a shared resource, however, may result in mistakes and inconsistencies. A distributed mutual exclusion algorithm must be employed to manage access to shared resources in order to guarantee mutual exclusion. A distributed mutual exclusion technique, such as Maekawa's algorithm, ensures mutual exclusion between running processes in a distributed system. Only one process at a time can access a shared resource thanks to the algorithm, which is based on a voting system. Maekawa's algorithm A distributed mutual exclusion algorithm, such as Maekawa's algorithm, makes sure ... Read More

LRU Cache implementation using Double Linked Lists

Diksha Patro
Updated on 04-May-2023 12:28:09

611 Views

Caching is a technique to improve a computer's performance by storing frequently accessed data in a cache. The cache is a high-speed storage area in a computer. In this, data can be quickly retrieved from the cache rather than from slower main memory or disc storage whenever needed. Caching can be accomplished in a number of ways. This includes the use of a hash table, an array, or a linked list. In this article, we will explore the LRU Cache implementation using Double Linked Lists in detail. What is LRU Cache implementation? The Least Recently Used (LRU) algorithm is a ... Read More

LRU Approximation (Second Chance Algorithm)

Diksha Patro
Updated on 04-May-2023 12:27:10

2K+ Views

Introduction In computer operating systems, the LRU (Least Recently Used) approximation algorithm, commonly called the Second Chance algorithm, is a page replacement algorithm. It is based on the principle that pages that haven't been used in a while are more likely to be replaced than pages that have. In this article, we will discuss the details, advantages, and disadvantages of this article. LRU Approximation Algorithm To keep track of which pages are currently in memory, the LRU approximation algorithm employs a circular buffer. Each page receives a reference bit, which is initially set to 0. When a page is accessed, ... Read More

Lottery Process Scheduling in Operating System

Diksha Patro
Updated on 04-May-2023 12:26:08

1K+ Views

Introduction Lottery scheduling is a process scheduling algorithm used in operating systems that assign processes a fixed number of "lottery tickets" based on their priority, determining their likelihood of execution. In this article, we will talk about the lottery process scheduling algorithm, and how can manipulate tickets using the same. The Lottery Process Scheduling Algorithm The higher the priority of a process, the more tickets the lottery process scheduling algorithm receives. In this algorithm, the scheduler chooses a ticket at random from the pool of available tickets. For execution, this algorithm chooses the process that owns the winning ticket. ... Read More

Longest Remaining Time First (LRTF) or Preemptive Longest Job First CPU Scheduling Algorithm

Diksha Patro
Updated on 04-May-2023 12:23:47

986 Views

The Longest Remaining Time First (LRTF) scheduling algorithm is a variant of the Longest Job First (LJF) algorithm and is used by the operating system to schedule incoming processes. In LRTF, the process with the highest remaining execution time is given the highest priority and scheduled to be executed first. At intervals of time, such as every unit of time, the system checks to see if another process with a higher burst time has arrived. If such a process exists, it is scheduled for execution before continuing with the current process. The algorithm is designed to maximize the processor's utilization ... Read More

Lock Variable Mechanism

Diksha Patro
Updated on 03-May-2023 17:30:20

1K+ Views

Introduction A lock variable is a mechanism in computer science that allows multiple threads or processes to mutually exclude each other and synchronize access to shared resources. The lock variable has become a simple data structure that typically takes the form of a boolean or integer and is employed to denote the present condition of a resource. In this article, we will explore about Lock Variable Mechanism, how it occurs, and its various advantages and disadvantages. What is Lock Variable Mechanism? When an operating system or process needs to access a particular resource, it appears at the value of the ... Read More

Livelock in Operating System

Diksha Patro
Updated on 03-May-2023 17:29:29

674 Views

Introduction Livelock is a phenomenon that may happen in distributed systems, such as Linux and Windows, when multiple processes or strings constantly alter their states in reaction to changes in the state of other threads or processes, but neither of them may advance toward their goal. Livelock and deadlock are similar in that either scenario may outcome in an arrangement that cannot progress. Procedures or threads aren't really blocked in Livelock; they're just not moving. In this article, we will learn about Livelock, its working in an Operating System, why it must be avoided, and its various disadvantages. How does ... Read More

List scheduling in Operating System

Diksha Patro
Updated on 03-May-2023 17:27:18

186 Views

Introduction List scheduling is an operating system technique for managing the execution of processes in a computer system. It entails making a list of processes to be carried out and then scheduling them based on their priority or other criteria. In this article, we will explore the necessary things to understand in List Scheduling in Operating System. Essential points about List Scheduling in O.S Here are some important points to remember about list scheduling in operating systems − Since list scheduling is a preemptive scheduling algorithm, processes can be interrupted and rescheduled based on their priority. Processes usually reside ... Read More

Advertisements