{"id":12539,"date":"2013-07-10T07:00:50","date_gmt":"2013-07-10T14:00:50","guid":{"rendered":"https:\/\/svapm.org\/?p=12539"},"modified":"2013-07-09T14:25:55","modified_gmt":"2013-07-09T21:25:55","slug":"whats-going-on-inside-my-computer","status":"publish","type":"post","link":"https:\/\/svapm.org\/?p=12539","title":{"rendered":"What\u2019s going on inside my computer?"},"content":{"rendered":"<p><strong>We all ask this question now and then<\/strong>, particularly when the computer or its application software is not working as it should.  Or at least when it\u2019s doing things we don\u2019t understand.<\/p>\n<p><strong>Our smartphones are no different \u2013 they are primarily computers<\/strong>, with some radio communications thrown in to connect them with the world.  Of course, those radios include 3G and 4G cell phone bands, WiFi and Bluetooth.<br \/>\n<a href=\"https:\/\/svapm.org\/wp-content\/uploads\/2013\/07\/1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/svapm.org\/wp-content\/uploads\/2013\/07\/1-300x224.jpg\" alt=\"IMG_0015\" width=\"300\" height=\"224\" class=\"aligncenter size-medium wp-image-12541\" srcset=\"https:\/\/svapm.org\/wp-content\/uploads\/2013\/07\/1-300x224.jpg 300w, https:\/\/svapm.org\/wp-content\/uploads\/2013\/07\/1.jpg 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<strong>Let\u2019s focus for a moment on what every computer has to deal with<\/strong> inside its \u201ckernel\u201d \u2013 the core of the operating system.  No matter what else is happening at the application level, here are some of the events and processes going on underneath the apps.<\/p>\n<p>1.\t<strong>Memory management<\/strong> \u2013 keeping track of who is using which parts of RAM and ROM (often Flash memory).  Not only is there constant competition among the applications for RAM space, the operating system itself has to allocate space for its own processes.  Furthermore, applications often are using more RAM space than is actually available in hardware.  How is this possible?  By using \u201cvirtual memory\u201d which means that some of the \u201cspace\u201d is actually on disk or in Flash or Solid-State Disk (SSD) memory.  Only the active \u201cpages\u201d of an application are actually in RAM, while others are \u201cpaged out\u201d to disk.<\/p>\n<p>2.\t<strong>Disk Input\/Output <\/strong>(I\/O) \u2013 whether it has a real spinning disk or an SSD, an operating system has to manage the traffic in and out.  Since it takes a lot longer to move data to and from disk that it does to compute anything, scheduling has to happen for multiple such transfers at the same time.  This means building queues of pending I\/O operations, dealing with retries if there are errors, and cleaning up the queues when they are finished.<\/p>\n<p>3.\t<strong>File System <\/strong>\u2013 on top of the disk I\/O, an operating system usually provides a file system.  This creates named collections of data, allocates space for them on disk, and keeps track of all the pieces of a file.  Sometimes it also manages redundant file information (such as RAID or block replication) to guard against data loss.<\/p>\n<p>4.\t<strong>Network protocols <\/strong>\u2013 there is a separate protocol for each network, such as GSM phone, CDMA phone, WiFi (to Internet), and Bluetooth.  Each protocol has multiple layers of interactions going on.  The system has to manage each layer by generating and responding to messages coming and going on the network.<\/p>\n<p>5.\t<strong>Error recovery<\/strong> \u2013 not all operations in the computer are successful.  Here are some of the ways they can fail.<\/p>\n<p>a.\t<strong>When a transmission over a radio link<\/strong> or a disk I\/O operation is initiated, there is always a timer set up that counts down and fires off an interrupt when it gets to zero.  The interrupt means that the operation has failed, because it didn\u2019t complete within the allotted time.<\/p>\n<p>b.\t<strong>There are other ways to fail, too.<\/strong>  Sometimes, a radio transmission will be garbled.  This gets detected when a checksum or other code check finds a mismatch in the message.  Then the recovery involves sending a reply message that says, \u201cI didn\u2019t get that last message.\u201d  And there are multiple layers of network protocol at which such messaging is being done.<\/p>\n<p>c.\t<strong>The hardware of the computer itself fails.<\/strong>  A bit gets dropped in the memory, or a bus from one part of the computer to another part loses a pulse and sends the wrong data.  This gets detected when the data is checked and found to be an impossible value (a value that is not normal).  In this case, the whole operation has be repeated, or else the program that was running and using this data has to be terminated.<\/p>\n<p>6.\t<strong>Power management<\/strong> \u2013 in addition to turning the system on and off, mobile systems, such as smartphones, are actively managing power to various subsystems so as to minimize the load on the battery.  Most systems also manage screen brightness (more in bright light, less in dim light) and disk spinning (turn off when not in use).<\/p>\n<p>7.\t<strong>User interactions<\/strong> \u2013 A user may be typing on a keyboard, moving a finger around on a touch screen, pressing buttons, and reading what is displayed on a screen.  There can also be other attachments, such as fingerprint readers or credit card readers, providing data to the system.  There is also sound output and voice input.  Determining what the user is asking the system to do may require sophisticated software, including motion detection on the touch screen and parsing the voice input.<\/p>\n<p><strong>To support application software, the system may include \u201cframeworks,\u201d<\/strong> such as a Java language framework, which is a collection of facilities that enable programs in Java to be run using a Java Virtual Machine.  And there may be other facilities provided by the system, such as an indexing and search capability for emails, calendar items, address book items, web pages, and files.  These require sophisticated data structures to be built and added to whenever a new item arrives in the system.<\/p>\n<p><strong>These are a sampling \u2013 but not all \u2013 of the activities and facilities <\/strong>in your system.  There may be hundreds of thousands of lines of code involved in them.  And someone \u2013 a team of someones \u2013 is maintaining that code as it evolves from generation to generation.  <\/p>\n<p><strong>Is it any wonder that software project management<\/strong> \u2013 and particularly software lifecycle management \u2013 is a critical part of a successful vendor\u2019s technology?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We all ask this question now and then, particularly when the computer or its application software is not working as [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"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-5)","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-5)","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-5)","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":[844,846,1],"tags":[1316,774,1317,1313,1312,1315,1223,1318,1314],"class_list":["post-12539","post","type-post","status-publish","format-standard","hentry","category-integration","category-scope-2","category-miscellaneous","tag-applications","tag-complexity","tag-frameworks","tag-kernel","tag-operating-systems","tag-protocols","tag-software","tag-software-lifecycle-management","tag-user-interaction"],"aioseo_notices":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/svapm.org\/index.php?rest_route=\/wp\/v2\/posts\/12539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/svapm.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/svapm.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/svapm.org\/index.php?rest_route=\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/svapm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12539"}],"version-history":[{"count":6,"href":"https:\/\/svapm.org\/index.php?rest_route=\/wp\/v2\/posts\/12539\/revisions"}],"predecessor-version":[{"id":12593,"href":"https:\/\/svapm.org\/index.php?rest_route=\/wp\/v2\/posts\/12539\/revisions\/12593"}],"wp:attachment":[{"href":"https:\/\/svapm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/svapm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/svapm.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}