<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abanoub Asaad</title>
    <description>The latest articles on DEV Community by Abanoub Asaad (@abanoub7asaad).</description>
    <link>https://dev.to/abanoub7asaad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F490605%2Ff167d73c-9ac0-49eb-966e-b252bd05f5ee.jpg</url>
      <title>DEV Community: Abanoub Asaad</title>
      <link>https://dev.to/abanoub7asaad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abanoub7asaad"/>
    <language>en</language>
    <item>
      <title>Top 7 LeetCode extensions</title>
      <dc:creator>Abanoub Asaad</dc:creator>
      <pubDate>Tue, 01 Feb 2022 20:09:43 +0000</pubDate>
      <link>https://dev.to/abanoub7asaad/top-7-leetcode-extensions-1odn</link>
      <guid>https://dev.to/abanoub7asaad/top-7-leetcode-extensions-1odn</guid>
      <description>&lt;p&gt;We all know that LeetCode is so useful for problem-solving or preparing for interviews, but you can do a few tweaks to make it more fun and useful while solving problems. Some of these extensions will help you increase your productivity, and some of them will help you to have good open-source contributions. So in this blog, I'll be talking about six useful leetcode extensions for browsers, and one more we can use with VS Code. &lt;strong&gt;Enjoy :)&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  1. &lt;a href="https://chrome.google.com/webstore/detail/leetcode-video-solutions/ilnmgkahgjdpkoliooildngldmilhelm?hl=en" rel="noopener noreferrer"&gt;LeetCode Video Solutions&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Through this extension, you will enjoy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Watching free helpful LeetCode video solutions on the problem page itself, the solutions are in different programming languages and cover different solving techniques and algorithms&lt;/li&gt;
&lt;li&gt;Not being distracted by watching cat videos on YouTube when you should be solving a LeetCode problem!&lt;/li&gt;
&lt;li&gt;Seeing the solution videos' duration, upload date, views, channel, and other information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 It's available for &lt;a href="https://chrome.google.com/webstore/detail/leetcode-video-solutions/ilnmgkahgjdpkoliooildngldmilhelm?hl=en" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt; and &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/leetcode-video-solutions/" rel="noopener noreferrer"&gt;Mozilla Firefox&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxjc69b9jua4wnp4na1cc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxjc69b9jua4wnp4na1cc.png" alt="Video Solutions Extension overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;a href="https://github.com/loveshdongre/leetcode-enhancer" rel="noopener noreferrer"&gt;LeetCode Enhancer&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This extension can boost your productivity by hiding unnecessary visual elements from the screen, enabling you to focus on what is important. You can change your preferences from the popup menu and find out what best suits your needs.&lt;/p&gt;

&lt;p&gt;It has the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hide problem difficulty &lt;/li&gt;
&lt;li&gt;Hide locked problems from the table&lt;/li&gt;
&lt;li&gt;Hide / Show any table column&lt;/li&gt;
&lt;li&gt;Highlight solved problems&lt;/li&gt;
&lt;li&gt;Hide solved problems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 It's available for &lt;a href="https://chrome.google.com/webstore/detail/leetcode-enhancer/gcmncppaaebldbkgkcbojghpmpjkdlmp" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt;, &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/leetcode-enhancer/" rel="noopener noreferrer"&gt;Mozilla Firefox&lt;/a&gt;, and &lt;a href="https://microsoftedge.microsoft.com/addons/detail/leetcode-enhancer/dgddijgkneackjhmijacbopefpladfia" rel="noopener noreferrer"&gt;Microsoft Edge&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnbiv8aogztyq8vck784r.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnbiv8aogztyq8vck784r.jpg" alt="LeetCode Enhancer overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;a href="https://github.com/QasimWani/LeetHub" rel="noopener noreferrer"&gt;LeetHub&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;With this extension, you can automatically integrate and push your Leetcode submissions to GitHub when you pass all tests on a Leetcode problem. &lt;/p&gt;

&lt;p&gt;This extension is beneficial because:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Recruiters want to see your contributions to the Open Source community, be it through side projects, solving data structures/algorithms, or contributing to existing OS projects&lt;/li&gt;
&lt;li&gt;It would be so easy to access your leetcode problems and solutions in one place, and you will not spend any time pushing your code to GitHub! &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🔗 It's available for &lt;a href="https://chrome.google.com/webstore/detail/leethub/aciombdipochlnkbpcbgdpjffcfdbggi?hl=en" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjudj7t3lwbw85fsvabpb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjudj7t3lwbw85fsvabpb.jpg" alt="LeetHub overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;a href="https://github.com/samarthtambad/leetcode-timer" rel="noopener noreferrer"&gt;Leetcode Timer&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Easily time your leetcode practice sessions with automatic time setting based on difficulty.&lt;/p&gt;

