{"id":23578,"date":"2023-04-21T03:39:39","date_gmt":"2023-04-21T03:39:39","guid":{"rendered":"https:\/\/www.booksofall.com\/vi\/?post_type=product&#038;p=23578"},"modified":"2023-04-21T03:46:16","modified_gmt":"2023-04-21T03:46:16","slug":"computer-science-from-the-bottom-up","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/","title":{"rendered":"Computer Science from the Bottom Up"},"content":{"rendered":"<h2>Chapter 1 &#8211; General Unix and Advanced C<\/h2>\n<h4><i>1 Everything is a file! <\/i><\/h4>\n<p>An often-quoted tenet of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Unix-like\">UNIX-like<\/a> systems such as <a href=\"https:\/\/www.kernel.org\/\">Linux<\/a> or <a href=\"https:\/\/en.wikipedia.org\/wiki\/Berkeley_Software_Distribution\">BSD<\/a> is\u00a0<i>everything is a file.\u00a0<\/i>Imagine a file in the context of something familiar like a word processor. There are two fundamental operations we could use on this imaginary word processing file:<\/p>\n<ol>\n<li>Read it (existing saved data from the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Word_processor\">word processor<\/a>).<\/li>\n<li>Write to it (new data from the user).<\/li>\n<\/ol>\n<p>Consider some of the common things attached to a computer and how they relate to our fundamental file operations:<\/p>\n<ol>\n<li>The screen<\/li>\n<li>The keyboard<\/li>\n<li>A printer<\/li>\n<li>A CD-ROM<\/li>\n<\/ol>\n<p>The screen and printer are both like a write-only file, but instead of being stored as bits on a disk the information is displayed as dots on a screen or lines on a page. The keyboard is like a read only file, with the data coming from keystrokes provided by the user. The CD-ROM is similar, but rather than randomly coming from the user the data is stored directly on the disk.<\/p>\n<p>Thus the concept of a file is a good\u00a0<i>abstraction\u00a0<\/i>of either a sink for, or source of, data. As such it is an excellent abstraction of all the devices one might attach to the computer. This realisation is the great power of UNIX and is evident across the design of the entire platform. It is one of the fundamental roles of the operating system to provide this abstraction of the hardware to the programmer.<\/p>\n<p>It is probably not too much of a stretch to say abstraction is\u00a0<i>the\u00a0<\/i>primary concept that underpins all modern computing. No one person can understand everything from designing a modern user-interface to the internal workings of a modern CPU, much less build it all themselves. To programmers, abstractions are the common language that allows us to collaborate and invent.<\/p>\n<p>Learning to navigate across abstractions gives one greater insight into how to\u00a0<i>use\u00a0<\/i>the abstractions in the best and most innovative ways. In this book, we are concerned with abstractions at the lowest layers; between applications and the operating system and the operating system and hardware. Many more layers lie above this, each worthy of their own books. As these chapters progress, you will hopefully gain some insight into the abstractions presented by a modern operating system.<\/p>\n<h4>2 Implementing abstraction<\/h4>\n<p>In general, abstraction is implemented by what is generically termed an<a href=\"https:\/\/en.wikipedia.org\/wiki\/API\">\u00a0<i>Application Programming Interface\u00a0<\/i>(API)<\/a>. API is a somewhat nebulous term that means different things in the context of various programming endeavours. Fundamentally, a programmer designs a set of functions and documents their interface and functionality with the principle that the actual implementation providing the API is opaque.<\/p>\n<p>For example, many large web applications provide an API accessible via<a href=\"https:\/\/en.wikipedia.org\/wiki\/HTTP\"> HTTP<\/a>. Accessing data via this method surely triggers many complicated series of remote procedure calls, database queries and data transfers, all of which are opaque to the end user who simply receives the contracted data.<\/p>\n<p>Those familiar with\u00a0<i>object-oriented\u00a0<\/i>languages such as <a href=\"https:\/\/www.java.com\/en\/\">Java<\/a>, Python or <a href=\"https:\/\/en.wikipedia.org\/wiki\/C%2B%2B\">C++<\/a> would be familiar with the abstraction provided by\u00a0<i>classes<\/i>. Methods provide the interface to the class, but abstract the implementation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 750px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/computer-science-from-the-bottom-up-1bs0xc93gr?p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":23582,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Other than learning from high level techniques, such as applications and high level programming, why not learning from the building of them? Read this book about it now!"},"product_brand":[],"product_cat":[270],"product_tag":[],"class_list":{"0":"post-23578","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>Computer Science from the Bottom Up - BooksOfAll Vietnamese<\/title>\n<meta name=\"description\" content=\"Other than learning from high level techniques, such as applications and high level programming, why not learning from the building of them? Read this book about it 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\/vi\/computer-science-from-the-bottom-up\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Computer Science from the Bottom Up - BooksOfAll Vietnamese\" \/>\n<meta property=\"og:description\" content=\"Other than learning from high level techniques, such as applications and high level programming, why not learning from the building of them? Read this book about it now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Vietnamese\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-21T03:46:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 ph\u00fat\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/\",\"url\":\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/\",\"name\":\"Computer Science from the Bottom Up - BooksOfAll Vietnamese\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg\",\"datePublished\":\"2023-04-21T03:39:39+00:00\",\"dateModified\":\"2023-04-21T03:46:16+00:00\",\"description\":\"Other than learning from high level techniques, such as applications and high level programming, why not learning from the building of them? Read this book about it now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#breadcrumb\"},\"inLanguage\":\"vi\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg\",\"contentUrl\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg\",\"width\":\"828\",\"height\":\"1170\",\"caption\":\"Computer Science from the Bottom Up\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/vi\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/vi\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Computer Science from the Bottom Up\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/#website\",\"url\":\"https:\/\/www.booksofall.com\/vi\/\",\"name\":\"BooksOfAll Vietnamese\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/vi\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"vi\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/#organization\",\"name\":\"BooksOfAll Vietnamese\",\"url\":\"https:\/\/www.booksofall.com\/vi\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"vi\",\"@id\":\"https:\/\/www.booksofall.com\/vi\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Vietnamese\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/vi\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Computer Science from the Bottom Up - BooksOfAll Vietnamese","description":"Other than learning from high level techniques, such as applications and high level programming, why not learning from the building of them? Read this book about it 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\/vi\/computer-science-from-the-bottom-up\/","og_locale":"vi_VN","og_type":"article","og_title":"Computer Science from the Bottom Up - BooksOfAll Vietnamese","og_description":"Other than learning from high level techniques, such as applications and high level programming, why not learning from the building of them? Read this book about it now!","og_url":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/","og_site_name":"BooksOfAll Vietnamese","article_modified_time":"2023-04-21T03:46:16+00:00","og_image":[{"url":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg","twitter_misc":{"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"3 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/","url":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/","name":"Computer Science from the Bottom Up - BooksOfAll Vietnamese","isPartOf":{"@id":"https:\/\/www.booksofall.com\/vi\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg","datePublished":"2023-04-21T03:39:39+00:00","dateModified":"2023-04-21T03:46:16+00:00","description":"Other than learning from high level techniques, such as applications and high level programming, why not learning from the building of them? Read this book about it now!","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#primaryimage","url":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg","contentUrl":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2023\/04\/Computer-Science-from-the-Bottom-Up.jpg","width":"828","height":"1170","caption":"Computer Science from the Bottom Up"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/vi\/computer-science-from-the-bottom-up\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/vi\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/vi\/categories\/"},{"@type":"ListItem","position":3,"name":"Computer Science from the Bottom Up"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/vi\/#website","url":"https:\/\/www.booksofall.com\/vi\/","name":"BooksOfAll Vietnamese","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/vi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/vi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/vi\/#organization","name":"BooksOfAll Vietnamese","url":"https:\/\/www.booksofall.com\/vi\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/www.booksofall.com\/vi\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/vi\/wp-content\/uploads\/sites\/10\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Vietnamese"},"image":{"@id":"https:\/\/www.booksofall.com\/vi\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product\/23578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/media\/23582"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/media?parent=23578"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product_brand?post=23578"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product_cat?post=23578"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/vi\/wp-json\/wp\/v2\/product_tag?post=23578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}