{"id":3266,"date":"2025-06-07T13:44:56","date_gmt":"2025-06-07T13:44:56","guid":{"rendered":"https:\/\/diznr.com\/?p=3266"},"modified":"2025-06-07T13:44:56","modified_gmt":"2025-06-07T13:44:56","slug":"day-01part-01-operating-system-for-gate-computer-science-introduction-to-algorithm-scheduling","status":"publish","type":"post","link":"https:\/\/www.reilsolar.com\/pdf\/day-01part-01-operating-system-for-gate-computer-science-introduction-to-algorithm-scheduling\/","title":{"rendered":"Day 01Part 01- Operating System for gate Computer Science &#8211; Introduction to scheduling algorithm."},"content":{"rendered":"<p>Day 01Part 01- Operating System for gate Computer Science &#8211; Introduction to scheduling algorithm.<\/p>\n<p>[fvplayer id=&#8221;325&#8243;]<\/p>\n<p class=\"\" data-start=\"0\" data-end=\"46\">Here\u2019s a clear and structured explanation for:<\/p>\n<hr class=\"\" data-start=\"48\" data-end=\"51\" \/>\n<h2 class=\"\" data-start=\"53\" data-end=\"112\">\ud83e\udde0 <strong data-start=\"59\" data-end=\"110\">Day 01 \u2013 Part 01: Operating System for GATE CSE<\/strong><\/h2>\n<h3 class=\"\" data-start=\"113\" data-end=\"168\">\ud83c\udfaf <strong data-start=\"120\" data-end=\"168\">Topic: Introduction to Scheduling Algorithms<\/strong><\/h3>\n<hr class=\"\" data-start=\"170\" data-end=\"173\" \/>\n<h3 class=\"\" data-start=\"175\" data-end=\"212\">\ud83d\udccc <strong data-start=\"182\" data-end=\"212\">1. What is CPU Scheduling?<\/strong><\/h3>\n<p class=\"\" data-start=\"214\" data-end=\"321\"><strong data-start=\"214\" data-end=\"232\">CPU Scheduling<\/strong> is the process of selecting one process from the ready queue to execute next on the CPU.<\/p>\n<p class=\"\" data-start=\"323\" data-end=\"451\">In a <strong data-start=\"328\" data-end=\"355\">multiprogramming system<\/strong>, multiple processes are in memory, and the <strong data-start=\"399\" data-end=\"416\">CPU scheduler<\/strong> picks one of the processes to run.<\/p>\n<hr class=\"\" data-start=\"453\" data-end=\"456\" \/>\n<h3 class=\"\" data-start=\"458\" data-end=\"524\">\ud83c\udfaf <strong data-start=\"465\" data-end=\"524\">Why Scheduling is Important in OS (GATE Point of View):<\/strong><\/h3>\n<ul data-start=\"526\" data-end=\"652\">\n<li class=\"\" data-start=\"526\" data-end=\"558\">\n<p class=\"\" data-start=\"528\" data-end=\"558\">Improves <strong data-start=\"537\" data-end=\"556\">CPU utilization<\/strong><\/p>\n<\/li>\n<li class=\"\" data-start=\"559\" data-end=\"606\">\n<p class=\"\" data-start=\"561\" data-end=\"606\">Minimizes <strong data-start=\"571\" data-end=\"604\">waiting time, turnaround time<\/strong><\/p>\n<\/li>\n<li class=\"\" data-start=\"607\" data-end=\"652\">\n<p class=\"\" data-start=\"609\" data-end=\"652\">Maximizes <strong data-start=\"619\" data-end=\"652\">throughput and responsiveness<\/strong><\/p>\n<\/li>\n<\/ul>\n<hr class=\"\" data-start=\"654\" data-end=\"657\" \/>\n<h3 class=\"\" data-start=\"659\" data-end=\"699\">\ud83d\udd04 <strong data-start=\"666\" data-end=\"699\">2. Types of Schedulers in OS:<\/strong><\/h3>\n<div class=\"_tableContainer_16hzy_1\">\n<div class=\"_tableWrapper_16hzy_14 group flex w-fit flex-col-reverse\">\n<table class=\"w-fit min-w-(--thread-content-width)\" data-start=\"701\" data-end=\"1176\">\n<thead data-start=\"701\" data-end=\"795\">\n<tr data-start=\"701\" data-end=\"795\">\n<th data-start=\"701\" data-end=\"723\" data-col-size=\"sm\">Scheduler Type<\/th>\n<th data-start=\"723\" data-end=\"795\" data-col-size=\"md\">Role<\/th>\n<\/tr>\n<\/thead>\n<tbody data-start=\"891\" data-end=\"1176\">\n<tr data-start=\"891\" data-end=\"985\">\n<td data-start=\"891\" data-end=\"913\" data-col-size=\"sm\"><strong data-start=\"893\" data-end=\"906\">Long-Term<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"913\" data-end=\"985\">Decides which jobs are admitted to the system<\/td>\n<\/tr>\n<tr data-start=\"986\" data-end=\"1081\">\n<td data-start=\"986\" data-end=\"1008\" data-col-size=\"sm\"><strong data-start=\"988\" data-end=\"1002\">Short-Term<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"1008\" data-end=\"1081\">Picks from ready queue \u2192 allocated to CPU (<strong data-start=\"1053\" data-end=\"1071\">CPU Scheduling<\/strong>)<\/td>\n<\/tr>\n<tr data-start=\"1082\" data-end=\"1176\">\n<td data-start=\"1082\" data-end=\"1104\" data-col-size=\"sm\"><strong data-start=\"1084\" data-end=\"1099\">Medium-Term<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"1104\" data-end=\"1176\">Suspends\/resumes processes (used for swapping)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sticky end-(--thread-content-margin) h-0 self-end select-none\">\n<div class=\"absolute end-0 flex items-end\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<hr class=\"\" data-start=\"1178\" data-end=\"1181\" \/>\n<h3 class=\"\" data-start=\"1183\" data-end=\"1247\">\ud83e\uddee <strong data-start=\"1190\" data-end=\"1247\">3. Scheduling Criteria (Very Important for GATE MCQs)<\/strong><\/h3>\n<div class=\"_tableContainer_16hzy_1\">\n<div class=\"_tableWrapper_16hzy_14 group flex w-fit flex-col-reverse\">\n<table class=\"w-fit min-w-(--thread-content-width)\" data-start=\"1249\" data-end=\"2067\">\n<thead data-start=\"1249\" data-end=\"1350\">\n<tr data-start=\"1249\" data-end=\"1350\">\n<th data-start=\"1249\" data-end=\"1271\" data-col-size=\"sm\">Criterion<\/th>\n<th data-start=\"1271\" data-end=\"1350\" data-col-size=\"md\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody data-start=\"1453\" data-end=\"2067\">\n<tr data-start=\"1453\" data-end=\"1554\">\n<td data-start=\"1453\" data-end=\"1475\" data-col-size=\"sm\"><strong data-start=\"1455\" data-end=\"1474\">CPU Utilization<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"1475\" data-end=\"1554\">Keep CPU as busy as possible (ideal: 100%)<\/td>\n<\/tr>\n<tr data-start=\"1555\" data-end=\"1656\">\n<td data-start=\"1555\" data-end=\"1577\" data-col-size=\"sm\"><strong data-start=\"1557\" data-end=\"1571\">Throughput<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"1577\" data-end=\"1656\">No. of processes completed per unit time<\/td>\n<\/tr>\n<tr data-start=\"1657\" data-end=\"1759\">\n<td data-start=\"1657\" data-end=\"1679\" data-col-size=\"sm\"><strong data-start=\"1659\" data-end=\"1678\">Turnaround Time<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"1679\" data-end=\"1759\">Completion time \u2013 Arrival time<\/td>\n<\/tr>\n<tr data-start=\"1760\" data-end=\"1862\">\n<td data-start=\"1760\" data-end=\"1782\" data-col-size=\"sm\"><strong data-start=\"1762\" data-end=\"1778\">Waiting Time<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"1782\" data-end=\"1862\">Turnaround Time \u2013 Burst Time<\/td>\n<\/tr>\n<tr data-start=\"1863\" data-end=\"1965\">\n<td data-start=\"1863\" data-end=\"1885\" data-col-size=\"sm\"><strong data-start=\"1865\" data-end=\"1882\">Response Time<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"1885\" data-end=\"1965\">First response \u2013 Arrival time<\/td>\n<\/tr>\n<tr data-start=\"1966\" data-end=\"2067\">\n<td data-start=\"1966\" data-end=\"1988\" data-col-size=\"sm\"><strong data-start=\"1968\" data-end=\"1980\">Fairness<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"1988\" data-end=\"2067\">No starvation, all processes get chance<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sticky end-(--thread-content-margin) h-0 self-end select-none\">\n<div class=\"absolute end-0 flex items-end\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<hr class=\"\" data-start=\"2069\" data-end=\"2072\" \/>\n<h3 class=\"\" data-start=\"2074\" data-end=\"2127\">\u2699\ufe0f <strong data-start=\"2081\" data-end=\"2127\">4. Classification of Scheduling Algorithms<\/strong><\/h3>\n<div class=\"_tableContainer_16hzy_1\">\n<div class=\"_tableWrapper_16hzy_14 group flex w-fit flex-col-reverse\">\n<table class=\"w-fit min-w-(--thread-content-width)\" data-start=\"2129\" data-end=\"2425\">\n<thead data-start=\"2129\" data-end=\"2192\">\n<tr data-start=\"2129\" data-end=\"2192\">\n<th data-start=\"2129\" data-end=\"2153\" data-col-size=\"sm\">Type<\/th>\n<th data-start=\"2153\" data-end=\"2192\" data-col-size=\"md\">Examples<\/th>\n<\/tr>\n<\/thead>\n<tbody data-start=\"2257\" data-end=\"2425\">\n<tr data-start=\"2257\" data-end=\"2338\">\n<td data-start=\"2257\" data-end=\"2281\" data-col-size=\"sm\"><strong data-start=\"2259\" data-end=\"2277\">Non-Preemptive<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"2281\" data-end=\"2338\">FCFS, SJF (non-preemptive), Priority (non-preemptive)<\/td>\n<\/tr>\n<tr data-start=\"2339\" data-end=\"2425\">\n<td data-start=\"2339\" data-end=\"2363\" data-col-size=\"sm\"><strong data-start=\"2341\" data-end=\"2355\">Preemptive<\/strong><\/td>\n<td data-start=\"2363\" data-end=\"2425\" data-col-size=\"md\">SRTF, Round Robin, Priority (preemptive), Multilevel Queue<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sticky end-(--thread-content-margin) h-0 self-end select-none\">\n<div class=\"absolute end-0 flex items-end\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<hr class=\"\" data-start=\"2427\" data-end=\"2430\" \/>\n<h3 class=\"\" data-start=\"2432\" data-end=\"2489\">\ud83d\udcd8 <strong data-start=\"2439\" data-end=\"2489\">5. Brief Intro to Common Scheduling Algorithms<\/strong><\/h3>\n<div class=\"_tableContainer_16hzy_1\">\n<div class=\"_tableWrapper_16hzy_14 group flex w-fit flex-col-reverse\">\n<table class=\"w-fit min-w-(--thread-content-width)\" data-start=\"2491\" data-end=\"3148\">\n<thead data-start=\"2491\" data-end=\"2584\">\n<tr data-start=\"2491\" data-end=\"2584\">\n<th data-start=\"2491\" data-end=\"2508\" data-col-size=\"sm\">Algorithm<\/th>\n<th data-start=\"2508\" data-end=\"2584\" data-col-size=\"md\">Key Idea<\/th>\n<\/tr>\n<\/thead>\n<tbody data-start=\"2679\" data-end=\"3148\">\n<tr data-start=\"2679\" data-end=\"2772\">\n<td data-start=\"2679\" data-end=\"2696\" data-col-size=\"sm\"><strong data-start=\"2681\" data-end=\"2689\">FCFS<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"2696\" data-end=\"2772\">First Come First Serve \u2013 easy but can cause <strong data-start=\"2742\" data-end=\"2759\">convoy effect<\/strong><\/td>\n<\/tr>\n<tr data-start=\"2773\" data-end=\"2866\">\n<td data-start=\"2773\" data-end=\"2790\" data-col-size=\"sm\"><strong data-start=\"2775\" data-end=\"2782\">SJF<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"2790\" data-end=\"2866\">Shortest Job First \u2013 optimal avg. waiting time, may cause <strong data-start=\"2850\" data-end=\"2864\">starvation<\/strong><\/td>\n<\/tr>\n<tr data-start=\"2867\" data-end=\"2960\">\n<td data-start=\"2867\" data-end=\"2884\" data-col-size=\"sm\"><strong data-start=\"2869\" data-end=\"2877\">SRTF<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"2884\" data-end=\"2960\">Preemptive version of SJF<\/td>\n<\/tr>\n<tr data-start=\"2961\" data-end=\"3054\">\n<td data-start=\"2961\" data-end=\"2978\" data-col-size=\"sm\"><strong data-start=\"2963\" data-end=\"2975\">Priority<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"2978\" data-end=\"3054\">Processes scheduled based on priority<\/td>\n<\/tr>\n<tr data-start=\"3055\" data-end=\"3148\">\n<td data-start=\"3055\" data-end=\"3072\" data-col-size=\"sm\"><strong data-start=\"3057\" data-end=\"3072\">Round Robin<\/strong><\/td>\n<td data-col-size=\"md\" data-start=\"3072\" data-end=\"3148\">Each process gets a <strong data-start=\"3094\" data-end=\"3110\">time quantum<\/strong> \u2013 good for <strong data-start=\"3122\" data-end=\"3146\">time-sharing systems<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sticky end-(--thread-content-margin) h-0 self-end select-none\">\n<div class=\"absolute end-0 flex items-end\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<hr class=\"\" data-start=\"3150\" data-end=\"3153\" \/>\n<h3 class=\"\" data-start=\"3155\" data-end=\"3188\">\ud83d\udcdd <strong data-start=\"3162\" data-end=\"3188\">GATE Question Examples<\/strong><\/h3>\n<p class=\"\" data-start=\"3190\" data-end=\"3283\"><strong data-start=\"3190\" data-end=\"3208\">Q (GATE 2017):<\/strong><br data-start=\"3208\" data-end=\"3211\" \/>Which of the following scheduling algorithms could result in starvation?<\/p>\n<p class=\"\" data-start=\"3285\" data-end=\"3365\"><strong data-start=\"3285\" data-end=\"3296\">Answer:<\/strong> SJF (non-preemptive) and Priority (if lower priority never gets CPU)<\/p>\n<hr class=\"\" data-start=\"3367\" data-end=\"3370\" \/>\n<h3 class=\"\" data-start=\"3372\" data-end=\"3402\">\ud83d\udd27 <strong data-start=\"3379\" data-end=\"3402\">Formula Quick Recap<\/strong><\/h3>\n<ul data-start=\"3404\" data-end=\"3558\">\n<li class=\"\" data-start=\"3404\" data-end=\"3466\">\n<p class=\"\" data-start=\"3406\" data-end=\"3466\"><strong data-start=\"3406\" data-end=\"3464\">Turnaround Time (TAT) = Completion Time \u2013 Arrival Time<\/strong><\/p>\n<\/li>\n<li class=\"\" data-start=\"3467\" data-end=\"3506\">\n<p class=\"\" data-start=\"3469\" data-end=\"3506\"><strong data-start=\"3469\" data-end=\"3504\">Waiting Time = TAT \u2013 Burst Time<\/strong><\/p>\n<\/li>\n<li class=\"\" data-start=\"3507\" data-end=\"3558\">\n<p class=\"\" data-start=\"3509\" data-end=\"3558\"><strong data-start=\"3509\" data-end=\"3558\">Response Time = First Response \u2013 Arrival Time<\/strong><\/p>\n<\/li>\n<\/ul>\n<hr class=\"\" data-start=\"3560\" data-end=\"3563\" \/>\n<h3 class=\"\" data-start=\"3565\" data-end=\"3608\">\ud83d\udcda Recommended for GATE CSE Preparation<\/h3>\n<ul data-start=\"3610\" data-end=\"3795\">\n<li class=\"\" data-start=\"3610\" data-end=\"3666\">\n<p class=\"\" data-start=\"3612\" data-end=\"3666\">Practice 10\u201315 scheduling problems with Gantt charts<\/p>\n<\/li>\n<li class=\"\" data-start=\"3667\" data-end=\"3740\">\n<p class=\"\" data-start=\"3669\" data-end=\"3740\">Focus on edge cases (e.g., same arrival time, preemption mid-process)<\/p>\n<\/li>\n<li class=\"\" data-start=\"3741\" data-end=\"3795\">\n<p class=\"\" data-start=\"3743\" data-end=\"3795\">Learn to compute average waiting and turnaround time<\/p>\n<\/li>\n<\/ul>\n<hr class=\"\" data-start=\"3797\" data-end=\"3800\" \/>\n<p class=\"\" data-start=\"3802\" data-end=\"3817\">Would you like:<\/p>\n<ul data-start=\"3819\" data-end=\"3930\">\n<li class=\"\" data-start=\"3819\" data-end=\"3860\">\n<p class=\"\" data-start=\"3821\" data-end=\"3860\">\ud83d\udcca Gantt Chart problems with solutions?<\/p>\n<\/li>\n<li class=\"\" data-start=\"3861\" data-end=\"3901\">\n<p class=\"\" data-start=\"3863\" data-end=\"3901\">\ud83c\udfa5 Video script\/slide for this lesson?<\/p>\n<\/li>\n<li class=\"\" data-start=\"3902\" data-end=\"3930\">\n<p class=\"\" data-start=\"3904\" data-end=\"3930\">\ud83e\udde9 Quiz on these concepts?<\/p>\n<\/li>\n<\/ul>\n<p class=\"\" data-start=\"3932\" data-end=\"3964\">Let me know and I\u2019ll prepare it!<\/p>\n<h3 data-start=\"3932\" data-end=\"3964\"><a href=\"https:\/\/www.vbspu.ac.in\/e-content\/Scheduling-Algorithm.pdf\" target=\"_blank\" rel=\"noopener\">Day 01Part 01- Operating System for gate Computer Science &#8211; Introduction to scheduling algorithm.<\/a><\/h3>\n<h3 class=\"LC20lb MBeuO DKV0Md\"><a href=\"https:\/\/www.pbsiddhartha.ac.in\/LMS\/eContent\/OS%201_merged.pdf\" target=\"_blank\" rel=\"noopener\">OPERATING SYSTEMS Unit \u2013 I 1.1 Introduction<\/a><\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Day 01Part 01- Operating System for gate Computer Science &#8211; Introduction to scheduling algorithm. [fvplayer id=&#8221;325&#8243;] Here\u2019s a clear and structured explanation for: \ud83e\udde0 Day 01 \u2013 Part 01: Operating System for GATE CSE \ud83c\udfaf Topic: Introduction to Scheduling Algorithms \ud83d\udccc 1. What is CPU Scheduling? CPU Scheduling is the process of selecting one process [&hellip;]<\/p>\n","protected":false},"author":66,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[],"class_list":["post-3266","post","type-post","status-publish","format-standard","hentry","category-operating-system"],"_links":{"self":[{"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/posts\/3266","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/users\/66"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/comments?post=3266"}],"version-history":[{"count":0,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/posts\/3266\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/media?parent=3266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/categories?post=3266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reilsolar.com\/pdf\/wp-json\/wp\/v2\/tags?post=3266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}