Midterm I Flashcards
(99 cards)
What is the onion skin model of an operating system?
Users>Application programs>Operating System>Hardware
What are some functions of operating systems?
– Provides an interface between application programs and the hardware
– Hides the complexity of hardware interfaces from application programs
– Protects the hardware from user mistakes and programming errors (to prevent crashes)
– Manages the hardware resources of the computer systems
– CPU time, disk space, memory access, . . .
– Protects user’s programs and data from each other (security issues)
– Supports inter-process communications and sharing
– Provides resource sharing among users and processes
Who created UNIX?
Ken Thompson 1969
What was MULTICS
A multi-user OS developed by MIT, Bell Labs, and GE for the GE-645 system; a “computing utility”,
similar idea to “cloud”
(a) advanced capabilities, including security mechanisms
– segments instead of files/memory
– dynamic linking, hot-swapping of components
– hierarchical file system, multi-ring security
(b) relied on the special features of the GE-645
(c) was slow and expensive to run
– Ken Thompson wrote a game (Space Travel) which costed $75 dollars to play
(d) The hardware was not up to the demands of the software.
UNIX on PDP
– Ken Thompson, Dennis Ritchie, Rudd Canaday started talking about a system that had 1. a developer friendly environment 2. encouraged “fellowship among users” 3. file system for multiple users 4. was efficient and simple – Implemented it on an old PDP-7, in assembly language 1. Wrote it on a GE system 2. Assembled it 3. Copied it on to paper tape 4. Carried to the PDP-7
When were pipes implemented in UNIX
When UNIX was rewritten in C, pipes were implemented then (1970-73)
Describe the 1980s UNIX wars
1980s Unix Wars
– Many companies (IBM, Bell, Sun, etc) developed their own versions of Unix; Xenix was available for PCs,
being licensed by Microsoft from AT&T
– Ceased to be free, lots of commercialization
– Not a good time for the hobbyist (or academic)
– Different flavours/versions emerged
– System V (AT&T) vs. BSD Unix (UC Berkeley)
– 1985 GNU begins development of a free Unix, except kernel; GNU’s Not UNIX
– 1991 Linus Torvalds develops the Linux kernel
Describe Linux
– 1991: Linus Torvalds announced the project
– Open-source, UNIX-like OS kernel
– Does not share code with UNIX
– Usable in 1992
– Essentially GNU/Linux
– Various distributions available: Fedora, Ubuntu, etc
Explain the concept of a pipeline
A pipe is a mechanism in which the standard output of one process is directed into the standard input of another process. A pipeline is a sequence of several running processes, where each process’s standard output is re-directed into the standard input of the next process. The first process does not have its standard input re-directed, and the last process does not have its standard output re-directed. The processes are executed concurrently
Unifying principles of UNIX (6)
- Everything is either a process or a file
- Pipes are used to connect output of one program to the of the next
- Process spawning and interprocess communication is well-supported, flexible, and cheap
- Communication between programs should be simple
- Cooperating programs don’t know about each other
- Programs are designed “to operate not specifically with each other, but with programs as yet unthought
of” — McIlroy
Notable UNIX features
Allows many users to access a computer system at the same time
– Shares CPU’s, memory, and disk space in a fair and efficient manner among competing processes (CPU time
is split in “slices”, typically 1/10 seconds)
– Processes and peripherals talk to each other even on different machines
– Provides a well-defined set of system calls similar to library routines
– Very portable
Define: File
collection of data (sequence of bytes) stored on disk (or other external storage)
Define: Program
a file containing machine code and data that can be loaded into memory and run
Define Process
Program that is loaded in memory and running
Define kernal
The kernel is the hub of the operating system. It allocates time and memory to programs, handles file storage, and
deals with many other tasks critical to the functioning of a computer. It also handles communications in response
to system calls
Define System Call
A system call is how a program requests a service from the kernel. A system call is usually
implemented as a library function with the same or very similar name. At the machine code level, a system call
usually works by preparing the appropriate parameters in the CPU registers and by making a special jump into the
kernel code
What is the shell
The shell is a text-based interface to the UNIX system. It is a command-line interpreter that interprets user commands
and arranges for their execution. It is usually assumed that a shell is text-based, but GUI (graphical user
interface) window managers act as shells in many ways, and are sometimes also called shells.
– A UNIX characteristic is existance of multiple shells (even Window managers); e.g.:
– Bourne Shell: sh, bash (Bourne-Again Shell); we will focus on this one
– Korn Shell: ksh
– C Shell: csh, tcsh
– Z Shell: zsh
what is a utility
A utility is a program with the same name as its command (example: clear, or date)
what is a command line argument?
– Utilities can accept arguments
– For example, date utility allows us to choose format of the output, as in:
date +%Y-%m-%d-%H-%M-%S
How do you access the manusal
you can access the manual using the “man” command. if you are looking for information on a particular program you can use “man clear” which would give you the manual page about the program clear
what are two important special characters?
Control-C (ˆC) is used to terminate a process
– Control-D (ˆD) is used to signal end of file
what are the standard IO streams for a UNIX program
stdin (standard input)
– stdout (standard output)
– stderr (standard error)
what does the command “cat” do
cat > file.txt will allow creation of a file. cat file.txt will print the contents of file.txt
How to log out of bluenose?
Ctrl-D