&lt;p&gt;It has the following features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set time for difficulty levels to increase your solving speed &lt;/li&gt;
&lt;li&gt;Automatically detects difficulty and sets the time accordingly&lt;/li&gt;
&lt;li&gt;Alert when time is over.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🔗 It's available for &lt;a href="https://chrome.google.com/webstore/detail/leetcode-timer/hihcjkhhlbmckhhnjamfomegbnlffcni?hl=en" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F860uocfq8cnes3n376kr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F860uocfq8cnes3n376kr.png" alt="Leetcode Timer overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;a href="https://chrome.google.com/webstore/detail/leetcode-timer/gfkgelnlcnomnahkfmhemgpahgmibofd?hl=en" rel="noopener noreferrer"&gt;LeetCode Timer&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Don't worry, I'm not repeating myself :) It's a different extension.&lt;/p&gt;

&lt;p&gt;It has the following features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Track time when solving problems on LeetCode&lt;/li&gt;
&lt;li&gt;Auto start timer functionality&lt;/li&gt;
&lt;li&gt;Automatically, pause timer on successful submission&lt;/li&gt;
&lt;li&gt;Hide acceptance rate and more other features.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 It's available for &lt;a href="https://chrome.google.com/webstore/detail/leetcode-timer/gfkgelnlcnomnahkfmhemgpahgmibofd?hl=en" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzyj3meia2ar28aemjue.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzyj3meia2ar28aemjue.jpg" alt="LeetCode Timer overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. &lt;a href="https://github.com/SysSn13/leetcode-rating-predictor" rel="noopener noreferrer"&gt;LC Predictor&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;This extension for &lt;strong&gt;predicting leetcode contest rating&lt;/strong&gt;. It shows approximate rating delta after contests on leetcode itself on the right side&lt;/li&gt;
&lt;li&gt;After participating in Leetcode contests, you wait too long for seeing your new rating. so this extension will be helpful here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 It's available for &lt;a href="https://chrome.google.com/webstore/detail/lc-predictor/jfhgaegpgiepniiebglgjhhfnjcibphh" rel="noopener noreferrer"&gt;Google Chrome&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65wiasbe9xp80ezrg9i2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65wiasbe9xp80ezrg9i2.png" alt="LeetCode Predictor overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. &lt;a href="https://marketplace.visualstudio.com/items?itemName=LeetCode.vscode-leetcode" rel="noopener noreferrer"&gt;LeetCode "VS Code extension"&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Solve LeetCode problems in VS Code&lt;/li&gt;
&lt;li&gt;Filter problems by company, difficulty, or topic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also watch &lt;a href="https://youtu.be/x69gw2v4m-g" rel="noopener noreferrer"&gt;this video&lt;/a&gt; to know how to install the extension.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg9idgtoj48lqw1nrz0cn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg9idgtoj48lqw1nrz0cn.gif" alt="LeetCode on VS Code demo"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this blog, I discussed some useful LeetCode extensions that I know. If you know any other useful extensions, it would be great to share them with us :)&lt;/p&gt;

&lt;p&gt;Which extension do you like more? Let me know!&lt;/p&gt;

&lt;h3&gt;
  
  
  Previous Articles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/abanoub7asaad/top-10-useful-github-browser-extensions-2k2d"&gt;Top 10 Useful GitHub Browser Extensions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/abanoub7asaad/shortest-way-to-find-a-buggy-commit-with-git-21md"&gt;Shortest way to find a buggy commit with Git&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>opensource</category>
      <category>100daysofcode</category>
    </item>
    <item>
      <title>Shortest way to find a buggy commit with Git</title>
      <dc:creator>Abanoub Asaad</dc:creator>
      <pubDate>Tue, 16 Nov 2021 14:23:37 +0000</pubDate>
      <link>https://dev.to/abanoub7asaad/shortest-way-to-find-a-buggy-commit-with-git-21md</link>
      <guid>https://dev.to/abanoub7asaad/shortest-way-to-find-a-buggy-commit-with-git-21md</guid>
      <description>&lt;p&gt;A couple of days ago, one of my colleagues at &lt;a href="https://robustastudio.com/" rel="noopener noreferrer"&gt;robusta&lt;/a&gt; recommended an interesting &lt;strong&gt;git command&lt;/strong&gt; to use, and it was my first time hearing about it. I started searching, and then I decided that I would write a summary about it.&lt;/p&gt;

