Skip to main content

Safety property that a deadlock can never occur

Identified four necessary conditions for a deadlock to occur

1. Mutual Exclusion. The nodes claim exclusive control of the resources they require.

2. Wait for. Tasks hold resources already allocated to them while waiting for additional resources.

3. No preemption. Resources cannot be forcibly removed from the tasks holding them until the resources are used to completion.

4. Cyclic Wait. A cyclic chain of tasks exists, such that each task holds one or more resources that are being requested by the next task in the chain.


References:

For information about system deadlocks please refer: E. G. Coffman, M. Elphick, and A. Shoshani. System Deadlocks


Comments

Popular posts from this blog

React JS Basics

  What are side effects in React? In React, side effects are operations that interact with external systems or cause changes outside the component's rendering process. These can include: Data fetching: Retrieving data from APIs or other sources. Subscriptions: Setting up listeners for events or data changes. Timers: Creating timers for delayed actions or animations. DOM manipulation: Directly modifying the DOM (rarely used in modern React with declarative approach). Why use useEffect ? In class-based components, you would typically use lifecycle methods like componentDidMount , componentDidUpdate , and componentWillUnmount to handle side effects. Functional components don't have these methods directly. The useEffect Hook provides a way to manage side effects in functional components. It allows you to run a function after a component renders (or re-renders) and optionally clean up any resources created by that function before the component unmounts. How does useEffect wor...

Difference between SKU and Tenant in multi-tenant SaaS application

SKUs define what you get.  Tenants define who gets it in a securely isolated way. A SaaS provider benefits from SKUs for tiered pricing and multi-tenancy for efficient resource usage.   SKU (Stock Keeping Unit) Features and Pricing: SKUs in a SaaS application typically dictate the set of features, functionalities, and usage limits (e.g., storage, number of users, API call volumes) available to a customer. Customer Choice: Customers choose an SKU based on their needs and budget. Higher-tier SKUs usually offer more capabilities and resources at a higher cost. Within a Tenant: A single tenant (customer) can only be subscribed to one SKU at a time, but may potentially upgrade or downgrade over time. Tenant Data Isolation: A tenant represents a logically isolated instance of the SaaS application dedicated to a specific customer or organization. A customer's data, configurations, and often customizations are kept completely separate from other tenants. Multi-Te...

Unix commands

Simple Unix commands (bash shell) Login: 1. Open terminal 2. $ su <<login name>> 3. $  <<password>> Check login: $ id Go to root directory: $ cd / Find directory: $ find / -type d -name <<folder name>> Change permissions for the user: $ chmod -R 777 /<dir1>/<dir2>