Quiz 1 Flashcards
Study for quiz 1 with Liquang Wang.
compute-server
provides interface to client to request services
file-server
provides interface for clients to store and retrieve files
peer-to-peer
broadcast request for service and responds to requests for service via discovery protocol
software real-time system
specialized OS; real-time job gets higher priority and maintains it until it completes
hardware real-time system
specialized OS; guarantees that real-time jobs complete on time (missile control/robotics) and requires special hardware to implement
handheld systems
specialized hardware, lack of virtual memory, limited function with small, very limited OSs
OS Components
process management, IO management, main memory management, file & storage management, networking , protection and security, user interface
process or job
process is a program in execution; it is a key concept
do we need to load the entire program code into memory to execute it?
no
tasks of process management:
create, load, execute, suspend, resume, and terminate processes; process scheduling, process communication, process synchronization; allocate/de-allocate resources properly
tasks of io management of os
hide the details of hardware devices, maintain and provide device driver interfaces
main memory management
maximize memory utilization; map process to physical addresses and loaded into main memory to be executed
tasks of main memory management of os
keep track of memory
file & storage management
efficient and convenient
RAID?
duplicates important data
task of storage management
bad block marking, scheduling IO requests
protection v security
controlling access of processes or users to resources vs. defense of the system against internal and external attacks
shell scripts: interpreted or compiled? consequences?
interpreted, run slower
two types of popular classes of shells:
c shell and variants; bourne shell and variants
c shell
csh
variant c shell
tcsh
bourne shell
sh
variants
bash, ksh
two ways of launching scripts:
direct and indirect interpretation
direct interpretation
csh scriptfile [args..]
indirect interpretation
first line must be: #!/bin/csh
must be executable
predefined shell variables
$HOME, $PATH
environment variables cshell
setenv PRINTER printer1
environment variables bourne
PRINTER=printer1
set variable c shell
set x = 1
set variable in bourne
x=1
start c shell scripts
!/bin/csh
bourne bash shell scripts
!/bin/bash
forget beginning shell script line
default shell used
end for switches and cases in switch statements
endsw / breaksw
goto
Do Not Do: jump unconditionally to a label
three types of control statements
conditions, loops, branch
conditional in bourne shell script
tests successful, not true or false
return code values
0 if successful, non zero if not (1.255)
end if statements
fi
then required?
yes
test
checks validity
three kinds of tests
files, strings, integers
test alias
[]
do-while in bash?
unto
do
done
three ways to pass parameters to os
registers, block, stack
40s-early 50s
vacuum tubes, single user, machine language
mid 50s early 60s
transistors, punch cards, batch processing, scientific programs
batch processing
sequential read of card decks
mid 60s to 70s
integrated circuit, multiprogramming, multitasking (time sharing)
context switch
mid 60s to 70s
80s to present
personal computer and GUI, internet and distributed systems, PCs are too slow to solve heavy CPU scientific problems that require more advanced systems, security and protection
multicaching
different cores can store to cache vs. ram
multithreading
share cache
multicore
cheaper than multi CPUs; each core has its own lvl 1 cache, but they can share lvl 2 cache
ethernet
most popular = LAN
cluster
multiple computers connected
parallel vs distributed
everyone does the same job but simultaneously vs. emphasis functionality + size, different computers runs different applications
multiprocessor
share bus, clock, memory, IO; symmetric and asymmetric
symmetric
peer structure
asymmetric
master/slave structure
manycore
GPU (thousands, many thousands: cheaper, simpler)
send data from program 1 to program 2?
network, pipe, shared memory
cluster and grid systems like multiprocessors
don’t share bus
software generated interrupt
trap
interrupt vector
interrupt transfers control to the interrupt service routine; contains addresses of all the service routines
where does OS preserve the state of CPU to serve an interrupt
registers
Two IO methods
synchronous vs. asynchronous