&lt;p&gt;Have you ever been into a situation where you are writing your code, and you push commits after commits, and after a while, you go around your project and find a bug, Now this bug could happen anytime between your last commit and the last 1000 commits, so this makes it extremely hard to track down what happened and from where did you know the bug occurred? So instead of going one commit by one commit, which is time-consuming and will probably frustrate you because it's a &lt;a href="https://en.wikipedia.org/wiki/Linear_search" rel="noopener noreferrer"&gt;linear search&lt;/a&gt;, &lt;strong&gt;git bisect&lt;/strong&gt; will be your answer. &lt;/p&gt;

&lt;p&gt;In this blog, we will explore the &lt;code&gt;git bisect&lt;/code&gt; command, how it works, how to use it, and other useful commands to reduce your time of debugging and make you a Git Geek 😎&lt;/p&gt;




&lt;h2&gt;
  
  
  What is git bisect?
&lt;/h2&gt;

&lt;p&gt;git bisect is a way to use a &lt;a href="https://en.wikipedia.org/wiki/Binary_search_algorithm" rel="noopener noreferrer"&gt;binary search&lt;/a&gt; algorithm to find the commit that introduced a bug easily and quickly. It's a very useful command to help you in your process of tracing and debugging. Imagine you have N commits, by using this command, you will find the buggy commit in only log(N) steps! &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you know the &lt;strong&gt;Binary Search&lt;/strong&gt; concept, you can skip the next section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Quick overview about Binary Search
&lt;/h2&gt;

&lt;p&gt;Binary Search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item until you've narrowed down the possible locations to just one. &lt;/p&gt;

&lt;p&gt;The example below explains the concept of binary search, we need to find &lt;strong&gt;47&lt;/strong&gt; as fast as possible. We can achieve that by:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; Dividing the array into two parts, and now the mid is 14, so 14 &amp;lt; 47&lt;br&gt;
&lt;strong&gt;2.&lt;/strong&gt; I will divide the right part and the mid is 45, so 45 &amp;lt; 47&lt;br&gt;
&lt;strong&gt;3.&lt;/strong&gt; I will divide the right part again, and the mid will be 47, so 47 = 47.&lt;/p&gt;

&lt;p&gt;Now we found the desired number &lt;strong&gt;47&lt;/strong&gt; in only &lt;strong&gt;3&lt;/strong&gt; steps using a binary search.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzt489kpvzb3bbytslvbc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzt489kpvzb3bbytslvbc.gif" alt="Binary Search GIF"&gt;&lt;/a&gt;©️ GIF source: Brilliant.org&lt;/p&gt;

&lt;h2&gt;
  
  
  How git bisect works?
&lt;/h2&gt;

&lt;p&gt;After understanding the concept of binary search, &lt;code&gt;git bisect&lt;/code&gt; works in the same way. It allows you to use binary search to find buggy commits. Binary search makes finding things faster, instead of looking at all commits one by one, you would divide your list of commits into two equal parts, you then look at each part and see which part contains the bug, you then continue on this process until you arrive at a single commit. The below image explains that!&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrrwphsrijvtmojvo0lz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrrwphsrijvtmojvo0lz.png" alt="illustration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Scenario of git bisect
&lt;/h2&gt;

&lt;p&gt;Let's assume I have a website, and we released the second release yesterday. For example, a button on this website ran successfully in the first version 2 months ago, but it does not work now. And the history has about 300 commits, so how can I know the buggy commit quickly using git bisect?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; &lt;strong&gt;start&lt;/strong&gt; the git bisect session&lt;br&gt;
&lt;strong&gt;2.&lt;/strong&gt; mark a commit as &lt;strong&gt;bad&lt;/strong&gt; "for example, the current one" if this version is broken&lt;br&gt;
&lt;strong&gt;3.&lt;/strong&gt; mark a commit as &lt;strong&gt;good&lt;/strong&gt;, choose a commit that you know is working correctly and mark it as good&lt;br&gt;
&lt;strong&gt;4.&lt;/strong&gt; the git bisect will start to &lt;strong&gt;recommend commits&lt;/strong&gt; "according to the binary search algorithm", and you should mark them as good or bad by compiling the checked-out version and testing it. Until you find the specific commit which makes the bug to fix it in your current release&lt;br&gt;
&lt;strong&gt;5.&lt;/strong&gt; &lt;strong&gt;exit&lt;/strong&gt; from the git bisect tool and start to fix the bug.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The commands of these steps are below in the next two sections!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7jxz9mhuowcm74f3umuv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7jxz9mhuowcm74f3umuv.png" alt="git bisect sketch"&gt;&lt;/a&gt;©️ Image source: datree.io&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use git bisect?
&lt;/h2&gt;



&lt;h4&gt;
  
  
  ✶ Start the git bisect
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;$ git bisect start&lt;/code&gt;&lt;br&gt;
This starts the bisect process on our current commit which is "Head".&lt;/p&gt;

