{"id":2227,"date":"2022-03-13T16:08:21","date_gmt":"2022-03-13T16:08:21","guid":{"rendered":"http:\/\/learnlearn.uk\/alevelcs\/?page_id=2227"},"modified":"2022-03-21T14:21:57","modified_gmt":"2022-03-21T14:21:57","slug":"process-management","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/alevelcs\/process-management\/","title":{"rendered":"Process Management"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Scheduling<\/h2>\n<div class=\"tabcontent\">\n\n<p><strong>Process Scheduling<\/strong><\/p>\n<p>In computer systems multiple processes may be waiting to be executed by the processor and the processor needs to decided and how to schedule processing. There are multiple scheduling algorithms that can be used, depending on the system. These include:<\/p>\n<ul>\n<li>Round Robin<\/li>\n<li>First Come First Served<\/li>\n<li>Short Job First<\/li>\n<li>Shortest Remaining Time First<\/li>\n<\/ul>\n<p><strong>Process Priorities<\/strong><\/p>\n<p>In most computer systems, processes have different priorities, depending on their function within the system.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Calculations<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Process Scheduling Calculations<\/h3>\n<p><strong>Turnaround Time<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">Turnaround time = Completion time &#8211; arrival time<\/span><\/p>\n<p>This is the duration between a process arriving and it terminating<\/p>\n<p><strong>Waiting Time<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">Waiting time = Turnaround time &#8211; burst time<\/span><\/p>\n<p>This is how long a process waits idle before it is fully executed.<\/p>\n<p><strong>Average Waiting Time<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">Average Waiting Time = Waiting time for all processes \/ Number of processes<\/span><\/p>\n<p>This is how long a process has to wait on average before it is fully processed.<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">States<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Process States<\/h3>\n<p>Processes can be in one of 3 states.<\/p>\n<p><strong>Running<\/strong><\/p>\n<p>This is where the process is currently being executed by the processor<\/p>\n<p><strong>Ready<\/strong><\/p>\n<p>This is where the process is loaded into memory, ready to be executed.<\/p>\n<p><strong>Blocked<\/strong><\/p>\n<p>This is where the process is waiting for an event to occur before it is processed.<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Round Robin<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Round Robin Scheduling<\/h3>\n<p>In round-robin scheduling the processor works on each process in a circular manner. Each process is assigned an equal<strong> time-slice<\/strong> (aka quantum) for execution. Once the time-slice has been used up the\u00a0 process is blocked and will have to wait until the next time round to carry on executing. If a process completes before it reaches it&#8217;s quantum limit then it self terminates the processor moves onto the next process.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/1dc31ddqjJ-iqElQXF4taa77HoGQerylU\/preview\" width=\"900\" height=\"650\"><\/iframe><\/p>\n<p><strong>Advantages<\/strong><\/p>\n<ul>\n<li>All processes are treated equally<\/li>\n<li>All processes are guaranteed to be processed eventually<\/li>\n<\/ul>\n<p><strong>Disadvantages<\/strong><\/p>\n<ul>\n<li>Results in a high average waiting time<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">FCFS<\/h2>\n<div class=\"tabcontent\">\n\n<h3>First Come First Served Scheduling<\/h3>\n<p>Here jobs are executed in the order in which they arrived.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/1msZdGexkqsj19FHVJoxQ2TbDPiQFoqXA\/preview\" width=\"900\" height=\"650\"><\/iframe><\/p>\n<p><strong>Advantages<\/strong><\/p>\n<ul>\n<li>All processes will be processed eventually.<\/li>\n<\/ul>\n<p><strong>Disadvantages<\/strong><\/p>\n<ul>\n<li>Large processes will cause a bottleneck (Convoy Effect)<\/li>\n<\/ul>\n\n<\/div><h2 class=\"tabtitle\">SJF<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Shortest Job First Scheduling<\/h3>\n<p>Here the process with the shortest estimated burst time is executed first. As new processes arrive their estimated burst is compared with the current process to see which process is to be executed.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/1I-WXBPr73Qc21IO_RsM5OIHYGL9jbvTK\/preview\" width=\"900\" height=\"650\"><\/iframe><\/p>\n<p><strong>Advantages<\/strong><\/p>\n<ul>\n<li>Can result in a lower average waiting time<\/li>\n<\/ul>\n<p><strong>Disadvantages<\/strong><\/p>\n<ul>\n<li>Requires the ability to accurately estimate burst times<\/li>\n<li>Can result in priority inversion, depending on the system<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">SRTF<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Shortest Remaining Time First Scheduling<\/h3>\n<p>Here the job with the least amount of remaining burst time is processed first. If a new job arrives with a shorter burst time than the job currently being executed then the current job is moved to the blocked queue and the new job is executed.<\/p>\n<p>Useful in batch systems where smaller jobs need to be given priority.<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/drive.google.com\/file\/d\/19HbTZ5k3vqYU2Df7ueAWHtfVxM2qQPlN\/preview\" width=\"900\" height=\"650\"><\/iframe><\/p>\n<p><strong>Advantages<\/strong><\/p>\n<ul>\n<li>Can result in the lowest average waiting time<\/li>\n<\/ul>\n<p><strong>Disadvantages<\/strong><\/p>\n<ul>\n<li>A certain amount of processing time is required to calculate remaining burst times and switch between tasks (context switching)<\/li>\n<li>The system must be able to accurately estimate burst times for each process, therefore SRTF can only be used in certain systems.<\/li>\n<\/ul>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<p><a href=\"https:\/\/docs.google.com\/presentation\/d\/1mwt7Ym7HH7aXibQAXhHNLpMbL1Ea8JTKnGr8h5mDBJ4\/edit?usp=sharing\">Teacher Presentation<\/a><\/p>\n<p><a href=\"https:\/\/www.gatevidyalay.com\/round-robin-round-robin-scheduling-examples\/\">Round Robin Examples<\/a><\/p>\n<p><a href=\"https:\/\/drive.google.com\/drive\/folders\/16FLTFcTqskvQQiFeT3sTDPxm81GooTle?usp=sharing\">Python Scheduling Simulation Files<\/a><\/p>\n<p><strong>Past Paper Questions<\/strong><\/p>\n<p><a href=\"https:\/\/pastpapers.papacambridge.com\/viewer\/caie\/cambridge-advanced-as-and-a-level-computer-science-9608-2019-oct-nov-9608-w19-qp-31-pdf\">Winter 2019 Paper 31 &#8211; Qn6d<\/a><\/p>\n<p><a href=\"https:\/\/pastpapers.papacambridge.com\/viewer\/caie\/cambridge-advanced-as-and-a-level-computer-science-9608-2018-oct-nov-9608-w18-qp-31-pdf\">Winter 2018 Paper 31 Qn 5<\/a><\/p>\n<p><a href=\"https:\/\/pastpapers.papacambridge.com\/viewer\/caie\/cambridge-advanced-as-and-a-level-computer-science-9608-2018-oct-nov-9608-w18-qp-33-pdf\">November 2018 Paper 33 &#8211; Qn5<\/a><\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Process Scheduling In computer systems multiple processes may be waiting to be executed by the processor and the processor needs to decided and how to schedule processing. There are multiple scheduling algorithms that can be used, depending on the system. These include: Round Robin First Come First Served Short Job First Shortest Remaining Time First&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/alevelcs\/process-management\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Process Management<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"on","neve_meta_content_width":85,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Process Management - A Level Computer Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/alevelcs\/process-management\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Process Management - A Level Computer Science\" \/>\n<meta property=\"og:description\" content=\"Process Scheduling In computer systems multiple processes may be waiting to be executed by the processor and the processor needs to decided and how to schedule processing. There are multiple scheduling algorithms that can be used, depending on the system. These include: Round Robin First Come First Served Short Job First Shortest Remaining Time First&hellip;&nbsp;Read More &raquo;Process Management\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/alevelcs\/process-management\/\" \/>\n<meta property=\"og:site_name\" content=\"A Level Computer Science\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-21T14:21:57+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/process-management\/\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/process-management\/\",\"name\":\"Process Management - A Level Computer Science\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#website\"},\"datePublished\":\"2022-03-13T16:08:21+00:00\",\"dateModified\":\"2022-03-21T14:21:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/process-management\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/alevelcs\/process-management\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/process-management\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"A Level Computer Science Home\",\"item\":\"https:\/\/learnlearn.uk\/alevelcs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Process Management\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#website\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/\",\"name\":\"A Level Computer Science\",\"description\":\"CIE Specification\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/alevelcs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#organization\",\"name\":\"A Level Computer Science\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"A Level Computer Science\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Process Management - A Level Computer Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/alevelcs\/process-management\/","og_locale":"en_GB","og_type":"article","og_title":"Process Management - A Level Computer Science","og_description":"Process Scheduling In computer systems multiple processes may be waiting to be executed by the processor and the processor needs to decided and how to schedule processing. There are multiple scheduling algorithms that can be used, depending on the system. These include: Round Robin First Come First Served Short Job First Shortest Remaining Time First&hellip;&nbsp;Read More &raquo;Process Management","og_url":"https:\/\/learnlearn.uk\/alevelcs\/process-management\/","og_site_name":"A Level Computer Science","article_modified_time":"2022-03-21T14:21:57+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/alevelcs\/process-management\/","url":"https:\/\/learnlearn.uk\/alevelcs\/process-management\/","name":"Process Management - A Level Computer Science","isPartOf":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#website"},"datePublished":"2022-03-13T16:08:21+00:00","dateModified":"2022-03-21T14:21:57+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/process-management\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/alevelcs\/process-management\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/alevelcs\/process-management\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"A Level Computer Science Home","item":"https:\/\/learnlearn.uk\/alevelcs\/"},{"@type":"ListItem","position":2,"name":"Process Management"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/alevelcs\/#website","url":"https:\/\/learnlearn.uk\/alevelcs\/","name":"A Level Computer Science","description":"CIE Specification","publisher":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/alevelcs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/alevelcs\/#organization","name":"A Level Computer Science","url":"https:\/\/learnlearn.uk\/alevelcs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"A Level Computer Science"},"image":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/alevelcs\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Process Scheduling In computer systems multiple processes may be waiting to be executed by the processor and the processor needs to decided and how to schedule processing. There are multiple scheduling algorithms that can be used, depending on the system. These include: Round Robin First Come First Served Short Job First Shortest Remaining Time First&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/2227"}],"collection":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/comments?post=2227"}],"version-history":[{"count":15,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/2227\/revisions"}],"predecessor-version":[{"id":2250,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/2227\/revisions\/2250"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/media?parent=2227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}