The C language Pen question selection 3---deadlock occurrence necessary condition is?

Source: Internet
Author: User

Q: Which of the following are the necessary conditions for deadlock occurrence?

A. Mutually exclusive conditions

B. Request and hold

C. Non-deprivation

D, cyclic waiting






Specific answers:

1. Mutually exclusive use (resource monopoly)
A resource can only be used for one process at a time


2. Not to be usurped (inalienable)
Resource applicants cannot forcibly seize resources from the resource holders, resources can only be released voluntarily by the possessor


3. Request and maintain (partial allocation, possession application)
A process maintains the possession of the original resource at the same time as the application of a new resource (only this is the dynamic application, dynamic allocation)


4. Cyclic waiting
There is a process waiting queue
{P1, P2, ..., Pn},
Among them P1 waits for P2 to occupy the resources, P2 waits for the P3 to occupy the resources, ..., PN waits for the P1 to occupy the resources, forms a process waits the loop

Answer: ABCD

The C language Pen question selection 3---deadlock occurrence necessary condition is?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.