Ricky Barnes

Ricky Barnes

84 Articles Published

Articles by Ricky Barnes

84 articles

Race Condition, Critical Section and Semaphore

Ricky Barnes
Ricky Barnes
Updated on 07-Nov-2023 42K+ 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

Readers-Writers Problem

Ricky Barnes
Ricky Barnes
Updated on 07-Nov-2023 63K+ Views

The readers-writers problem relates to an object such as a file that is shared between multiple processes. Some of these processes are readers i.e. they only want to read the data from the object and some of the processes are writers i.e. they want to write into the object.The readers-writers problem is used to manage synchronization so that there are no problems with the object data. For example - If two readers access the object at the same time there is no problem. However if two writers or a reader and writer access the object at the same time, there ...

Read More

Extended Entity-Relationship (EE-R) Model

Ricky Barnes
Ricky Barnes
Updated on 13-Sep-2023 56K+ Views

EER is a high-level data model that incorporates the extensions to the original ER model. Enhanced ERD are high level models that represent the requirements and complexities of complex database.In addition to ER model concepts EE-R includes −Subclasses and Super classes.Specialization and Generalization.Category or union type.Aggregation.These concepts are used to create EE-R diagrams.Subclasses and Super classSuper class is an entity that can be divided into further subtype.For example − consider Shape super class.Super class shape has sub groups: Triangle, Square and Circle.Sub classes are the group of entities with some unique attributes. Sub class inherits the properties and attributes from ...

Read More

How to get content of div which contains JavaScript script blocks?

Ricky Barnes
Ricky Barnes
Updated on 27-Jun-2022 3K+ Views

To get the content of div which contains JavaScript script blocks, use the html() method. You can try to run the following code to get the content. With html(), get the content of div, which includes the JavaScript script.ExampleLive Demo                            $(document).ready(function(){            $("#button1").click(function(){              alert($("#demo").html());              });          });                                This is demo text.                       This is JavaScript                        Get    

Read More

Operating Systems Client/Server Communication

Ricky Barnes
Ricky Barnes
Updated on 24-Jun-2020 21K+ Views

Client/Server communication involves two components, namely a client and a server. They are usually multiple clients in communication with a single server. The clients send requests to the server and the server responds to the client requests.There are three main methods to client/server communication. These are given as follows −SocketsSockets facilitate communication between two processes on the same machine or different machines. They are used in a client/server framework and consist of the IP address and port number. Many application protocols use sockets for data connection and data transfer between a client and a server.Socket communication is quite low-level as ...

Read More

Process vs Parent Process vs Child Process

Ricky Barnes
Ricky Barnes
Updated on 24-Jun-2020 11K+ Views

In Operating System, the fork() system call is used by a process to create another process. The process that used the fork() system call is the parent process and process consequently created is known as the child process.Details about these are given as follows −ProcessA process is an active program i.e a program that is under execution. It is more than the program code as it includes the program counter, process stack, registers, program code etc. Compared to this, the program code is only the text section.A process changes its state as it executes. This state partially depends on the ...

Read More

Cooperating Process

Ricky Barnes
Ricky Barnes
Updated on 24-Jun-2020 11K+ Views

Cooperating processes are those that can affect or are affected by other processes running on the system. Cooperating processes may share data with each other.Reasons for needing cooperating processesThere may be many reasons for the requirement of cooperating processes. Some of these are given as follows −ModularityModularity involves dividing complicated tasks into smaller subtasks. These subtasks can completed by different cooperating processes. This leads to faster and more efficient completion of the required tasks.Information SharingSharing of information between multiple processes can be accomplished using cooperating processes. This may include access to the same files. A mechanism is required so that ...

Read More

Mutex vs Semaphore

Ricky Barnes
Ricky Barnes
Updated on 24-Jun-2020 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

What are the different states of a Process?\\n

Ricky Barnes
Ricky Barnes
Updated on 24-Jun-2020 15K+ Views

A process is an active program. It can also be said as a program that is under execution. It is more than the program code as it includes the program counter, process stack, registers, program code etc. Compared to this, the program code is only the text section.A process passes through different states as it executes. These states may be different in different operating systems. However, the common process states are explained below with the help of a diagram −NewThis is the state when the process has just been created. It is the initial state in the process life cycle.ReadyIn ...

Read More

What is Zombie Process in Linux?

Ricky Barnes
Ricky Barnes
Updated on 23-Jun-2020 21K+ Views

A zombie process is a process whose execution is completed but it still has an entry in the process table. Zombie processes usually occur for child processes, as the parent process still needs to read its child’s exit status. Once this is done using the wait system call, the zombie process is eliminated from the process table. This is known as reaping the zombie process.A diagram that demonstrates the creation and termination of a zombie process is given as follows −Salient points of Zombie ProcessesSome of the salient points related to zombie processes are as follows −All the memory and ...

Read More
Showing 1–10 of 84 articles
« Prev 1 2 3 4 5 9 Next »
Advertisements