&lt;h4&gt;
  
  
  ✶ Let git bisect know about a bad commit
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;$ git bisect bad&lt;/code&gt;&lt;br&gt;
 The bug is present, so we need to designate it as a bad commit&lt;br&gt;
or you can type:&lt;br&gt;
&lt;code&gt;$ git bisect bad &amp;lt;commit_id&amp;gt;&lt;/code&gt;&lt;br&gt;
for example, the commit_id is &lt;em&gt;3acea60&lt;/em&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  ✶ Let git bisect know about a good commit
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;$ git bisect good &amp;lt;commit_id&amp;gt;&lt;/code&gt;&lt;br&gt;
If this commit is working correctly.&lt;/p&gt;

&lt;h4&gt;
  
  
  ✶ Exit the bisect tool
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;$ git bisect reset&lt;/code&gt;&lt;br&gt;
After a bisect session, clean up the bisection state and return to the original HEAD.&lt;/p&gt;

&lt;h4&gt;
  
  
  ✶ Automate the bisect tool
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;$ git bisect run&lt;/code&gt;&lt;br&gt;
If you want to automate the bisect tool, you can use the above command and also read the official &lt;a href="https://git-scm.com/docs/git-bisect" rel="noopener noreferrer"&gt;docs&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PS: I know how to use it manually, not automatically😅&lt;/p&gt;
&lt;/blockquote&gt;



&lt;h2&gt;
  
  
  7 Awesome debugging git commands
&lt;/h2&gt;



&lt;h3&gt;
  
  
  1️⃣ git blame
&lt;/h3&gt;

&lt;p&gt;If you need to examine the content of any file line by line, you need to use git blame. It helps you to determine who made the changes to a file.&lt;br&gt;
&lt;code&gt;$ git blame &amp;lt;your_file_name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2️⃣ git reset
&lt;/h3&gt;

&lt;p&gt;If you want to reset the current HEAD to a specified state or commit.&lt;br&gt;
&lt;code&gt;$ git reset --hard &amp;lt;commit_id&amp;gt;&lt;/code&gt;&lt;br&gt;
 To push these changes, you should force them by using:&lt;br&gt;
&lt;code&gt;$ git push -f&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3️⃣ git log
&lt;/h3&gt;

&lt;p&gt;To show commit logs in detail or in an organized way.&lt;br&gt;
&lt;code&gt;$ git log&lt;/code&gt;&lt;br&gt;
or&lt;br&gt;
&lt;code&gt;$ git log --oneline&lt;/code&gt;&lt;br&gt;
or&lt;br&gt;
&lt;code&gt;$ git whatchanged&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4️⃣ git checkout
&lt;/h3&gt;

&lt;p&gt;To restore a specific commit or switch to another branch&lt;br&gt;
&lt;code&gt;$ git checkout &amp;lt;commit_id&amp;gt;&lt;/code&gt;&lt;br&gt;
or&lt;br&gt;
&lt;code&gt;$ git checkout &amp;lt;branch_name&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5️⃣ git show
&lt;/h3&gt;

&lt;p&gt;To see what's actually changed in a specific commit.&lt;br&gt;
&lt;code&gt;$ git show &amp;lt;commit_id&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6️⃣ git citool
&lt;/h3&gt;

&lt;p&gt;It is a graphics alternative of &lt;code&gt;git commit&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;$ git citool&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7️⃣ git help
&lt;/h3&gt;

&lt;p&gt;There are many commands in Git, and if you need more help with any command, you can use git help at any time from the terminal. &lt;br&gt;
&lt;code&gt;$ git help&lt;/code&gt;&lt;br&gt;
or&lt;br&gt;
&lt;code&gt;$ git help &amp;lt;git_command&amp;gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I tried to tell you about this useful command "git bisect" and also some other important git commands to help you to reduce debugging time. If you know any other ways to make the debugging process faster, it would be great to share them with us :)&lt;/p&gt;

