Work | Suggested Hours |
---|---|
Lecture | 3.7 |
Discussion | 1.7 |
Outside Work | 9-15 |
Assignments are due 23:55. You will lose 2N-1 points for N days late. The policy ends on the last friday of class
Before we define an operating system, we must define a system. In 1928, the Oxford-English Dictionary defined a system to be one of two things:
But how is an operating system defined? Below we explore three different definitions.
What's missing in the definitions? A lot! Below are some key issues we will be discussing in CS 111:
The grep
command line utility gives us insight to some interesting operating system features. For example, let's say we have a file named 'big' with the following properties:
$ ls -l big
-rw-rw-r- -l eggert 9223372036854773000 Oct 6 11:31
The command below attempts to measure the time it takes for the grep utility to search for the character 'x' in the file 'big'. Due to the large size of the file, we expect the grep utility to take a long time to complete this task.
$ time grep x big
real 0m0.009s
Based on the file size, the measurement indicates that file was being searched at rate of 1022 bits per second or 8 zettabits per second. To put this speed in perspective, we can consider the following speeds:
So how is it that grep is faster? The 'big' file is stored in a Zeta File System, which represents the intensional 'big' file by a data structure containing properties of the file. One property, for example, would be if the file 'big' contained any x's or not. We can apply this example to a real life application like scanning for a virus in a file with hundreds of null characters. The naive approach of finding a virus would be to read the file bit by bit in order to find the malicious code. Instead, a smart virus scanner would skip the nulls until it hits the malicious code.
All fields face multiple design challenges when designing a system. Here are four issues and examples that occur in OS design.
Example: Internation Characters and the File System
Microsoft used Shift JIS to encode japanese characters. The first byte is used to map japanese characters, whereas the second byte can potentionally be interpreted as an unintended character. An example of this the yen character represented by 0x5C. The second byte of 0x5C also represents the backslash character which cause issues in areas like a file path. The solution? Use UTF-8.