Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles on Trending Technologies
Technical articles with clear explanations and examples
What are the types of process scheduling algorithms and which algorithms lead to starvation?
Process scheduler assigns different processes to the CPU based on particular scheduling algorithms. Each algorithm has different characteristics regarding fairness, efficiency, and the potential for starvation — a condition where some processes may wait indefinitely. Types of Process Scheduling Algorithms The different types of process scheduling algorithms are as follows − FCFS (First Come First Serve) Jobs are executed on a first come first serve basis using a simple FIFO (First In First Out) queue. It is a non-preemptive algorithm where processes run to completion once started. While simple to implement, its performance is often poor ...
Read MoreHow to Repeat Your Last Command in Linux?
Linux terminal allows us to execute a variety of commands, and often we need to repeat a previously executed command. There are several efficient methods to recall and re-execute the last command without retyping it completely. For demonstration purposes, let's assume we previously ran the command ls -ltr and now want to repeat it using various methods available in Linux. Using Arrow Keys The most basic approach is to press the UP arrow key on your keyboard. This retrieves the last command from your command history, allowing you to press Enter to execute it again or modify ...
Read MoreSingle Processor Systems
A single processor system contains only one CPU that executes one process at a time. The processor selects processes from the ready queue and handles them sequentially. Most general-purpose computers use single processor systems as they are cost-effective and sufficient for everyday computing tasks. In a single processor system, even though multiple applications may be running simultaneously, only one process can actually execute at any given moment. The operating system uses time-sharing to create the illusion of parallel execution by rapidly switching between processes. Architecture of Single Processor Systems Single Processor System Architecture ...
Read MoreWhat is Thread cancellation?
Terminating a thread before it has completed is called thread cancellation. For example, if multiple threads are concurrently searching through a database and one thread returns the result, the remaining threads might be canceled. Another situation occurs when a user presses a stop button on a web browser to halt page loading. Often, a web page loads using several threads — each image is loaded in a separate thread. When the stop button is pressed, all threads loading the page are canceled. A thread that is to be canceled is often referred to as the target thread. Cancellation of ...
Read MoreHow to read a Specific Line From a File in Linux?
When working with the Linux command line, reading specific lines from text files is a common task. Rather than viewing entire files, you often need to extract just one particular line based on its line number. This article explores four different methods to read a specific line from a file using various Linux commands and utilities. Sample File Setup Let's create a sample file called test.txt to demonstrate these methods − $ nl test.txt 1 This is line 1, I don't have any interesting data. ...
Read MoreRedirect Output to location with Permission denied Error?
The Permission denied error when redirecting output to root-owned files is a common issue in Linux systems. When using sudo command > file, the redirection operator (>) runs under the regular user's privileges, not as root, causing permission failures even when the command itself runs with sudo. Understanding the Problem Consider a file that requires root permissions for writing: kent$ ls -l /opt/output.txt -rw-r--r-- 1 root root 0 May 8 10:43 /opt/output.txt When attempting to redirect output as a regular user: kent$ echo "Linux is awesome!" > /opt/output.txt bash: /opt/output.txt: Permission denied ...
Read MoreHow to backup and restore a Docker Container?
Docker containers provide a packaged environment for applications, making them portable and lightweight while allowing version control. Sometimes you need to create snapshots or backups of running containers for emergency rollbacks or to preserve specific states. This article covers how to backup and restore Docker containers using built-in commands. Note: The backup methods described here work for containers with embedded data. For containers using separate data volumes, you must create separate backups for each volume. Backing up a Docker Container The backup process involves creating a snapshot of the container's current state and saving it as an ...
Read More5 Amazing Linux Distributions For Kids
Linux is an open-source operating system that has been gaining popularity in recent years due to its flexibility, stability, and security. Many people associate Linux with complex programming and difficult user interfaces, but this is not always the case. In fact, there are many Linux distributions that are specifically designed for kids, providing a safe and fun computing environment while teaching them the basics of technology. In this article, we will explore amazing Linux distributions for kids, along with their unique features and benefits. Sugar on a Stick Sugar on a Stick (SoaS) is a Linux distribution designed ...
Read MoreWhat is computer architecture?
Computer architecture is a set of rules and methods that describe the functionality, organization, and implementation of computer systems. It defines how a system performs operations and executes instructions, serving as the blueprint for building and understanding computers. Sub-divisions of Computer Architecture Computer architecture can be divided into three main categories − Instruction Set Architecture (ISA) − Defines the interface between software and hardware. It specifies the instructions a processor can execute, data types, registers, memory addressing modes, and interrupt handling. The ISA acts as a contract between software programmers and hardware designers. Microarchitecture − Describes ...
Read MoreHow to Find Out File Types in Linux
In Linux operating systems, everything is treated as a file. Understanding file types is crucial for system administration and file management. In UNIX systems, there are seven standard file types − Regular files − Contains data, text, or program instructions Directory files − Contains lists of other files and directories Symbolic link files − Points to another file or directory Character special files − Represents devices that transfer data character by character Block special files − Represents devices that transfer data in blocks Socket files − Used for inter-process communication FIFO (Named Pipe) files − Used for communication ...
Read More