{"id":23573,"date":"2023-04-21T03:14:31","date_gmt":"2023-04-21T03:14:31","guid":{"rendered":"https:\/\/www.booksofall.com\/es\/?post_type=product&#038;p=23573"},"modified":"2023-04-21T03:14:31","modified_gmt":"2023-04-21T03:14:31","slug":"think-os-a-brief-introduction-to-operating-systems","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/","title":{"rendered":"Think OS &#8211; A Brief Introduction to Operating Systems"},"content":{"rendered":"<h2>Chapter 1 &#8211; Compilation<\/h2>\n<h4>1.1 Compiled and interpreted languages<\/h4>\n<p>People often describe programming languages as either compiled or interpreted. \u201cCompiled\u201d means that programs are translated into machine language and then executed by hardware; \u201cinterpreted\u201d means that programs are read and executed by a software interpreter. Usually C is considered a compiled language and <a href=\"https:\/\/www.python.org\/\">Python<\/a> is considered an interpreted language. But the distinction is not always clear-cut.<\/p>\n<p>First, many languages can be either compiled or interpreted. For example, there are C <a href=\"https:\/\/en.wikipedia.org\/wiki\/Interpreter_(computing)\">interpreters<\/a> and Python compilers. Second, there are languages like Java that use a hybrid approach, compiling programs into an intermediate language and then running the translated program in an interpreter. Java uses an intermediate language called Java bytecode, which is similar to machine language, but it is executed by a software interpreter, the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Java_virtual_machine\">Java virtual machine (JVM)<\/a>.<\/p>\n<p>So being compiled or interpreted is not an intrinsic characteristic of a language; nevertheless, there are some general differences between compiled and interpreted languages.<\/p>\n<h4>1.2 Static types<\/h4>\n<p>Many interpreted languages support dynamic types, but compiled languages are usually limited to static types. In a statically-typed language, you can tell<\/p>\n<p>by looking at the program what type each variable refers to. In a dynamically-typed language, you don\u2019t always know the type of a variable until the program is running. In general, static refers to things that happen at compile time (while a program is being compiled), and dynamic refers to things that happen at run time (while a program is running).<\/p>\n<p>For example, in Python you can write a function like this:<\/p>\n<p>def add(x, y):<br \/>\nreturn x + y<\/p>\n<p>Looking at this code, you can\u2019t tell what type x and y will refer to at run time. This function might be called several times, each time with values with different types. Any values that support the addition operator will work; any other types will cause an exception or runtime error.<\/p>\n<p>In C you would write the same function like this:<\/p>\n<p>int add(int x, int y) {<br \/>\nreturn x + y;<br \/>\n}<\/p>\n<p>The first line of the function includes type declarations for the parameters and the return value: x and y are declared to be integers, which means that we can check at compile time whether the addition operator is legal for this type (it is). The return value is also declared to be an integer.<\/p>\n<p>Because of these declarations, when this function is called elsewhere in the program, the compiler can check whether the arguments provided have the right type, and whether the return value is used correctly.<\/p>\n<p>These checks happen before the program starts executing, so errors can be found earlier. More importantly, errors can be found in parts of the program that have never run. Furthermore, these checks don\u2019t have to happen at run time, which is one of the reasons compiled languages generally run faster than interpreted languages.<\/p>\n<p>Declaring types at compile time also saves space. In dynamic languages, variable names are stored in memory while the program runs, and they are of ten accessible by the program. For example, in Python the <a href=\"https:\/\/docs.python.org\/3\/library\/functions.html\">built-in function<\/a> locals returns a dictionary that contains variable names and their values. Here\u2019s an example in a Python interpreter:<\/p>\n<blockquote><p>&gt; x = 5<br \/>\n&gt;&gt;&gt; print locals()<br \/>\n{&#8216;x&#8217;: 5, &#8216;__builtins__&#8217;: &lt;module &#8216;__builtin__&#8217; (built-in)&gt;, &#8216;__name__&#8217;: &#8216;__main__&#8217;, &#8216;__doc__&#8217;: None, &#8216;__package__&#8217;: None}<\/p><\/blockquote>\n<p>This shows that the name of the variable is stored in memory while the program is running (along with some other values that are part of the default runtime environment).<\/p>\n<p>In c<a href=\"https:\/\/en.wikipedia.org\/wiki\/Compiled_language\">ompiled languages<\/a>, variable names exist at compile-time but not at run time. The compiler chooses a location for each variable and records these locations as part of the compiled program. The location of a variable is called its address. At run time, the value of each variable is stored at its address, but the names of the variables are not stored at all (unless they are added by the compiler for purposes of debugging).<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 750px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/think-os-a-brief-introduction-to-operating-systems-1bs0xcld5d?p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":23577,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Operating Systems is a big subject, including different areas, such as compilation, processes, virtual memory, etc. Learn more in this book now!"},"product_brand":[],"product_cat":[270],"product_tag":[],"class_list":{"0":"post-23573","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-operating-systems","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Think OS - A Brief Introduction to Operating Systems - BooksOfAll Spanish<\/title>\n<meta name=\"description\" content=\"Operating Systems is a big subject, including different areas, such as compilation, processes, virtual memory, etc. Learn more in this book now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Think OS - A Brief Introduction to Operating Systems - BooksOfAll Spanish\" \/>\n<meta property=\"og:description\" content=\"Operating Systems is a big subject, including different areas, such as compilation, processes, virtual memory, etc. Learn more in this book now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Spanish\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/\",\"url\":\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/\",\"name\":\"Think OS - A Brief Introduction to Operating Systems - BooksOfAll Spanish\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/es\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg\",\"datePublished\":\"2023-04-21T03:14:31+00:00\",\"description\":\"Operating Systems is a big subject, including different areas, such as compilation, processes, virtual memory, etc. Learn more in this book now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg\",\"contentUrl\":\"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg\",\"width\":\"828\",\"height\":\"1170\",\"caption\":\"Think OS - A Brief Introduction to Operating Systems\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/es\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/es\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Think OS &#8211; A Brief Introduction to Operating Systems\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/es\/#website\",\"url\":\"https:\/\/www.booksofall.com\/es\/\",\"name\":\"BooksOfAll Spanish\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/es\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/es\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/es\/#organization\",\"name\":\"BooksOfAll Spanish\",\"url\":\"https:\/\/www.booksofall.com\/es\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.booksofall.com\/es\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Spanish\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/es\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Think OS - A Brief Introduction to Operating Systems - BooksOfAll Spanish","description":"Operating Systems is a big subject, including different areas, such as compilation, processes, virtual memory, etc. Learn more in this book now!","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:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/","og_locale":"es_ES","og_type":"article","og_title":"Think OS - A Brief Introduction to Operating Systems - BooksOfAll Spanish","og_description":"Operating Systems is a big subject, including different areas, such as compilation, processes, virtual memory, etc. Learn more in this book now!","og_url":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/","og_site_name":"BooksOfAll Spanish","og_image":[{"url":"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg","twitter_misc":{"Tiempo de lectura":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/","url":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/","name":"Think OS - A Brief Introduction to Operating Systems - BooksOfAll Spanish","isPartOf":{"@id":"https:\/\/www.booksofall.com\/es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg","datePublished":"2023-04-21T03:14:31+00:00","description":"Operating Systems is a big subject, including different areas, such as compilation, processes, virtual memory, etc. Learn more in this book now!","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#primaryimage","url":"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg","contentUrl":"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2023\/04\/Think-OS.jpg","width":"828","height":"1170","caption":"Think OS - A Brief Introduction to Operating Systems"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/es\/think-os-a-brief-introduction-to-operating-systems\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/es\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/es\/categories\/"},{"@type":"ListItem","position":3,"name":"Think OS &#8211; A Brief Introduction to Operating Systems"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/es\/#website","url":"https:\/\/www.booksofall.com\/es\/","name":"BooksOfAll Spanish","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/es\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/es\/#organization","name":"BooksOfAll Spanish","url":"https:\/\/www.booksofall.com\/es\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.booksofall.com\/es\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/es\/wp-content\/uploads\/sites\/5\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Spanish"},"image":{"@id":"https:\/\/www.booksofall.com\/es\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/es\/wp-json\/wp\/v2\/product\/23573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/es\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/es\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/es\/wp-json\/wp\/v2\/media\/23577"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/es\/wp-json\/wp\/v2\/media?parent=23573"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/es\/wp-json\/wp\/v2\/product_brand?post=23573"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/es\/wp-json\/wp\/v2\/product_cat?post=23573"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/es\/wp-json\/wp\/v2\/product_tag?post=23573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}