What is the minimum number of resources required to ensure that deadlock will never occur, if there are currently three processes P1, P2, and P3 running in a system whose maximum demand for the resources of the same type are 3, 4, and 5 respectively?

What is the minimum number of resources required to ensure that deadlock will never occur, if there are currently three processes P1, P2, and P3 running in a system whose maximum demand for the resources of the same type are 3, 4, and 5 respectively? Correct Answer 10

The correct answer is option 4:

Data:

Maximum resource requirement of Process P1 = 3

Maximum resource requirement of Process P2 = 4

Maximum resource requirement of Process P3 = 5

Concept:

Deadlock can occur If any process gets available resource < demanded resource

Max resource for process P1 to be in deadlock = needed - 1 = 3 - 1 = 2

Max resource for process P2 to be in deadlock = needed - 1 = 4 - 1 = 3

Max resource for process P3 to be in deadlock = needed - 1 = 5 - 1 = 4

If one resource is added, any of the n processes can take it a finish its execution leaving behind the allocated resource, and hence the system will be deadlock-free.

Calculation:

The minimum value of m that ensures that deadlock will never occur = (2 + 3 + 4) + 1 = 10

Related Questions

In the question below, are given a statement followed by three courses of actions numbered I, II and III. On the basis of the information given, you have to assume everything in the statement to be true, and then decide which of the suggested course of action logically follow (s) for pursuing. Statement: The India Risk Survey 2017 report ranks 'Information & Cyber Insecurity' as the biggest risk facing Indian companies. Indian organizations, both public and private, had witnessed over 27,000 incidents of security threat, from January 2017 till June 2017 alone. Phishing, scanning/probing, website intrusions and defacements, virus/malicious code, ransomware, Denial of Service attacks, and data breaches are some ways in which hackers attack business websites, which can cause operational disruptions and potentially steal sensitive information. Small and medium businesses (SMBs), unfortunately, have been seeing rising incidences of cybercrime. In fact, 70 percent of cyberattacks occur at organizations with lesser than 100 employees  Courses of action: I. Mandate basic security practices and policies for all employees, such as 2-factor authentication, internet use guidelines and create and enforce rules on handling and protecting sensitive data. Conduct frequent training to sensitize employees about opening suspicious emails, encrypting their data, using strong passwords on their devices, installing security apps, and limiting activity over public Wi-Fi. Implement and enforce incident reporting to help ensure that even the smallest breach is report to management as well as the IT teams. II. Basics still matter and are some of the best defenses against viruses, malware, and other online threats. Assess the assets that are most at risk - data, servers, network - and ensure that the systems are updated with the latest security software, web browser, and operating system. Implement firewall security and run antivirus software after each update.  III. Ensure regular backup of all critical data - whether stored in-house or on the cloud. Run scheduled attack drills and stress tests to identify vulnerabilities and ensure that data restoration and business continuity are executed as planned.