<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2015F_Lecture_24</id>
	<title>Operating Systems 2015F Lecture 24 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2015F_Lecture_24"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2015F_Lecture_24&amp;action=history"/>
	<updated>2026-04-22T13:25:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2015F_Lecture_24&amp;diff=20419&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture given on December 4, 2015 [http://homeostasis.scs.carleton.ca/~soma/os-2015f/lectures/comp3000-2015f-lec24-04Dec2015.mp4 is now available].  ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2015F_Lecture_24&amp;diff=20419&amp;oldid=prev"/>
		<updated>2015-12-04T21:04:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture given on December 4, 2015 [http://homeostasis.scs.carleton.ca/~soma/os-2015f/lectures/comp3000-2015f-lec24-04Dec2015.mp4 is now available].  ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
Video from the lecture given on December 4, 2015 [http://homeostasis.scs.carleton.ca/~soma/os-2015f/lectures/comp3000-2015f-lec24-04Dec2015.mp4 is now available].&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 24&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
* /dev/random&lt;br /&gt;
* the Future&lt;br /&gt;
&lt;br /&gt;
Randomness&lt;br /&gt;
 - unpredictable&lt;br /&gt;
 - unbiased (not predictable even in a statistical sense)&lt;br /&gt;
&lt;br /&gt;
More precisely&lt;br /&gt;
 1. sequences of numbers that appear to be random&lt;br /&gt;
   according to statistical tests of randomness&lt;br /&gt;
 2. unpredictable&lt;br /&gt;
&lt;br /&gt;
There exist sequences that pass #1 but not #2&lt;br /&gt;
&lt;br /&gt;
pseudo-random numbers&lt;br /&gt;
 - digits of irrational numbers (e.g., pi)&lt;br /&gt;
 - almost any cryptographic primitive (encryption, hash)&lt;br /&gt;
 - pseudo-random number generators&lt;br /&gt;
&lt;br /&gt;
How can computers ever be unpredictable?&lt;br /&gt;
 - generating pseudo-random numbers is easy, just&lt;br /&gt;
   run the right algorithm&lt;br /&gt;
 - using a random &amp;quot;seed&amp;quot; you can get arbitrarily long&lt;br /&gt;
   sequences of random-looking numbers that vary over&lt;br /&gt;
   time&lt;br /&gt;
 - but how do you get the seed?  And what about reversing&lt;br /&gt;
   the algorithm?&lt;br /&gt;
&lt;br /&gt;
Computers cannot produce randomness on their own.&lt;br /&gt;
They need help from the outside world.&lt;br /&gt;
&lt;br /&gt;
Sources of &amp;quot;real world&amp;quot; randomness observable by the OS&lt;br /&gt;
 - user input (keyboard, camera, microphone, mouse)&lt;br /&gt;
 - network traffic (inter-arrival time of packets)&lt;br /&gt;
 - device behavior (settling time of a spinning hard drive)&lt;br /&gt;
&lt;br /&gt;
But *why* do you want randomness in a computer system?&lt;br /&gt;
* unpredictable program behavior&lt;br /&gt;
  - shuffling songs&lt;br /&gt;
  - games&lt;br /&gt;
* simulations&lt;br /&gt;
* randomized algorithms&lt;br /&gt;
  - genetic algorithms, other search algs&lt;br /&gt;
* cryptographic keys&lt;br /&gt;
&lt;br /&gt;
For everything except cryptography, pseudo-random number&lt;br /&gt;
generators are more than good enough&lt;br /&gt;
 - caveat: some simulations need &amp;quot;high quality&amp;quot; random&lt;br /&gt;
   number generators&lt;br /&gt;
&lt;br /&gt;
For crypto, you need things that are truly unpredictable&lt;br /&gt;
&lt;br /&gt;
What sources of real world behavior are not&lt;br /&gt;
observable/potentially influenced by attackers?&lt;br /&gt;
* most can be observed or influenced&lt;br /&gt;
&lt;br /&gt;
Solution: CPUs include hardware random number generators&lt;br /&gt;
* but, do you really trust them?&lt;br /&gt;
&lt;br /&gt;
Instead, trust nobody but use everything you can&lt;br /&gt;
&lt;br /&gt;
/dev/random &amp;amp; /dev/urandom&lt;br /&gt;
 - grabs whatever source of randomness it can, adds it to&lt;br /&gt;
   an &amp;quot;entropy pool&amp;quot;, &amp;quot;stirring&amp;quot; it using&lt;br /&gt;
   cryptographically secure hash functions&lt;br /&gt;
&lt;br /&gt;
/dev/random&lt;br /&gt;
 - only outputs as many bits as its estimate of entropy&lt;br /&gt;
   in the entropy pool&lt;br /&gt;
&lt;br /&gt;
/dev/urandom&lt;br /&gt;
 - produces as many bits as requested; security is&lt;br /&gt;
   limited to number of bits in entropy pool&lt;br /&gt;
&lt;br /&gt;
Use /dev/urandom for short-term keys, other stuff&lt;br /&gt;
Use /dev/random for long term keys&lt;br /&gt;
&lt;br /&gt;
How good is /dev/random in a virtual machine?&lt;br /&gt;
 - depends on the hypervisor&lt;br /&gt;
&lt;br /&gt;
The future&lt;br /&gt;
----------&lt;br /&gt;
An operating system turns the computer you have into the&lt;br /&gt;
computer you want to program (or use)&lt;br /&gt;
 - abstraction and resource management&lt;br /&gt;
&lt;br /&gt;
OSs change when computers change and when how we use them&lt;br /&gt;
change&lt;br /&gt;
&lt;br /&gt;
Embedded systems&lt;br /&gt;
  - many many kinds&lt;br /&gt;
Internet-of-Things&lt;br /&gt;
Personal devices&lt;br /&gt;
Tablets&lt;br /&gt;
Laptops&lt;br /&gt;
Workstations&lt;br /&gt;
Clusters&lt;br /&gt;
Data centers&lt;br /&gt;
Mainframes&lt;br /&gt;
&lt;br /&gt;
Why in the world would one OS ever span all of these?&lt;br /&gt;
But we do!&lt;br /&gt;
&lt;br /&gt;
Top-level concerns&lt;br /&gt;
 - network connectivity&lt;br /&gt;
    - heavy concurrency, certain device drivers&lt;br /&gt;
    - security&lt;br /&gt;
 - power constrained&lt;br /&gt;
    - in data centers, they care about&lt;br /&gt;
      &amp;quot;performance per watt&amp;quot;&lt;br /&gt;
      - because power and cooling are huge expenses&lt;br /&gt;
      &lt;br /&gt;
Feasible to use same code base because hardware is&lt;br /&gt;
all &amp;quot;powerful enough&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The future will be roughly the same, OS-wise&lt;br /&gt;
&lt;br /&gt;
Change comes from duplication and refactoring&lt;br /&gt;
&lt;br /&gt;
 - containers are just packaged OS-level virtualization&lt;br /&gt;
&lt;br /&gt;
Learn the tools&lt;br /&gt;
&lt;br /&gt;
New tools will come along to help handle complexity&lt;br /&gt;
 - but the concepts will be the same&lt;br /&gt;
 - and most of the mechanisms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>