{"id":160292,"date":"2023-09-25T15:23:43","date_gmt":"2023-09-25T09:53:43","guid":{"rendered":"https:\/\/www.gkseries.com\/blog\/?p=160292"},"modified":"2023-09-25T15:23:43","modified_gmt":"2023-09-25T09:53:43","slug":"consider-a-system-with-3-processes-that-share-4-instances-of-the-same-resource-type","status":"publish","type":"post","link":"https:\/\/www.gkseries.com\/blog\/consider-a-system-with-3-processes-that-share-4-instances-of-the-same-resource-type\/","title":{"rendered":"Consider a system with 3 processes that share 4 instances of the same resource type"},"content":{"rendered":"\n<p>Q. Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of \ud835\udc3e instances. Resource instances can be requested and released only one at a time. The largest value of \ud835\udc3e that will always avoid deadlock is .<\/p>\n\n\n\n<p>Ans: 2<\/p>\n\n\n\n<p>Sol:<\/p>\n\n\n\n<p>Given,<br>Number of processes (P) = 3<br>Number of resources (R) = 4<\/p>\n\n\n\n<p>Since deadlock-free condition is:R \u2265 P(N \u2212 1) + 1<\/p>\n\n\n\n<p>Where R is total number of resources,<br>P is the number of processes, and<br>N is the max need for each resource.4 \u2265 3(N \u2212 1) + 1 3 \u2265 3(N \u2212 1) 1 \u2265 (N \u2212 1) N \u2264 2<\/p>\n\n\n\n<p>Therefore, the largest value of K that will always avoid deadlock is\u00a0<strong>2<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q. Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of \ud835\udc3e instances. Resource instances can be requested and released only one at a time. The largest value of \ud835\udc3e that will always avoid deadlock is . Ans: 2 Sol: Given,Number of processes [&hellip;]<\/p>\n","protected":false},"author":419,"featured_media":160293,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5141],"tags":[5140],"class_list":["post-160292","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gate","tag-gate-questions"],"_links":{"self":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/160292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/users\/419"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/comments?post=160292"}],"version-history":[{"count":1,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/160292\/revisions"}],"predecessor-version":[{"id":160294,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/160292\/revisions\/160294"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media\/160293"}],"wp:attachment":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media?parent=160292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/categories?post=160292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/tags?post=160292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}