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
Operating System Articles
Page 49 of 171
LRU Cache implementation using Double Linked Lists
LRU (Least Recently Used) Cache is a caching algorithm that evicts the least recently accessed item when the cache reaches its capacity. It maintains items in order of their usage, with the most recently used at the front and the least recently used at the back. A doubly linked list combined with a hash map provides an efficient implementation with O(1) time complexity for both get and put operations. How LRU Cache Works The LRU cache maintains two key data structures: Doubly Linked List − Stores cache items in order of usage, with head as most ...
Read MoreMechanism for building Distributed file system
A Distributed File System (DFS) is a file system that allows multiple clients to access and share files stored across various servers in a network. Building a DFS requires careful integration of several key components including file servers, metadata management, directory services, file access protocols, replication mechanisms, caching strategies, and security measures. Distributed File System Architecture The architecture of a DFS consists of interconnected components that work together to provide seamless file access across the network. The system is designed with multiple file servers, each storing portions of the distributed files, connected through a network infrastructure. ...
Read MoreHow to Install and Configure Cluster with Two Nodes in Linux?
In today's era, the use of clusters has become increasingly important in the field of computing. A cluster is a group of interconnected computers that work together as a single entity to provide high-performance computing, data analysis, and fault tolerance. In this tutorial, we will demonstrate how to install and configure a two-node cluster in Linux using Pacemaker and Corosync. A cluster consists of two or more nodes that work together as a single system. Each node is a separate computer with its own resources (CPU, memory, storage) connected through a network for communication and resource sharing. Pacemaker acts ...
Read MoreHow to Install and Configure Nginx on CentOS 7?
Nginx is a popular web server that is known for its high performance, scalability, and low resource usage. It is commonly used as a reverse proxy, load balancer, and HTTP cache. In this article, we will discuss how to install and configure Nginx on CentOS 7. Step 1: Update System Before installing any packages, it's essential to update your system to the latest version. Run the following command − sudo yum update Step 2: Install Nginx Once the system is updated, we can proceed with the installation of Nginx. Install Nginx using the ...
Read MoreOpen Source Cloud Storage Software for Linux in 2023
As the amount of data we generate continues to increase, finding a reliable and cost-effective way to store it has become increasingly important. Cloud storage software is a great solution for this need, allowing users to store data remotely and access it from anywhere with an internet connection. For Linux users, there are a variety of options available, including open source software. Open source software is a type of software that is freely available to use, modify, and distribute. It is often created and maintained by a community of developers and users, rather than a single company. This can ...
Read MoreHow to Fix \"W: Some index files failed to download.\" Error In Ubuntu?
When you are running updates on Ubuntu, you may come across an error message that says "Some index files failed to download". This error occurs when Ubuntu is unable to download the package indexes from the software repositories it relies on for updates. The package indexes contain a list of available packages, their versions, and dependencies. Without these indexes, you cannot update or install new packages on your system. It is important to fix this error as soon as possible because it can cause your system to be vulnerable to security risks and bugs. Additionally, if you do not ...
Read MoreHow to Fix the 500 Internal Server Error in WordPress?
WordPress is a popular website platform that powers millions of websites worldwide. However, like any other web platform, it is not immune to errors and glitches. One common error that WordPress users encounter is the 500 Internal Server Error. This error can be frustrating and confusing, especially for non-technical users who are not familiar with server-side errors. The 500 Internal Server Error in WordPress occurs when there is a problem with the server hosting your website. It means that something has gone wrong on the server, but the server cannot pinpoint what caused the issue. This generic error message ...
Read MoreUse ./ (Dot Slash) to execute script file?
In Linux, ./ (dot slash) is used to execute script files located in the current directory. The dot (.) represents the current working directory, and the forward slash (/) is the path separator, so ./script.sh tells the shell to run the script from the current location. What Does Dot Slash Mean? The dot (.) in Linux represents the current working directory. When combined with the forward slash (/), it creates a relative path that points to files in your current location. For example: $ ls -l -rwxr-xr-x 1 user1 user1 156 Jun 12 19:09 script.sh -rw-r--r-- ...
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 MoreKill a process running on a specific port?
Killing a process running on a specific port is a common system administration task in Linux. When a service is running on a port you need to free up, or when a process becomes unresponsive, you need to identify and terminate it. This article covers various methods to find processes by port and terminate them safely. Identifying Processes Using Their Ports Before killing a process, you must first identify which process is using a specific port. The netstat command shows active network connections and listening ports: $ netstat -lntp | grep :80 tcp6 0 0 :::80 ...
Read More