1/34
diediediediediediedie
Batch Processing
A Processing type that doesn’t require human interaction to work. A list of tasks (batch) are given, and the system executes them automatically.
Interactive Processing
Processing type that requires user input to execute tasks in real-time. Ex: playing a game, interacting with a website
Multiprocessing/Multithreading
This is a type of processing where multiple threads or processes are executed at first. The issues with this are resource sharing and first come first serve with resources, which creates unpredictable outcomes.
What are the Three Jobs of an Operating System?
Oversee interactions between computer and other devices and managing hardware through the use of drivers, store and retrieve files, schedule and coordinate execution of programs.
Race Condition
the issue is that the available resources are first come first serve, and we cannot predict which one would get to it first.
Concurrency Error
since the programs share resources, they can both try to change a piece of stored data, which causes errors in the data.
Ken Thompson
created Unix. He also made the language B and helped create UTF-8 (the text encoding the web uses) and the Go language.
Dennis Ritchie
created the C language, which evolved from Thompson’s B.
What Happens in 1973?
Unix is rewritten in C. Writing Unix in C (a language that works on many machines) made it portable. That’s why it spread and survived.
BSD
Berekley Software Distribution - a remake-ish of Unix after AT&T started gatekeeping it
Richard Stallman
Stallman’s printer broke, the manufacturer wouldn’t give him the source code to fix it, and he wanted software people could modify. So he set out to build a free Unix-like system.
Copyleft
Invented by Richard Stallman, software that anyone can use, edit, and share, as long as it stays free for others.
Kernel
the core, the innermost layer. It does the real work of running the computer. You can’t swap it out without changing the whole OS. Contains drivers, memory/file management, and scheduler/dispatcher
Shell
he outermost layer, the part you actually talk to. It prompts for input, interprets what is typed and communicates it to the OS, and displays the results
Scripting Language
a way to write a list of commands in a file and run them. BASH is a scripting language used in Linux
GUI
Graphical Interface - started as a layer on top of a text shell, and it’s now a kind of shell too, just one you click instead of type
CPU
The processor, which does the actual calculations
RAM
the computer’s short-term working memory. It’s fast, but it loses everything when power goes off.
Disk
long-term storage. It’s slower, but it keeps data when power is off.
Register
a tiny storage slot inside the CPU, the fastest storage there is
Cache
a small, fast memory between the CPU and RAM that holds recently used data.
Static RAM
static and global variables, which exist for the whole program
Stack RAM
local variables, created and removed automatically as functions are called and return
Heap RAM
memory you request while the program runs and release yourself
Virtual Memory
Sometimes, the program needs more RAM than is available. Virtual Memory solves this: the OS reserves space on the hard drive and moves chunks of data (called pages) back and forth between RAM and disk, swapping out what isn’t needed right now. Programs think they have lots of RAM, but it’s a “shell game.”
The File System
how the OS organizes data on a disk so it can find it again. It’s the filing cabinet system: files go in folders (directories), and each file is found by its path (its address).
The Three Layers of the File System
Logical layer, the commands that programs use, Virtual layer, lets the OS work with several different kinds of file systems at once, and Physical layer, which talks to the actual storage device
The Three Types of Files
Ordinary, like data, texts, etc., Directory, a file that lists other files’ names and info, and Special, files that represents different parts of the hardware.
Contiguous Allocation Method
When deciding where a file gets placed in the disk, contiguous means the whole file sits in consecutive blocks
Linked Allocation Method
When deciding where a file gets placed in the disk, linked means that each block points to the next, like a linked list
Indexed Allocation Method
When deciding where a file gets placed in the disk, indexed means that a special index block holds pointers to all of the file’s blocks
Bootstrap
Stored in the ROM (Read Only Memory), and finds the OS on the disk, loads it into RAM, and runs it.
Program vs. Process
A program is a set of instructions sitting on the disk. Like a recipe in a cookbook. A Process is a program that is loaded into the memory and run, like someone making the recipe from the cookbook.
Deadlock Error
Process A is holding something B needs, and B is holding something A needs. Each waits forever for the other.
Locks
A lock lets one process use a resource at a time while the others wait their turn, like a traffic light.