{"id":154145,"date":"2023-08-02T15:22:23","date_gmt":"2023-08-02T09:52:23","guid":{"rendered":"https:\/\/www.gkseries.com\/blog\/?p=154145"},"modified":"2023-08-02T15:22:25","modified_gmt":"2023-08-02T09:52:25","slug":"consider-the-following-snapshot-of-a-system-running-%f0%9d%91%9b-concurrent-processes-process-%f0%9d%91%96-is-holding-%f0%9d%91%8b%f0%9d%91%96-instances-of-a-resource-r-1-%e2%89%a4-%f0%9d%91%96","status":"publish","type":"post","link":"https:\/\/www.gkseries.com\/blog\/consider-the-following-snapshot-of-a-system-running-%f0%9d%91%9b-concurrent-processes-process-%f0%9d%91%96-is-holding-%f0%9d%91%8b%f0%9d%91%96-instances-of-a-resource-r-1-%e2%89%a4-%f0%9d%91%96\/","title":{"rendered":"Consider the following snapshot of a system running \ud835\udc5b concurrent processes. Process \ud835\udc56 is holding \ud835\udc4b\ud835\udc56 instances of a resource R, 1 \u2264 \ud835\udc56 \u2264 \ud835\udc5b. Assume that all instances of R are currently in use"},"content":{"rendered":"\n<p>Q. Consider the following snapshot of a system running \ud835\udc5b concurrent processes. Process \ud835\udc56 is holding \ud835\udc4b<sub>\ud835\udc56<\/sub> instances of a resource R, 1 \u2264 \ud835\udc56 \u2264 \ud835\udc5b. Assume that all instances of R are currently in use. Further, for all \ud835\udc56, process \ud835\udc56 can place a request for at most \ud835\udc4c<sub>\ud835\udc56<\/sub> additional instances of R while holding the \ud835\udc4b<sub>\ud835\udc56<\/sub> instances it already has. Of the \ud835\udc5b processes, there are exactly two processes \ud835\udc5d and \ud835\udc5e such that \ud835\udc4c<sub>\ud835\udc5d<\/sub> = \ud835\udc4c<sub>\ud835\udc5e<\/sub> = 0. Which one of the following conditions guarantees that no other process apart from \ud835\udc5d and \ud835\udc5e can complete execution?<\/p>\n\n\n\n<p>(A) \ud835\udc4b<sub>\ud835\udc5d<\/sub> + \ud835\udc4b<sub>\ud835\udc5e<\/sub> &lt; Min {\ud835\udc4c<sub>\ud835\udc58<\/sub> | 1 \u2264 \ud835\udc58 \u2264 \ud835\udc5b , k  \u2260 p, k \u2260 q}<\/p>\n\n\n\n<p>(B) \ud835\udc4b<sub>\ud835\udc5d<\/sub> + \ud835\udc4b<sub>\ud835\udc5e<\/sub> &lt; Max {\ud835\udc4c<sub>\ud835\udc58<\/sub> | 1 \u2264 \ud835\udc58 \u2264 \ud835\udc5b , k  \u2260 p, k \u2260 q}<\/p>\n\n\n\n<p>(C) Min (\ud835\udc4b<sub>\ud835\udc5d<\/sub> , \ud835\udc4b<sub>\ud835\udc5e<\/sub>) \u2265 Min {\ud835\udc4c<sub>\ud835\udc58<\/sub> | 1 \u2264 \ud835\udc58 \u2264 \ud835\udc5b , k \u2260p, k  \u2260 q}<\/p>\n\n\n\n<p>(D) Min (\ud835\udc4b<sub>\ud835\udc5d<\/sub>, \ud835\udc4b<sub>\ud835\udc5e<\/sub>) \u2264 Max {\ud835\udc4c<sub>\ud835\udc58<\/sub> | 1 \u2264 \ud835\udc58 \u2264 \ud835\udc5b , k  \u2260 p, k  \u2260 q}<\/p>\n\n\n\n<p>Ans: X<sub>p<\/sub>\u00a0+ X<sub>q<\/sub>\u00a0&lt; Min {Y<sub>k<\/sub>\u00a0\u23d0 1 \u2264 k \u2264 n, k \u2260 p, k \u2260 q}<\/p>\n\n\n\n<p>Solution:<\/p>\n\n\n\n<p>Xi \u2192 Holding resources for process pi,<\/p>\n\n\n\n<p>Yi \u2192 Additional resources for process pi.<\/p>\n\n\n\n<p>As process p and q doesn\u2019t require any additional resources, it completes its execution and available resources are (Xp + Xq)<\/p>\n\n\n\n<p>There are (n \u2013 2) process pi (1&lt; i &lt; n, i \u2260 p, q) with their requirements as Yi (1 &lt; i &lt; n, i \u2260 p, q). In order to not execute process pi, no instance of Yi should be satisfied with (Xp + Xq) resources, i.e., minimum of Yi instances should be greater than (Xp + Xq).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q. Consider the following snapshot of a system running \ud835\udc5b concurrent processes. Process \ud835\udc56 is holding \ud835\udc4b\ud835\udc56 instances of a resource R, 1 \u2264 \ud835\udc56 \u2264 \ud835\udc5b. Assume that all instances of R are currently in use. Further, for all \ud835\udc56, process \ud835\udc56 can place a request for at most \ud835\udc4c\ud835\udc56 additional instances of R [&hellip;]<\/p>\n","protected":false},"author":419,"featured_media":154146,"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":[],"class_list":["post-154145","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gate"],"_links":{"self":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/154145","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=154145"}],"version-history":[{"count":1,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/154145\/revisions"}],"predecessor-version":[{"id":154147,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/posts\/154145\/revisions\/154147"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media\/154146"}],"wp:attachment":[{"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/media?parent=154145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/categories?post=154145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gkseries.com\/blog\/wp-json\/wp\/v2\/tags?post=154145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}