&lt;h3&gt;
  
  
  Previous Articles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/abanoub7asaad/top-10-useful-github-browser-extensions-2k2d"&gt;Top 10 Useful GitHub Browser Extensions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/abanoub7asaad/operating-systems-concepts-ch-3-part-1-processes-1lcj"&gt;Operating Systems Concepts: Processes&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>opensource</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Operating Systems Concepts: Processes</title>
      <dc:creator>Abanoub Asaad</dc:creator>
      <pubDate>Sat, 31 Jul 2021 23:10:14 +0000</pubDate>
      <link>https://dev.to/abanoub7asaad/operating-systems-concepts-ch-3-part-1-processes-1lcj</link>
      <guid>https://dev.to/abanoub7asaad/operating-systems-concepts-ch-3-part-1-processes-1lcj</guid>
      <description>&lt;p&gt;A couple of weeks ago I came across a very interesting book titled &lt;a href="https://www.amazon.com/Operating-System-Concepts-Abraham-Silberschatz-ebook/dp/B07CVKH7BD" rel="noopener noreferrer"&gt;Operating Systems Concepts&lt;/a&gt; or "the dinosaur book" by &lt;strong&gt;Abraham Silberschatz&lt;/strong&gt;, &lt;strong&gt;Greg Gagne&lt;/strong&gt; and &lt;strong&gt;Peter B. Galvin&lt;/strong&gt;, which has a very good reputation, and it's one of the best operating system textbooks. The book discusses a number of different concepts related to Processes, Threads, CPU Scheduling, Deadlocks, Memory, Storage, File-Systems, Security and more.&lt;/p&gt;

&lt;p&gt;One of my friends on Twitter recommended it to me a few days ago, so I said that it's a good time to start reading it!&lt;/p&gt;

&lt;p&gt;I started reading, and then I decided that it would be better to write a form of summaries or personal notes, so to speak based on the book, I'll start summarizing from chapter 3 because the first two chapters are talking about an introduction to the operating systems and its structure. So without further ado, let's Get Started!&lt;/p&gt;




&lt;h1&gt;
  
  
  ✍ Processes
&lt;/h1&gt;

&lt;p&gt;Early computers allowed only one program to be executed at a time. This program had complete control of the system and had access to all the &lt;a href="https://en.m.wikipedia.org/wiki/System_resource" rel="noopener noreferrer"&gt;system’s resources&lt;/a&gt;. In contrast, contemporary computer systems allow multiple programs to be loaded into memory and executed concurrently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The process&lt;/strong&gt; is a program in execution and the unit of work in a modern computing system. Although its main concern is the execution of user programs, it also needs to take care of various system tasks that are best done in &lt;a href="https://en.wikipedia.org/wiki/User_space" rel="noopener noreferrer"&gt;user space&lt;/a&gt;, rather than within the kernel space.&lt;/p&gt;

&lt;h1&gt;
  
  
  📌 Process Concept
&lt;/h1&gt;

&lt;p&gt;When we read about &lt;strong&gt;processes&lt;/strong&gt;, we may face some other terminologies like &lt;strong&gt;job&lt;/strong&gt; or &lt;strong&gt;task&lt;/strong&gt;, they can be all considered the same thing, it really depends on the context. A &lt;a href="https://en.wikipedia.org/wiki/Job_(computing)" rel="noopener noreferrer"&gt;“job”&lt;/a&gt; often means a set of processes, while a &lt;a href="https://en.wikipedia.org/wiki/Task_(computing)" rel="noopener noreferrer"&gt;“task”&lt;/a&gt; is often a part of a job – sometimes the only part.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧱 Memory layout of a process
&lt;/h2&gt;

&lt;p&gt;It's typically divided into multiple sections, these sections include:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vmh3af0dg5981rj5c4x.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vmh3af0dg5981rj5c4x.jpg" alt="A process in memory"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Text section&lt;/strong&gt;: the executable code, this is read-only and might be shared by a number of processes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data section&lt;/strong&gt;: containing global variables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Heap section&lt;/strong&gt;: containing memory dynamically allocated during the program run time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stack section&lt;/strong&gt;: containing temporary data
(such as function parameters, return addresses, and local variables)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Memory layout of a &lt;em&gt;C&lt;/em&gt; program:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0b98px5p2nzv4de0roha.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0b98px5p2nzv4de0roha.png" alt="code+memory"&gt;&lt;/a&gt;&lt;br&gt;
Notice that the sizes of the &lt;strong&gt;text&lt;/strong&gt; and &lt;strong&gt;data&lt;/strong&gt; sections are fixed, as their sizes do not change during program run time. However, the &lt;strong&gt;stack&lt;/strong&gt; and &lt;strong&gt;heap&lt;/strong&gt; sections can shrink and grow dynamically during program execution, for example, in case of sending parameters or returning from a function.&lt;/p&gt;
&lt;h2&gt;
  
  
  🆚 Program Vs. Process
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A program&lt;/strong&gt; is a passive entity, such as a file containing a list of instructions stored on disk
(often called an executable file). &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A process&lt;/strong&gt; is an active entity, with a program counter specifying the next instruction to execute and a set of associated resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A program becomes a process when an executable file is loaded into memory.&lt;/p&gt;
&lt;h2&gt;
  
  
  ⚙️ Process State
&lt;/h2&gt;

