{"id":160325,"date":"2023-09-26T12:32:54","date_gmt":"2023-09-26T07:02:54","guid":{"rendered":"https:\/\/www.gkseries.com\/blog\/?p=160325"},"modified":"2023-09-26T12:32:55","modified_gmt":"2023-09-26T07:02:55","slug":"in-a-system-there-are-three-types-of-resources-e-f-and-g-four-processes-p0-p1-p2-and-p3-execute-concurrently","status":"publish","type":"post","link":"https:\/\/www.gkseries.com\/blog\/in-a-system-there-are-three-types-of-resources-e-f-and-g-four-processes-p0-p1-p2-and-p3-execute-concurrently\/","title":{"rendered":"In a system, there are three types of resources: E, F and G. Four processes P0, P1, P2 and P3 execute concurrently"},"content":{"rendered":"\n<p>Q. In a system, there are three types of resources: <em>E, F <\/em>and <em>G<\/em>. Four processes <em>P0, P1, P2 <\/em>and <em>P3 <\/em>execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max[<em>P2,F<\/em>] is the maximum number of instances of <em>F <\/em>that <em>P2 <\/em>would require. The number of instances of the resources allocated to the various processes at any given state is given by a matrix named Allocation<\/p>\n\n\n\n<p>Consider a state of the system with the Allocation matrix as shown below, and in which 3 instances of <em>E <\/em>and 3 instances of <em>F <\/em>are the only resources available.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td colspan=\"4\">Allocation<\/td><\/tr><tr><td>&nbsp;<\/td><td><em>E<\/em><\/td><td><em>F<\/em><\/td><td><em>G<\/em><em><\/em><\/td><\/tr><tr><td><em>P<\/em><em>0<\/em><\/td><td>1<\/td><td>0<\/td><td>1<\/td><\/tr><tr><td><em>P<\/em><em>1<\/em><\/td><td>1<\/td><td>1<\/td><td>2<\/td><\/tr><tr><td><em>P<\/em><em>2<\/em><\/td><td>1<\/td><td>0<\/td><td>3<\/td><\/tr><tr><td><em>P<\/em><em>3<\/em><\/td><td>2<\/td><td>0<\/td><td>0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td colspan=\"4\">Max<\/td><\/tr><tr><td>&nbsp;<\/td><td><em>E<\/em><\/td><td><em>F<\/em><\/td><td><em>G<\/em><em><\/em><\/td><\/tr><tr><td><em>P<\/em><em>0<\/em><\/td><td>4<\/td><td>3<\/td><td>1<\/td><\/tr><tr><td><em>P<\/em><em>1<\/em><\/td><td>2<\/td><td>1<\/td><td>4<\/td><\/tr><tr><td><em>P<\/em><em>2<\/em><\/td><td>1<\/td><td>3<\/td><td>3<\/td><\/tr><tr><td><em>P<\/em><em>3<\/em><\/td><td>5<\/td><td>4<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>From the perspective of deadlock avoidance, which one of the following is true?<\/p>\n\n\n\n<p>A. The system is in <em>safe <\/em>state.<\/p>\n\n\n\n<p>B. The system is not in <em>safe <\/em>state, but would be <em>safe <\/em>if one more instance of <em>E <\/em>were available<\/p>\n\n\n\n<p>C. The system is not in <em>safe <\/em>state, but would be <em>safe <\/em>if one more instance of <em>F <\/em>were available<\/p>\n\n\n\n<p>D. The system is not in <em>safe <\/em>state, but would be <em>safe <\/em>if one more instance of <em>G <\/em>were available<\/p>\n\n\n\n<p>Ans: The system is in <em>safe <\/em>state.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q. In a system, there are three types of resources: E, F and G. Four processes P0, P1, P2 and P3 execute concurrently. At the outset, the processes have declared their maximum resource requirements using a matrix named Max as given below. For example, Max[P2,F] is the maximum number of instances of F that P2 [&hellip;]<\/p>\n","protected":false},"author":419,"featured_media":160326,"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-160325","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\/160325","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=160325"}],"version-history":[{"count":1,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/160325\/revisions"}],"predecessor-version":[{"id":160327,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/160325\/revisions\/160327"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media\/160326"}],"wp:attachment":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media?parent=160325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/categories?post=160325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/tags?post=160325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}