454 lines
31 KiB
HTML
454 lines
31 KiB
HTML
|
|
|||
|
<!DOCTYPE html>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<html lang="en">
|
|||
|
<head>
|
|||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|||
|
|
|||
|
<title>0.1. About OpenCSF — Computer Systems Fundamentals</title>
|
|||
|
|
|||
|
<link rel="stylesheet" href="_static/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" />
|
|||
|
<link rel="stylesheet" href="_static/css/pygments.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="_static/css/normalize.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="../../../JSAV/css/JSAV.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="../../../lib/odsaMOD-min.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="_static/css/jquery-1.11.4-smoothness-ui.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="../../../lib/odsaStyle-min.css" type="text/css" />
|
|||
|
<link rel="stylesheet" href="_static/css/csf.css" type="text/css" />
|
|||
|
|
|||
|
<style>
|
|||
|
.underline { text-decoration: underline; }
|
|||
|
</style>
|
|||
|
|
|||
|
<script type="text/javascript">
|
|||
|
var DOCUMENTATION_OPTIONS = {
|
|||
|
URL_ROOT: './',
|
|||
|
VERSION: '0.4.1',
|
|||
|
COLLAPSE_INDEX: false,
|
|||
|
FILE_SUFFIX: '.html',
|
|||
|
HAS_SOURCE: true
|
|||
|
};
|
|||
|
</script>
|
|||
|
|
|||
|
<script type="text/x-mathjax-config">
|
|||
|
MathJax.Hub.Config({
|
|||
|
tex2jax: {
|
|||
|
inlineMath: [['$','$'], ['\\(','\\)']],
|
|||
|
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
|
|||
|
processEscapes: true
|
|||
|
},
|
|||
|
"HTML-CSS": {
|
|||
|
scale: "80"
|
|||
|
}
|
|||
|
});
|
|||
|
</script>
|
|||
|
<link rel="shortcut icon" href="_static/favicon.ico"/>
|
|||
|
<link rel="index" title="Index" href="genindex.html" />
|
|||
|
<link rel="search" title="Search" href="search.html" />
|
|||
|
<link rel="index" title="Computer Systems Fundamentals" href="index.html" />
|
|||
|
<link rel="next" title="2. How to Use this System" href="Intro.html" />
|
|||
|
<link rel="prev" title="Chapter 0 Preface" href="index.html" />
|
|||
|
|
|||
|
</head><body>
|
|||
|
|
|||
|
<nav class="navbar navbar-expand-md navbar-dark navbar-custom fixed-top">
|
|||
|
|
|||
|
<a class="navbar-brand py-0" href="index.html"><img src="_static/CSF-Logo-Square-Text.png" alt="OpenCSF Logo" height="40em" class="py-1 px-2 mb-0 align-center rounded-lg bg-white" /></a>
|
|||
|
<!-- Show a navbar toggler on mobile -->
|
|||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#defaultNavbars" aria-controls="defaultNavbars" aria-expanded="false" aria-label="Toggle navigation">
|
|||
|
<span class="navbar-toggler-icon"></span>
|
|||
|
</button>
|
|||
|
<div class="collapse navbar-collapse" id="defaultNavbars">
|
|||
|
<ul class="navbar-nav mr-auto">
|
|||
|
<li class="nav-item dropdown">
|
|||
|
<a class="nav-link dropdown-toggle jmu-gold rounded" href="About.html#" id="navbarDropdownChapters" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Contents</a>
|
|||
|
<div class="dropdown-menu scrollable-menu" role="menu" aria-labelledby="navbarDropdownChapters">
|
|||
|
<a class="dropdown-item" tabindex="-1" href="About.html#"><b>Chapter 1</b></a>
|
|||
|
<a class="dropdown-item" href="IntroConcSysOverview.html"> 1.1. Introduction to Concurrent Systems</a>
|
|||
|
<a class="dropdown-item" href="SysAndModels.html"> 1.2. Systems and Models</a>
|
|||
|
<a class="dropdown-item" href="Themes.html"> 1.3. Themes and Guiding Principles</a>
|
|||
|
<a class="dropdown-item" href="Architectures.html"> 1.4. System Architectures</a>
|
|||
|
<a class="dropdown-item" href="StateModels.html"> 1.5. State Models in UML</a>
|
|||
|
<a class="dropdown-item" href="SequenceModels.html"> 1.6. Sequence Models in UML</a>
|
|||
|
<a class="dropdown-item" href="StateModelImplementation.html"> 1.7. Extended Example: State Model Implementation</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Chapter 2</b></a>
|
|||
|
<a class="dropdown-item" href="ProcessesOverview.html"> 2.1. Processes and OS Basics</a>
|
|||
|
<a class="dropdown-item" href="Multiprogramming.html"> 2.2. Processes and Multiprogramming</a>
|
|||
|
<a class="dropdown-item" href="KernelMechanics.html"> 2.3. Kernel Mechanics</a>
|
|||
|
<a class="dropdown-item" href="Syscall.html"> 2.4. System Call Interface</a>
|
|||
|
<a class="dropdown-item" href="ProcessCycle.html"> 2.5. Process Life Cycle</a>
|
|||
|
<a class="dropdown-item" href="UnixFile.html"> 2.6. The UNIX File Abstraction</a>
|
|||
|
<a class="dropdown-item" href="EventsSignals.html"> 2.7. Events and Signals</a>
|
|||
|
<a class="dropdown-item" href="Extended2Processes.html"> 2.8. Extended Example: Listing Files with Processes</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Chapter 3</b></a>
|
|||
|
<a class="dropdown-item" href="IPCOverview.html"> 3.1. Concurrency with IPC</a>
|
|||
|
<a class="dropdown-item" href="IPCModels.html"> 3.2. IPC Models</a>
|
|||
|
<a class="dropdown-item" href="Pipes.html"> 3.3. Pipes and FIFOs</a>
|
|||
|
<a class="dropdown-item" href="MMap.html"> 3.4. Shared Memory With Memory-mapped Files</a>
|
|||
|
<a class="dropdown-item" href="POSIXvSysV.html"> 3.5. POSIX vs. System V IPC</a>
|
|||
|
<a class="dropdown-item" href="MQueues.html"> 3.6. Message Passing With Message Queues</a>
|
|||
|
<a class="dropdown-item" href="ShMem.html"> 3.7. Shared Memory</a>
|
|||
|
<a class="dropdown-item" href="IPCSems.html"> 3.8. Semaphores</a>
|
|||
|
<a class="dropdown-item" href="Extended3Bash.html"> 3.9. Extended Example: Bash-lite: A Simple Command-line Shell</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Chapter 4</b></a>
|
|||
|
<a class="dropdown-item" href="SocketsOverview.html"> 4.1. Networked Concurrency</a>
|
|||
|
<a class="dropdown-item" href="FiveLayer.html"> 4.2. The TCP/IP Internet Model</a>
|
|||
|
<a class="dropdown-item" href="NetApps.html"> 4.3. Network Applications and Protocols</a>
|
|||
|
<a class="dropdown-item" href="Sockets.html"> 4.4. The Socket Interface</a>
|
|||
|
<a class="dropdown-item" href="TCPSockets.html"> 4.5. TCP Socket Programming: HTTP</a>
|
|||
|
<a class="dropdown-item" href="UDPSockets.html"> 4.6. UDP Socket Programming: DNS</a>
|
|||
|
<a class="dropdown-item" href="AppBroadcast.html"> 4.7. Application-Layer Broadcasting: DHCP</a>
|
|||
|
<a class="dropdown-item" href="Extended4CGI.html"> 4.8. Extended Example: CGI Web Server</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Chapter 5</b></a>
|
|||
|
<a class="dropdown-item" href="InternetOverview.html"> 5.1. The Internet and Connectivity</a>
|
|||
|
<a class="dropdown-item" href="AppLayer.html"> 5.2. Application Layer: Overlay Networks</a>
|
|||
|
<a class="dropdown-item" href="TransLayer.html"> 5.3. Transport Layer</a>
|
|||
|
<a class="dropdown-item" href="NetSec.html"> 5.4. Network Security Fundamentals</a>
|
|||
|
<a class="dropdown-item" href="NetLayer.html"> 5.5. Network Layer: IP</a>
|
|||
|
<a class="dropdown-item" href="LinkLayer.html"> 5.6. Link Layer</a>
|
|||
|
<a class="dropdown-item" href="Wireless.html"> 5.7. Wireless Connectivity: Wi-Fi, Bluetooth, and Zigbee</a>
|
|||
|
<a class="dropdown-item" href="Extended5DNS.html"> 5.8. Extended Example: DNS client</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Chapter 6</b></a>
|
|||
|
<a class="dropdown-item" href="ThreadsOverview.html"> 6.1. Concurrency with Multithreading</a>
|
|||
|
<a class="dropdown-item" href="ProcVThreads.html"> 6.2. Processes vs. Threads</a>
|
|||
|
<a class="dropdown-item" href="RaceConditions.html"> 6.3. Race Conditions and Critical Sections</a>
|
|||
|
<a class="dropdown-item" href="POSIXThreads.html"> 6.4. POSIX Thread Library</a>
|
|||
|
<a class="dropdown-item" href="ThreadArgs.html"> 6.5. Thread Arguments and Return Values</a>
|
|||
|
<a class="dropdown-item" href="ImplicitThreads.html"> 6.6. Implicit Threading and Language-based Threads</a>
|
|||
|
<a class="dropdown-item" href="Extended6Input.html"> 6.7. Extended Example: Keyboard Input Listener</a>
|
|||
|
<a class="dropdown-item" href="Extended6Primes.html"> 6.8. Extended Example: Concurrent Prime Number Search</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Chapter 7</b></a>
|
|||
|
<a class="dropdown-item" href="SynchOverview.html"> 7.1. Synchronization Primitives</a>
|
|||
|
<a class="dropdown-item" href="CritSect.html"> 7.2. Critical Sections and Peterson's Solution</a>
|
|||
|
<a class="dropdown-item" href="Locks.html"> 7.3. Locks</a>
|
|||
|
<a class="dropdown-item" href="Semaphores.html"> 7.4. Semaphores</a>
|
|||
|
<a class="dropdown-item" href="Barriers.html"> 7.5. Barriers</a>
|
|||
|
<a class="dropdown-item" href="Condvars.html"> 7.6. Condition Variables</a>
|
|||
|
<a class="dropdown-item" href="Deadlock.html"> 7.7. Deadlock</a>
|
|||
|
<a class="dropdown-item" href="Extended7Events.html"> 7.8. Extended Example: Event Log File</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Chapter 8</b></a>
|
|||
|
<a class="dropdown-item" href="SynchProblemsOverview.html"> 8.1. Synchronization Patterns and Problems</a>
|
|||
|
<a class="dropdown-item" href="SynchDesign.html"> 8.2. Basic Synchronization Design Patterns</a>
|
|||
|
<a class="dropdown-item" href="ProdCons.html"> 8.3. Producer-Consumer Problem</a>
|
|||
|
<a class="dropdown-item" href="ReadWrite.html"> 8.4. Readers-Writers Problem</a>
|
|||
|
<a class="dropdown-item" href="DiningPhil.html"> 8.5. Dining Philosophers Problem and Deadlock</a>
|
|||
|
<a class="dropdown-item" href="CigSmokers.html"> 8.6. Cigarette Smokers Problem and the Limits of Semaphores and Locks</a>
|
|||
|
<a class="dropdown-item" href="Extended8ModExp.html"> 8.7. Extended Example: Parallel Modular Exponentiation</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Chapter 9</b></a>
|
|||
|
<a class="dropdown-item" href="ParallelDistributedOverview.html"> 9.1. Parallel and Distributed Systems</a>
|
|||
|
<a class="dropdown-item" href="ParVConc.html"> 9.2. Parallelism vs. Concurrency</a>
|
|||
|
<a class="dropdown-item" href="ParallelDesign.html"> 9.3. Parallel Design Patterns</a>
|
|||
|
<a class="dropdown-item" href="Scaling.html"> 9.4. Limits of Parallelism and Scaling</a>
|
|||
|
<a class="dropdown-item" href="DistTiming.html"> 9.5. Timing in Distributed Environments</a>
|
|||
|
<a class="dropdown-item" href="DistDataStorage.html"> 9.6. Reliable Data Storage and Location</a>
|
|||
|
<a class="dropdown-item" href="DistConsensus.html"> 9.7. Consensus in Distributed Systems</a>
|
|||
|
<a class="dropdown-item" href="Extended9Blockchain.html"> 9.8. Extended Example: Blockchain Proof-of-Work</a>
|
|||
|
<div class="dropdown-divider"></div>
|
|||
|
<a class="dropdown-item disabled"><b>Appendix A</b></a>
|
|||
|
<a class="dropdown-item" href="CLangOverview.html"> A.1. C Language Reintroduction</a>
|
|||
|
<a class="dropdown-item" href="Debugging.html"> A.2. Documentation and Debugging</a>
|
|||
|
<a class="dropdown-item" href="BasicTypes.html"> A.3. Basic Types and Pointers</a>
|
|||
|
<a class="dropdown-item" href="Arrays.html"> A.4. Arrays, Structs, Enums, and Type Definitions</a>
|
|||
|
<a class="dropdown-item" href="Functions.html"> A.5. Functions and Scope</a>
|
|||
|
<a class="dropdown-item" href="Pointers.html"> A.6. Pointers and Dynamic Allocation</a>
|
|||
|
<a class="dropdown-item" href="Strings.html"> A.7. Strings</a>
|
|||
|
<a class="dropdown-item" href="FunctionPointers.html"> A.8. Function Pointers</a>
|
|||
|
<a class="dropdown-item" href="Files.html"> A.9. Files</a>
|
|||
|
</div>
|
|||
|
</li>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
|
|||
|
<ul class="navbar-nav flex-row ml-md-auto d-none d-md-flex">
|
|||
|
<li class="nav-item"><a class="nav-link jmu-gold" href="https://w3.cs.jmu.edu/kirkpams/OpenCSF/Books/csf/source/About.rst"
|
|||
|
target="_blank" rel="nofollow">Show Source</a></li>
|
|||
|
|
|||
|
</ul>
|
|||
|
</nav>
|
|||
|
|
|||
|
|
|||
|
<div class="container center">
|
|||
|
«  <a id="prevmod" href="index.html">Chapter 0 Preface</a>
|
|||
|
  ::  