&lt;p&gt;The state of a process is defined in part by the current activity of that process. A process may be in one of the following states:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvf39iuzkb011oq8e6dkb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvf39iuzkb011oq8e6dkb.jpg" alt="process state"&gt;&lt;/a&gt; &lt;br&gt;
• &lt;strong&gt;New&lt;/strong&gt;: the process is being created&lt;br&gt;
• &lt;strong&gt;Running&lt;/strong&gt;: instructions are being executed&lt;br&gt;
• &lt;strong&gt;Waiting&lt;/strong&gt;: the process is waiting for some event to occur (such as an I/O completion or reception of a signal)&lt;br&gt;
• &lt;strong&gt;Ready&lt;/strong&gt;: the process is waiting to be assigned to a processor&lt;br&gt;
• &lt;strong&gt;Terminated&lt;/strong&gt;: the process has finished execution.&lt;/p&gt;
&lt;h2&gt;
  
  
  📦 Process Control Block
&lt;/h2&gt;

&lt;p&gt;For each process there is a Process Control Block(PCB) – also called a &lt;strong&gt;task control block&lt;/strong&gt;, which stores the following process-specific information:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhwx0s2a045tyixp5cu2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjhwx0s2a045tyixp5cu2.jpg" alt="Process Control Block"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Process State&lt;/strong&gt; – running, waiting, etc., as discussed above&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Process Number "PID"&lt;/strong&gt; – is a number used by most operating system kernels to uniquely identify an active process&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Program counter&lt;/strong&gt; – the counter indicates the address of the next instruction to be executed for this process&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU Registers&lt;/strong&gt; – tell us the particular registers that are being used by a particular process&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU-Scheduling information&lt;/strong&gt; – this information includes a process priority, pointers to scheduling queues, and any other scheduling parameters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory-Management information&lt;/strong&gt; – e.g., page tables or segment tables, depending on the memory system used by the operating
system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accounting information&lt;/strong&gt; – they are the resources that are used by a specific process e.g., the amount of CPU and real time used, time limits, account numbers, job or process numbers, and so on&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I/O Status information&lt;/strong&gt; - e.g., a list of I/O devices allocated to the process, a list of open files, and so on.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  🐧 Process Representation in Linux
&lt;/h2&gt;

&lt;p&gt;The process control block in the Linux operating system is represented by the C structure &lt;code&gt;task_struct&lt;/code&gt;, which is found in the &lt;a href="https://github.com/torvalds/linux" rel="noopener noreferrer"&gt;Linux&lt;/a&gt; repository through this path &lt;a href="https://github.com/torvalds/linux/blob/master/include/linux/sched.h" rel="noopener noreferrer"&gt;include/linux/sched.h&lt;/a&gt; The following structure contains all the necessary information for representing a process.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;long&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* state of the process */&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;sched_entity&lt;/span&gt; &lt;span class="n"&gt;se&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* scheduling information */&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;task_struct&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* this process’s parent */&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;list_head&lt;/span&gt; &lt;span class="n"&gt;children&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* this process’s children */&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;files_struct&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* list of open files */&lt;/span&gt;
&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;mm_struct&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;mm&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cm"&gt;/* address space */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Within the Linux kernel, all active processes are represented&lt;br&gt;
using a &lt;code&gt;doubly linked list&lt;/code&gt; of &lt;em&gt;task_struct&lt;/em&gt;. The kernel maintains a pointer &lt;code&gt;current&lt;/code&gt; to the process currently executing on the system, as shown below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5h22cjy6arvhpzk3i1a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc5h22cjy6arvhpzk3i1a.png" alt="Process as a linkedlist"&gt;&lt;/a&gt; &lt;br&gt;
If &lt;code&gt;current&lt;/code&gt; is a pointer to the process currently executing, its state is changed with the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  📌 Process Scheduling
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;The objective of &lt;strong&gt;multiprogramming&lt;/strong&gt; is to have some processes running at all times, to maximize CPU utilization&lt;/li&gt;
&lt;li&gt;The objective of &lt;strong&gt;time sharing&lt;/strong&gt; is to switch the CPU among processes so frequently that users can interact with each program while it is running&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To meet these objectives, the process scheduler selects an available process (possibly from a set of several available processes) for program execution on the CPU.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each CPU core can run one process at a time&lt;/li&gt;
&lt;li&gt;If there are more processes, the rest will have to wait until the CPU is free and can be rescheduled.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📅 Scheduling Queues
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Job Queue&lt;/strong&gt; – As processes enter the system, they are put into a &lt;em&gt;job queue&lt;/em&gt;, which consists of all processes in the system&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ready Queue&lt;/strong&gt; – The processes that are residing in main memory and are ready and waiting to execute are kept on a list called &lt;em&gt;ready queue&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Device Queue&lt;/strong&gt; – Processes waiting for a device to become available or to deliver data are placed in &lt;em&gt;device queues&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frabscl3imhfj37frnogj.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frabscl3imhfj37frnogj.jpg" alt="Queueing-diagram representation of process scheduling"&gt;&lt;/a&gt;&lt;br&gt;
The above figure is a Queueing-diagram representation of process scheduling.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔄 Process Swapping
&lt;/h2&gt;

