Software & Coding Articles

Page 11 of 83

What are the five process states in the Linux kernel ?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 1K+ Views

The Linux kernel manages processes through five distinct states that define their current execution status and resource allocation. Understanding these states is crucial for system administrators and developers working with process management. The Five Process States Running (TASK_RUNNING) − The process is either currently executing on the CPU or is ready to run and waiting in the run queue. This is the most active state where the process can access system resources and CPU time. Interruptible Sleep (TASK_INTERRUPTIBLE) − The process is blocked and waiting for a specific event, signal, or resource to become available. It can ...

Read More

What are the Privileged and Non-Privileged instructions in Operating System?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 4K+ Views

In operating systems, instructions are classified into two main categories based on their access level and potential impact on system security and stability. Privileged instructions can only be executed in kernel mode, while non-privileged instructions can be executed in user mode. This classification ensures system protection and controlled access to critical resources. Privileged Instructions Privileged instructions are machine-level instructions that can only be executed when the processor is operating in kernel mode (also called privileged mode). These instructions have direct access to system resources and can potentially compromise system security if misused. Examples of Privileged Instructions ...

Read More

What happens to a PCB when the state of a process changes?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 1K+ Views

Process Control Block (PCB) is a data structure used by the operating system to store essential information about each process. When a process changes state, the PCB is updated to reflect the new state and preserve the process's context for future execution. The PCB contains critical information that allows the OS to manage processes effectively during state transitions and context switches. PCB Components The important information stored in PCB includes the following − Process ID (PID) − Unique identifier for each process in the system. Process State − Current state (Ready, Running, Blocked, Terminated). Program ...

Read More

How can kernels context-switch between processes?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 2K+ Views

Context switching is the process by which the kernel saves the state of a currently running process and loads the state of another process to give it CPU time. It's important to distinguish that a simple transition between user and kernel mode is not a context switch — a context switch specifically involves changing from one process to another. How Context Switching Works The kernel performs context switching through a series of coordinated steps to ensure process states are preserved and restored correctly: The values of the CPU registers are saved in the Process Control Block ...

Read More

How are system calls connected to the operating system?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 2K+ Views

System calls are the interface between user programs and the operating system kernel. They provide a controlled way for applications to request services from the OS, such as file operations, memory allocation, or hardware access. Application developers typically access system calls through APIs (Application Programming Interfaces), which define how software components should communicate. When a user program needs to interact with the operating system − whether to read a file, allocate memory, or access hardware − it must use system calls. This mechanism ensures that user programs cannot directly access critical system resources, maintaining security and stability. User ...

Read More

Differentiate between event driven paradigm and algorithmic paradigms

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 602 Views

Programming paradigms define how we approach and structure solutions to computational problems. Two fundamentally different approaches are algorithmic paradigms and event-driven paradigms, each serving distinct purposes in software development. Algorithmic Paradigms An algorithmic paradigm is a generic model or framework that underlies the design of a class of algorithms. It provides a systematic approach to problem-solving by defining how we break down complex problems into manageable parts and solve them step by step. The main algorithmic paradigms include: Brute Force − Tries all possible solutions until finding the correct one Greedy − Makes locally optimal ...

Read More

What is dispatcher and difference between dispatcher and scheduler?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 790 Views

The dispatcher is a crucial component of the operating system that works after the scheduler has made its decision. It gives control of the CPU to the process selected by the short-term scheduler by performing the actual context switching and transferring CPU control to the chosen process. Functions of Dispatcher The dispatcher performs several critical functions to transfer CPU control − Context switching − Saving the current process state and loading the selected process state. Switching to user mode − Changing from kernel mode to user mode for process execution. Jumping to the proper location − ...

Read More

What are the essential properties of the different types of operating systems?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 7K+ Views

The essential properties of the different types of operating systems are as follows − Batch Operating System Batch operating systems group similar jobs together and execute them sequentially without user interaction. Jobs with similar requirements are collected into batches and processed by an operator or automatic job sequencer. Key Properties: Jobs are executed in groups without manual intervention High throughput through CPU and I/O device utilization via buffering, spooling, and multiprogramming Suitable for large computational jobs requiring minimal interaction Jobs can be submitted and results collected later Interactive Operating System Interactive operating systems ...

Read More

How semaphore is used to implement mutual exclusion?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 9K+ Views

A semaphore is a shared variable used to implement mutual exclusion between system processes. It helps solve critical section problems and is a fundamental technique to achieve process synchronization by controlling access to shared resources. Types of Semaphores There are two types of semaphores which are as follows − Binary semaphore − Can take only two values, 0 or 1 which means at a time only one process can enter into the critical section. Semaphore is initialized to 1. Counting semaphore − Can take any non-negative value N which means at a time at most N ...

Read More

What is Peterson's solution?

Bhanu Priya
Bhanu Priya
Updated on 17-Mar-2026 7K+ Views

Peterson's solution is a classic software-based algorithm that ensures mutual exclusion between two processes without requiring any hardware support. It can be implemented on any platform using only two shared variables: an interested array and a turn variable. The algorithm allows two processes to safely access a critical section by using these variables to coordinate entry and prevent race conditions. Each process declares its interest in entering the critical section and yields priority to the other process if both want to enter simultaneously. Peterson's Solution Algorithm #define N 2 #define TRUE 1 #define FALSE 0 ...

Read More
Showing 101–110 of 825 articles
« Prev 1 9 10 11 12 13 83 Next »
Advertisements