|
|||
|
<a class="uplink" href="index.html">Contents</a>
|
|||
|
  ::  
|
|||
|
<a id="nextmod" href="Intro.html">0.2. How to Use this System</a>  »
|
|||
|
|
|||
|
</div>
|
|||
|
<br />
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<script type="text/javascript" src="_static/js/jquery-2.1.4.min.js"></script>
|
|||
|
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
|
|||
|
<script type="text/javascript" src="_static/js/jquery-1.11.4-ui.min.js"></script>
|
|||
|
<script type="text/javascript" src="_static/js/forge-0.7.0.min.js"></script>
|
|||
|
<script type="text/javascript" src="../../../JSAV/lib/jquery.transit.js"></script>
|
|||
|
<script type="text/javascript" src="../../../JSAV/lib/raphael.js"></script>
|
|||
|
<script type="text/javascript" src="../../../JSAV/build/JSAV-min.js"></script>
|
|||
|
<script type="text/javascript" src="_static/js/config.js"></script>
|
|||
|
<script type="text/javascript" src="../../../lib/odsaUtils-min.js"></script>
|
|||
|
<script type="text/javascript" src="../../../lib/odsaMOD-min.js"></script>
|
|||
|
<script type="text/javascript" src="_static/js/d3-4.13.0.min.js"></script>
|
|||
|
<script type="text/javascript" src="_static/js/d3-selection-multi.v1.min.js"></script>
|
|||
|
<script type="text/javascript" src="../../../lib/dataStructures.js"></script>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="container">
|
|||
|
|
|||
|
<script>ODSA.SETTINGS.DISP_MOD_COMP = true;ODSA.SETTINGS.MODULE_NAME = "About";ODSA.SETTINGS.MODULE_LONG_NAME = "About OpenCSF";ODSA.SETTINGS.MODULE_CHAPTER = "Preface"; ODSA.SETTINGS.BUILD_DATE = "2021-06-01 15:31:50"; ODSA.SETTINGS.BUILD_CMAP = false;JSAV_OPTIONS['lang']='en';JSAV_EXERCISE_OPTIONS['code']='java';</script><div class="section" id="about-opencsf">
|
|||
|
<h1>0.1. About OpenCSF<a class="headerlink" href="About.html#about-opencsf" title="Permalink to this headline">¶</a></h1>
|
|||
|
<blockquote class="blockquote text-center">
|
|||
|
<p>“Computers are useless. They can only give you answers.”
|
|||
|
<footer class="blockquote-footer">Pablo Picasso</footer>
|
|||
|
</blockquote><h2>Why this book is needed</h2><p>As the field of Computer Science continues to evolve and expand, there is an
|
|||
|
increasing amount of pressure to increase the size of the discipline at the
|
|||
|
undergraduate level. While traditional systems areas, such as Computer
|
|||
|
Organization, Operating Systems, and Computer Networks, remain critical
|
|||
|
foundations, there are growing calls to include newer topics, such as Parallel
|
|||
|
Computing and Distributed Systems. In addition, existing systems-related areas
|
|||
|
such as Computer and Information Security continue to grow in both scope and importance.</p>
|
|||
|
<p>To compensate for this increase in systems-related demand, the ACM Computing
|
|||
|
Curriculum 2013 (CC2013) adopted a flexible two-tier system for defining what
|
|||
|
constituted the core of the discipline. Under this system, Computer Science
|
|||
|
departments are advised to cover 100% of the topics identified as Core Tier 1,
|
|||
|
while also striving for 80% of Core Tier 2 topics. As part of this change,
|
|||
|
CC2013 introduced the System Fundamentals knowledge area as Core Tier 1
|
|||
|
material. This knowledge area was intended to cover common design principles,
|
|||
|
themes, and concepts that span multiple of the traditional systems areas.</p>
|
|||
|
<p>The aim of this book is to provide a breadth-first overview of concurrent
|
|||
|
systems architectures and programming. Specifically, this book aims to cover
|
|||
|
100% of the Core Tier 1 material for the areas of System Fundamentals, Operating
|
|||
|
Systems, Network-centric Computing, and Parallel and Distributed Computing. In
|
|||
|
achieving this coverage, this book provides a flexible foundation for
|
|||
|
undergraduate Computer Science programs to achieve Core Tier 1 coverage while
|
|||
|
customizing their curriculum for Core Tier 2 as appropriate for their students.
|
|||
|
Furthermore, this approach provides a foundational scaffold for additional
|
|||
|
systems courses that can apply these principles and concepts with more in-depth
|
|||
|
study of specific areas.</p>
|
|||
|
<h2>Assumed background knowledge and coding style</h2><p>This book relies on a working knowledge of Computer Organization and C
|
|||
|
programming. Specifically, this book assumes that readers are familiar with the
|
|||
|
C memory model, including memory addresses and pointers, as well as the
|
|||
|
relationship between high-level languages and assembly language. A specific
|
|||
|
knowledge of x86 assembly language is not necessary, as most references to it
|
|||
|
rely almost exclusively on instructions that are similar to other assembly
|
|||
|
languages.</p>
|
|||
|
<p>In our C programming examples, our aim is to provide cross-platform support as
|
|||
|
much as possible. That is, as much as possible, our code samples will work
|
|||
|
identically on any UNIX (such as macOS) or Linux system. We use the <a class="reference external" href="https://www.gnu.org/prep/standards/standards.html">GNU coding
|
|||
|
style</a>, adhering to the C99
|
|||
|
and <a class="reference external" href="https://pubs.opengroup.org/onlinepubs/9699919799/">POSIX.1-2017</a>
|
|||
|
standards. The primary exception to this approach is the chapter on Interprocess
|
|||
|
Communication (IPC), which is inherently platform dependent. For instance, macOS
|
|||
|
employs System V IPC semantics and only supports a limited subset of POSIX IPC
|
|||
|
features; on the other hand, POSIX is the preferred interface for Linux. As
|
|||
|
such, avoiding the interface conflicts is unavoidable. To reduce the impact of
|
|||
|
this conflict, however, we will focus on the POSIX interface in the main text</p>
|
|||
|
<h2>Guiding educational philosophy principles</h2><p>While the focus in this book is obviously on concurrent computing systems, we
|
|||
|
approach this topic from a pragmatic stance rooted in active learning.
|
|||
|
Specifically, throughout the text, our emphasis is to focus on the application
|
|||
|
of systems concepts and integrating this material to the readers’ prior
|
|||
|
knowledge. Our aim is to provide a solid foundation of core computer systems
|
|||
|
ideas to all students, regardless of whether they go on to pursue advanced study
|
|||
|
in the systems area or other domains.</p>
|
|||
|
<p>Throughout the book, we strive to illustrate concepts based on the notion of
|
|||
|
worked examples. Within the context of this book, we apply this idea by
|
|||
|
providing working code wherever feasible, with comments and the surrounding text
|
|||
|
documenting the code to identify the key steps that explain why the code works.
|
|||
|
For some particularly advanced concepts, providing succinct illustrative code
|
|||
|
for an undergraduate context is simply not feasible. However, we deliberately
|
|||
|
try to explain concepts with code as much as possible to keep the discussion
|
|||
|
concrete and practical.</p>
|
|||
|
<h2>Text conventions</h2><p>Throughout this text, we use a number of text boxes and structures to highlight
|
|||
|
key ideas and concepts. As noted previously, this book places a heavy emphasis
|
|||
|
on providing working code samples. To achieve this goal, we highlight key C
|
|||
|
functions in boxes structured as below. These boxes start by identifying the
|
|||
|
required header file (unistd.h in this case) to include. Each function listed
|
|||
|
includes the function prototype and a brief description.</p>
|
|||
|
<div class="topic border border-dark rounded-lg bg-light px-2 mb-3">
|
|||
|
<div class="figure align-left">
|
|||
|
<a class="reference internal image-reference" href="_images/CSF-Images-Library.png"><img alt="Decorative C library image" src="_images/CSF-Images-Library.png" style="width: 100%;" /></a>
|
|||
|
</div>
|
|||
|
<p class="topic-title first pt-2 mb-1">C library functions – <unistd.h></p><hr class="mt-1" />
|
|||
|
<p><code class="docutils literal notranslate"><span class="pre">pid_t</span> <span class="pre">fork(void);</span></code>
|
|||
|
Create a new process.</p>
|
|||
|
</div>
|
|||
|
<p>Code listings provide minimally functional code to illustrate these functions’
|
|||
|
uses. Each listing uses line numbers so that the surrounding text can more
|
|||
|
easily emphasize key lines. Each listing is numbered as N.M, with N being the
|
|||
|
chapter number and M specifying a numerical order within the chapter. All code
|
|||
|
listings are available for download at <a class="reference external" href="https://csftext.org/">https://csftext.org/</a>. Each chapter ends
|
|||
|
with an Extended Example that is not explicitly numbered as a code listing.
|
|||
|
These Extended Examples are complete stand-alone programs that provide a full
|
|||
|
implementation of how to apply the chapter’s concepts.</p>
|
|||
|
<div class="highlight-c border border-dark rounded-lg bg-light px-0 mb-3 notranslate"><table class="highlighttable"><tr><td class="linenos px-0 mx-0"><div class="linenodiv"><pre class="mb-0">1
|
|||
|
2
|
|||
|
3
|
|||
|
4
|
|||
|
5</pre></div></td><td class="code"><div class="highlight bg-light"><pre class="mb-0"><span></span><span class="cm">/* Code Listing N.M:</span>
|
|||
|
<span class="cm"> Sample code to illustrate a point</span>
|
|||
|
<span class="cm"> */</span>
|
|||
|
|
|||
|
<span class="kt">pid_t</span> <span class="n">child</span> <span class="o">=</span> <span class="n">fork</span> <span class="p">();</span>
|
|||
|
</pre></div>
|
|||
|
</td></tr></table></div>
|
|||
|
<p>We use three types of text boxes to emphasize certain points throughout the
|
|||
|
text. These boxes use the icons and title structures shown here.</p>
|
|||
|
<div class="topic border border-dark rounded-lg alert-danger px-2 mb-3">
|
|||
|
<div class="figure align-left">
|
|||
|
<a class="reference internal image-reference" href="_images/CSF-Images-BugWarning.png"><img alt="Decorative bug warning" src="_images/CSF-Images-BugWarning.png" style="width: 90%;" /></a>
|
|||
|
</div>
|
|||
|
<p class="topic-title first pt-2 mb-1">Bug Warning</p><hr class="mt-1" />
|
|||
|
<p>The text in this box describes common coding errors, some of which can lead to
|
|||
|
serious security vulnerabilities and system crashes.</p>
|
|||
|
</div>
|
|||
|
<div class="topic border border-dark rounded-lg bg-light px-2 mb-3">
|
|||
|
<div class="figure align-left">
|
|||
|
<a class="reference internal image-reference" href="_images/CSF-Images-Example.png"><img alt="Decorative example icon" src="_images/CSF-Images-Example.png" style="width: 100%;" /></a>
|
|||
|
</div>
|
|||
|
<p class="topic-title first pt-2 mb-1">Example 0.1.1 </p><hr class="mt-1" />
|
|||
|
<p>These examples provide a concrete instance to illustrate a general concept.
|
|||
|
These examples often focus on mathematical calculations using formulas recently
|
|||
|
described or provide a specific example of the binary data that makes up a
|
|||
|
message header or contents. These examples are numbered (again, with N as the
|
|||
|
chapter number and M increasing numerically) so that the surrounding text can
|
|||
|
compare and contrast examples as needed.</p>
|
|||
|
</div>
|
|||
|
<div class="topic border border-dark rounded-lg bg-light px-2 mb-3">
|
|||
|
<div class="figure align-left">
|
|||
|
<a class="reference internal image-reference" href="_images/CSF-Images-Note.png"><img alt="Decorative note icon" src="_images/CSF-Images-Note.png" style="width: 100%;" /></a>
|
|||
|
</div>
|
|||
|
<p class="topic-title first pt-2 mb-1">Note</p><hr class="mt-1" />
|
|||
|
<p>These boxes highlight related points of interest to the topic being discussed.
|
|||
|
These boxes also emphasize cross-platform issues that can arise.</p>
|
|||
|
</div>
|
|||
|
<h2>Structure and historical ordering</h2><p>With the exception of the introductory chapter, the rest of the book is
|
|||
|
generally structured to show the chronological development (with slight
|
|||
|
variations) of technologies and abstractions related to concurrent systems.
|
|||
|
Chapter 2 covers the abstractions of processes and files, which date back to the
|
|||
|
earliest computer systems. J. Presper Eckert and John Mauchly used the file
|
|||
|
abstraction to describe stored programs in the UNIVAC (1951); earlier references
|
|||
|
in the 1940s also used this concept. Processes were key to the earliest
|
|||
|
multiprogramming systems, such as the Atlas Supervisor (1962) and CTSS (1961).</p>
|
|||
|
<p>As soon as computers were able to run multiple processes concurrently, the
|
|||
|
natural next step was to make the processes communicate with each other.
|
|||
|
Chapters 3, 4, and 5 focus on this phase of historical development. IPC and
|
|||
|
networking technologies emerged in the next two decades to support this goal.
|
|||
|
Douglas McIlroy, who had previously contributed to the Multics OS, introduced
|
|||
|
the concept of pipes in UNIX (1973). Joel M. Winett defined the socket in RFC
|
|||
|
147 (1971) as unique identifiers for transmitting data to the ARPA network. Vint
|
|||
|
Cerf introduced the term Internet in RFC 675 as part of the first specification
|
|||
|
of TCP. The TCP/IP protocol suite was later standardized in 1982, with the
|
|||
|
Internet emerging as the successor of ARPANET.</p>
|
|||
|
<p>Chapters 6, 7, and 8 can be characterized as an example of the quotation, “Plus
|
|||
|
ça change, plus c’est la même chose.” Or put another way, everything old is new
|
|||
|
again. IBM OS/360 introduced threads in 1967. Edsger Dijkstra’s THE OS, which
|
|||
|
introduced semaphores as a software construct, was released the following year.
|
|||
|
Dijkstra introduced the Dining Philosophers problem in 1965. Although these
|
|||
|
techniques date back to these early years of computing, their resurgence in the
|
|||
|
1990s and 2000s is instrumental in modern computing.</p>
|
|||
|
<p>In 1985, Tony Hoare revisited the Dining Philosophers problem as part of his
|
|||
|
work on defining the Communicating Sequential Processes (CSP) language. The
|
|||
|
POSIX thread and synchronization standards were defined in POSIX.1c-1995. There
|
|||
|
were many factors driving the interest in multithreading, including the
|
|||
|
development of Linux and its use for cluster systems, as well as the impact of
|
|||
|
the “power wall” on Moore’s law and integrated circuit design.</p>
|
|||
|
<p>Chapter 9 closes with an introduction to parallel and distributed computing. As
|
|||
|
with multithreading, the general concepts of distributed computing are decades
|
|||
|
old. The Internet, for instance, can be characterized as a distributed computing
|
|||
|
system. Leslie Lamport introduced distributed timestamps in 1978. However, the
|
|||
|
past two decades have brought these techniques to new heights with massively
|
|||
|
parallel supercomputers (such as Cray Titan or IBM BlueGene) and grid computing
|
|||
|
(Berkeley Open Infrastructure for Network Computing (BOINC), <a class="reference external" href="mailto:Folding%40home">Folding<span>@</span>home</a>, Great
|
|||
|
Internet Mersenne Prime Search (GIMPS)). Furthermore, these topics are
|
|||
|
frequently studied in stand-alone or graduate courses. As such, this chapter
|
|||
|
aims to provide a teaser or introduction to advanced study in these topics.</p>
|
|||
|
<p>Chapters 2 – 9 all begin with a variant on the following diagram, which roughly
|
|||
|
summarizes the historical timeline described above. As described previously, the
|
|||
|
time frames illustrated here correspond to when the critical nature of these
|
|||
|
technologies came to the forefront of computing and computer science research,
|
|||
|
not necessarily when they were first created. Synchronization dates back to the
|
|||
|
1960s and the foundations of much of the distributed systems field can be traced
|
|||
|
back to the 1970s and 1980s.</p>
|
|||
|
<div class="figure mb-2 align-center" style="width: 100%">
|
|||
|
<a class="reference internal image-reference" href="_images/CSF-Timeline.png"><img class="p-3 mb-2 align-center border border-dark rounded-lg" alt="Timeline of the key technologies developed in computer systems" src="_images/CSF-Timeline.png" style="width: 70%;" /></a>
|
|||
|
</div>
|
|||
|
<p>This chronological structure is not the only possible ordering for these topics.
|
|||
|
For instance, one could choose to cover threads immediately after processes. An
|
|||
|
advantage of this approach is the ability to highlight their differences as
|
|||
|
units of execution. One difficulty with this approach is the tight coupling of
|
|||
|
multithreading with the need for synchronization, due to the shared address
|
|||
|
space. A second challenge is that adding more material between the discussion of
|
|||
|
processes and IPC might make the latter seem less relevant to modern system
|
|||
|
design; why bother with processes and message queues when synchronized threads
|
|||
|
(particularly using Linux tasks) facilitate a more lightweight form of data exchange?</p>
|
|||
|
<p>Another approach would be to move the networking concepts later, after threads
|
|||
|
and synchronization. This structure provides an elegant split between
|
|||
|
single-system (processes, IPC, threads) concurrency and multi-system (sockets,
|
|||
|
networks, distributed systems) concurrency. However, this approach then lessens
|
|||
|
the emphasis of sockets as a form of IPC, as sockets, (particularly kernel
|
|||
|
sockets) can be used within a single system. It also decouples the discussion of
|
|||
|
multithreading from parallelism.</p>
|
|||
|
<p>In sum, there are multiple paths that these topics could be addressed in a book
|
|||
|
or a course. Readers or instructors can select which path they feel is most
|
|||
|
appropriate, bearing these tradeoffs in mind.</p>
|
|||
|
<h2>Funding support</h2><p>This online text was supported through the
|
|||
|
<a class="reference external" href="https://vivalib.org/c.php?g=836990&p=6638954">VIVA Course Redesign Grant Program</a>.</p>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<div class="container">
|
|||
|
|
|||
|
<div class="mt-4 container center">
|
|||
|
«  <a id="prevmod1" href="index.html">Chapter 0 Preface</a>
|
|||
|
  ::  
|
|||
|
<a class="uplink" href="index.html">Contents</a>
|
|||
|
  ::  
|
|||
|
<a id="nextmod1" href="Intro.html">0.2. How to Use this System</a>  »
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
</div>
|
|||
|
|
|||
|
<br />
|
|||
|
|
|||
|
<div class="row jmu-dark-purple-bg">
|
|||
|
<div class="col-md-12">
|
|||
|
<center>
|
|||
|
<a id="contact_us" class="btn button-link-no-blue jmu-gold" rel="nofollow" href="mailto:webmaster@opencsf.org" role="button">Contact Us</a>
|
|||
|
<a id="license" class="btn button-link-no-blue jmu-gold" rel="nofollow" href="https://w3.cs.jmu.edu/kirkpams/OpenCSF/lib/license.html" target="_blank">License</a>
|
|||
|
</center>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<script src="_static/js/popper.js-1.14.7-min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
|||
|
<script src="_static/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
|||
|
</body>
|
|||
|
</html>
|