&lt;p&gt;Some operating systems have an intermediate form of scheduling, known as &lt;strong&gt;swapping&lt;/strong&gt;, whose key idea is to remove a process from the memory or loading the process again from disk back to memory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Far4x8vsertq1af8483cu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Far4x8vsertq1af8483cu.jpg" alt="Scheduling"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔗 Context Switch
&lt;/h2&gt;

&lt;p&gt;When an interrupt occurs, the system needs to &lt;strong&gt;save&lt;/strong&gt; the current &lt;strong&gt;context&lt;/strong&gt; of the process currently running on the CPU so that it can &lt;strong&gt;restore&lt;/strong&gt; that context when its processing is done, essentially suspending the process and then resuming it, this process is known as a &lt;code&gt;context switch&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Interrupts cause the operating system to change a CPU from its current task "process" to run a kernel routine&lt;/li&gt;
&lt;li&gt;Such operations happen frequently on general-purpose systems&lt;/li&gt;
&lt;li&gt;The context is represented in the PCP &lt;code&gt;Process Control Block&lt;/code&gt; of the process&lt;/li&gt;
&lt;li&gt;Context Switch time is an overhead because the system does no useful work while switching&lt;/li&gt;
&lt;li&gt;Its speed varies from machine to machine, depending on the memory speed, the number of registers that must be copied, and the existence of special instructions (such as a single instruction to load or store all registers).
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb26t24g4pnpwgk4kvoce.jpg" alt="Context Switch"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📱 Multitasking In Mobile Systems (Android)
&lt;/h2&gt;

&lt;p&gt;Since its origins, &lt;strong&gt;Android&lt;/strong&gt; has supported &lt;strong&gt;multitasking&lt;/strong&gt; and does not place constraints on the types of applications that can run in the background. If an application requires processing while in the background, the application must use a &lt;strong&gt;service&lt;/strong&gt;, a separate application component that runs on behalf of the background process.&lt;/p&gt;

&lt;p&gt;Consider a streaming audio application: if the application moves to the background, the service continues to send audio data to the audio device driver on behalf of the background application. In fact, the service will continue to run even if the background application is suspended. Services do not have a user interface and have a small memory footprint, thus providing an efficient technique for multitasking in a mobile environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article, we summarized chapter 3 – part 1, and talked about Process Concept, The memory layout of a process, Process State, PCB, Process Scheduling, Context Switch, and Multitasking in mobile systems. See you soon in the next article, and I will be talking about part 2 of chapter 3.&lt;/p&gt;

&lt;h2&gt;
  
  
  Previous Articles
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/abanoub7asaad/top-10-useful-github-browser-extensions-2k2d"&gt;Top 10 Useful GitHub Browser Extensions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>computerscience</category>
      <category>linux</category>
      <category>systems</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Top 10 Useful GitHub Browser Extensions</title>
      <dc:creator>Abanoub Asaad</dc:creator>
      <pubDate>Thu, 24 Jun 2021 12:05:59 +0000</pubDate>
      <link>https://dev.to/abanoub7asaad/top-10-useful-github-browser-extensions-2k2d</link>
      <guid>https://dev.to/abanoub7asaad/top-10-useful-github-browser-extensions-2k2d</guid>
      <description>&lt;p&gt;There are many types of addiction, but addiction to GitHub is a unique and interesting one. Although GitHub is a great tool for developers, using extensions to increase your productivity is greater. Let's get started with the extensions that I'm using.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. &lt;a href="https://github.com/buunguyen/octotree" rel="noopener noreferrer"&gt;Octotree&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It shows a side panel to enhance code review and exploration. Here, it is easy to navigate between the files and folders of the repository. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fghqz5xcy6x8mjtnnfgc8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fghqz5xcy6x8mjtnnfgc8.png" alt="Octotree extension"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;a href="https://github.com/softvar/enhanced-github" rel="noopener noreferrer"&gt;Enhanced GitHub&lt;/a&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It displays : 

&lt;ul&gt;
&lt;li&gt;The whole repository size and each file size&lt;/li&gt;
&lt;li&gt;Download link&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18s5fy33pnoyte4az807.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F18s5fy33pnoyte4az807.png" alt="Enhanced GitHub screenshot0"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can copy file content directly to the clipboard.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Focjsjbccv0eqzdqdjpds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Focjsjbccv0eqzdqdjpds.png" alt="Enhanced GitHub screenshot1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;a href="https://github.com/noam3127/github-code-folding" rel="noopener noreferrer"&gt;GitHub Code Folding&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It enables code folding in GitHub.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhfllo0o7imcppg8ib6m8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhfllo0o7imcppg8ib6m8.png" alt="Code Folding extension screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;a href="https://github.com/sourcegraph/sourcegraph/tree/main/client/browser" rel="noopener noreferrer"&gt;Sourcegraph&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It makes you go to definition &amp;amp; find references (currently for Go, Java, TypeScript, JavaScript, and Python).&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstxqsw1tmc26kyic8523.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fstxqsw1tmc26kyic8523.png" alt="Sourcegraph extension screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;a href="https://github.com/tanmayrajani/notifications-preview-github" rel="noopener noreferrer"&gt;Notifications Preview for GitHub&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This extension makes you : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show the count of notifications on the bell icon &lt;/li&gt;
&lt;li&gt;Preview the unread notifications using pop-overs on hover&lt;/li&gt;
&lt;li&gt;Allow to perform actions like marking as read and unsubscribing on the notifications.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9czthe3mpijhy74249zt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9czthe3mpijhy74249zt.png" alt="Notification extension screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. &lt;a href="https://github.com/homerchen19/github-file-icons" rel="noopener noreferrer"&gt;File Icons for GitHub and GitLab&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It gives you different file icons in GitHub or GitLab.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7r3d7lrb14ipt7maikk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr7r3d7lrb14ipt7maikk.jpg" alt="File Icons screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  7. &lt;a href="https://github.com/OctoLinker/OctoLinker" rel="noopener noreferrer"&gt;OctoLinker&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It makes navigating through the code more efficient by turning language-specific statements like &lt;code&gt;include&lt;/code&gt;, &lt;code&gt;require&lt;/code&gt; or &lt;code&gt;import&lt;/code&gt; into clickable links.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdqcz54vfkezo7vp11rw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcdqcz54vfkezo7vp11rw.png" alt="OctoLinker extension screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  8. &lt;a href="https://github.com/jasonlong/isometric-contributions" rel="noopener noreferrer"&gt;GitHub Isometric Contributions&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It allows you to toggle between the normal GitHub contribution chart and an isometric pixel art version.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;2D Chart&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffv8hmghwl2ehui57ce4k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffv8hmghwl2ehui57ce4k.png" alt="normal chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;3D Chart&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpdg4f7dcmbn5dewlibbx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpdg4f7dcmbn5dewlibbx.png" alt="3D chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. &lt;a href="https://github.com/N1ck/gifs-for-github" rel="noopener noreferrer"&gt;GIFs for GitHub&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;It makes it easier to search GIPHY and add a GIF into any GitHub comment box.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkfpjwt9c3s7re5fra0im.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkfpjwt9c3s7re5fra0im.png" alt="GIFs extension screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  10. &lt;a href="https://github.com/sindresorhus/refined-github" rel="noopener noreferrer"&gt;Refined GitHub&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This extension has a lot of features like :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Making whitespace characters visible
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl4d0eu4g5i4ainzmy9li.png" alt="white space"&gt;
&lt;/li&gt;
&lt;li&gt;Adding one-click merge conflict fixers
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flym459mhu4w8nwmtbcmj.png" alt="one-click merge conflict"&gt;
&lt;/li&gt;
&lt;li&gt;Adding reaction avatars showing who reacted to a comment
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyg7c8g553ebzs88qh4tw.png" alt="reaction avatars"&gt;
&lt;/li&gt;
&lt;li&gt;Letting you hide every event except comments or unresolved comments in issues and PRs
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdi2zrcat9ll1jyk5515i.png" alt="hide every event"&gt;
&lt;/li&gt;
&lt;li&gt;Linking issue/PR references and URLs in code and conversation titles
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiu3xal1ov47yxv3e7f11.png" alt="Linkifing issue/PR references and URLs"&gt;
&lt;/li&gt;
&lt;li&gt;Adding the option to wait for checks when merging a PR&lt;/li&gt;
&lt;li&gt;Adding a button to revert all the changes to a file in a PR.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I tried to show some useful GitHub extensions that I know. There are a lot of other extensions you can use to enhance your experience.  If you want to explore other awesome GitHub extensions, you can check this &lt;a href="https://project-awesome.org/stefanbuck/awesome-browser-extensions-for-github" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Which GitHub extension do you like more? Let me know!&lt;/p&gt;

</description>
      <category>github</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
