Shared Flashcard Set

Details

Operating Systems - Last few topics
CS 439/Norman
110
Computer Science
Undergraduate 2
05/07/2013

Additional Computer Science Flashcards

 


 

Cards

Term
Write-through
Definition
write changes immediately to disk
is slow but consistent
Term
file
Definition
a named collection of related information recorded on secondary storage
Term
Two parts of a file
Definition
Data
Metadata
Term
Data of a file
Definition
what the user puts in the file
Term
Metadata of the file
Definition
the attributes the OS keeps track of, such as name, location, size, etc
Term
Directory
Definition
provides names for files, is a mapping from each name to a specific file or another directory (by inode number)
Term
Hard link
Definition
a mapping from a file name to a directory or file
Term
Soft link
Definition
a mapping from a file name to another file name
Term
create()
Definition
the OS allocates disk space, set up metadata, update director
Term
link()
Definition
creates a hard link between a new name and directory
Term
unlink()
Definition
removes a name for a file from its directory
Term
open()
Definition
is given an fd and checks to see if the file is already open. If it isn't, it copies the fd into the open file table, increments open count, updates the process's file table, returns fd?
Term
close()
Definition
removes the entry for the file in the process's file table, decrements open count, removes the entry in the system wide file table if open count is 0
Term
read()
Definition
reads a certain number of bytes from an offset into a buffer in bytes
Term
write()
Definition
is similar to read, but copies the buffer to the file
Term
seek()
Definition
updates the file pointer (a certain position in the file)
Term
superblock
Definition
contains file system metadata
Term
file header
Definition
describes where the file is on disk and the attributes of the file
Term
Continuous allocation (files)
Definition
has sequential allocation time, has external fragmentation
Term
Linked allocation (files)
Definition
has no random access, worse sequential time than continuous, eliminates external fragmentation, supports adding to the end because file header also points to the last file block
Term
FAT file system is an example of
Definition
linked allocation because it has the MFT which is a linked list of data blocks. Has limited file size and poor random access
Term
Direct Allocation (files)
Definition
File header points to each data block, supports growth and random access, has little fragmentation
Term
Indexed Allocation (files)
Definition
inode holds an array of block pointers for each file
Allocates data block only on demand
This is pretty much our project

Use multilevel indexing to handle large files
Term
Multilevel Index Files
Definition
think of this as a tree where the root is the file's inode

the way it works is you have some pointers that point directly to data blocks, one that points to another block (1st level) that holds pointers to data blocks, another pointer that points to a 2nd level indirection block that holders pointers to indirection blocks which holds pointers to data blocks, and a last pointer (3rd level indirection block) to a 2nd level indirection block that holds pointers to indirection blocks that hold pointers to data blocks
Term
inode
Definition
stores a file's metadata and holds an array of block pointers to all the data blocks being used by a file
Term
Fast File System (FFS) and BigFS are examples of
Definition
multilevel indexing
Term
Current working directory
Definition
the directory you're currently in so when you look for a file you don't have to start from the root, is cached to make finding a file easier
Term
FFS Block Group Placement
Definition
divide disk into block groups that stores bitmaps, inode array, and data blocks in each group
Term
Reserved Space Heuristic
Definition
applications have a smaller disk to work with and any write that goes to reserved space fails
Term
NTFS
Definition
a tree structure that has a Master File Table. Each entry of the MFT has a data section made up of extents which are contiguous blocks on a track rather than single blocks
Term
Write-back
Definition
delay writing the modified data. has better performance. can cause inconsistencies since data can be lost in a crash
Term
inconsistency happens
Definition
when the inode or data bitmap doesn't reflect the right changes. We don't care about the user data though
Term
fsck
Definition
is used to check the file system for any inconsistencies and attempts to fix them
Term
Transactions
Definition
group actions together so they are atomic, durable, and serializable (transactions appear to happen one after the other)
Term
The problem with transactions is that it's difficult to achieve durability (once transactions happen, they stick)
Definition
To get durability, we need to be able to commit and roll back our transactions
Term
Write-ahead (transactions)
Definition
once a transaction begins, it will write changes to a log on disk and once it's finished, it will commit
Term
Write-behind (transactions)
Definition
will log all changes to disk (opposite to write ahead)
Term
Journaling
Definition
is a write-ahead logging system where you write all metadata changes to a log before sending them disk. Log only exists if there are still changes to be made
Log has to have a commit before it's considered finished
Once writes to disk are made, you update the log to reflect that
Term
Use barriers to force orderings on writes to disk since they can be scheduled out of order
Definition
Term
RAID
Definition
is an array of of inexpensive disks that are boxed together to increase performance. Data blocks are split across multiple disks.
Has different levels
Term
RAID-0
Definition
Data is split across multiple disks
increases throughput but any failure of one disk causes data loss
Term
RAID-1
Definition
data is copied on another disk. provides redundancy but is expensive
Term
RAID-3
Definition
bytes of split across multiple disks
has a parity disk that the disk controller uses to detect faults
Term
RAID-4
Definition
whole blocks split across disks with parity disk
Term
RAID-5
Definition
data and parity is distributed across all disks where a block on one disk is the parity of a block on another disk
Term
internet
Definition
lowercase internet is an interconnected network
Term
IP protocol
Definition
is unreliable because it makes no effort to recover lost packets. Delivers packets from host to host
Term
TCP protocol
Definition
Delivers packets from process to process
is bidirectional and reliable as it will retrieve lost packets
Has a 3 step handshake
Term
IP address
Definition
an unsigned 32 bit integer
Term
connection
Definition
connects a pair of processes and is reliable in that data flows between the two and will always be received by the destination process
Term
socket
Definition
the end point of a connection (kernel)
an open file with an fd that lets you read/write to/from a network (user program)
Term
socket address
Definition
is socket:port where port is assigned by kernel unless it's a well known port such as the internet (80) or email (25)
Term
Ack
Definition
an acknowledgement that something happened
the sender send a message on a timer
once the receiver receives a message it sends an ack and clears timer
if timer goes off without an ack, then it starts over

Is optimized by saying acks represent multiple packets

Always ack the latest packet you received
Term
internet protocol
Definition
defines a uniform format for host addresses
provides a delivery mechanism
Term
packet
Definition
standard transfer unit
have a header and a payload
Term
UDP protocol
Definition
uses IP protocol to deliver packets from process to process
Term
Protocol Control Block
Definition
where the OS stores info regarding TCP and protocol-specific information
Term
TCP Flow Control
Definition
prevents sender from overflowing receiver's buffer
checks the size of the Rcvwindow to make sure there's room for more bytes
Term
TCP Congestion Control
Definition
keep track of the Congestion window
grows when acks are received (additive increase - increase CongWin by 1), shrinks when acks are lost (multiplicative decrease - half the CongWin)
Term
Slow Start
Definition
the phenomenon where the CongWin starts out with exponential growth because of additive increase but decreases by 1/2 after the loss of an ack
Term
Routing
Definition
application sends a message to a name and routing software turned this name into an Internet address and sends the message on its way
Term
Domain Naming System (DNS)
Definition
a mapping between IP address and domain names
Database contains millions of host entries which can be retrieved either by domain name or IP address
Term
127.0.0.1
Definition
loopback address
Term
port
Definition
a 16-bit integer that identifies a process
Term
Servers 
are 
long‐running 
processes
Definition
Term
socket()
Definition
creates a socket descriptor on the client
Term
connect()
Definition
after building the server's internet address, calls connect() to make a connection with the server
client process will block until connection is created
Term
bind()
Definition
associates socket with socket address
Term
listen()
Definition
checks to see if there are any clients trying to connect with the server
Term
accept()
Definition
blocks waiting for a connection request
returns when connection between client and server is created
Term
Distributed system
Definition
a set of physically separate processors that communicate with each other
Term
Parallel Computing
Definition
processors share clock, memory, run one OS
multiple process works on a task simultaneously, requires synchronization (explicit)
Term
Distributed computing
Definition
each processor has its own memory, runs its own OS. computers are connected by a network

extends message passing, communication is explicit, synchronization is implicit
hard to program
Term
Symmetric Multiprocessor
Definition
several processors share one address space (prevalent in parallel computing) so communication is implicit
Term
Event Ordering (Distributed Systems)
Definition
events are ordered by the sending and receiving of messages
Term
Atomicity in distributed systems
Definition
two phase commit?
Term
Two phase commit
Definition
use log on each machine to track whether a commit happened

Phase 1: coordinator requests a transaction by sending a request to all participants
The participants then decide if they want to commit or abort which they record to their logs and write to the coordinator.

Phase 2: coordinator will abort if it receives one abort, write this to its log, and sends aborts to its participants and it will commit if it gets all commits and writes to its log, and sends this to all its participants
Term
Bully Algorithm
Definition
used to elect a leader when the coordinator has died during a two phase commit.

basically you have numbered processes and whoever has the highest number will be the new coordinator. however processes that think they're the shit can campaign and during the campaign, the candidates see if they can take the coordinator's position without crashing. whichever one survives wins
Term
Remote Procedure Calls
Definition
servers export procedures for some set of clients to call
abstracts send/wait-reply between client and server (high level)
Lower level: server and client communicate through stubs

So the client will send its arguments over the network through a client sub, the server receives the arguments through a server stub, makes the procedure call and sends the return value back through the server stub and the client receives the return value through the client stub
Term
RPC is NOT message passing
Definition
Term
Problems with RPC
Definition
Can't pass pointers
Can't use global variables
Weakly types languages
Term
Distributed file systems
Definition
provide access to files stored on remote disks
Term
Consistency semantics for distributed file systems
Definition
Says that clients are guaranteed to access the data they think they're accessing from a data store
Term
Coherence (distributed file systems)
Definition
the latest write should be saved to a memory location
Term
Staleness (distributed file systems)
Definition
bounds max delay between read and writes to one location
Term
Sequential Consistency
Definition
the result of any execution is the same as if the operations of all the processes happened sequentially
Term
CAP theorem (strong consistency)
Definition
it's impossible in a distributed system to provide consistency, availability, and partition tolerance at the same time. You can only have 2 out of 3
Term
FIFO consistency (consistency weakening)
Definition
writes done by a single process are seen by all processes in the order in which they were issued but writes from different processes may be seen out of order
Term
Naming in distributed file systems
Definition
explicit: name includes file name and server
implicit: name just includes file name (can get the server name by a mount table with a directory to server mapping
Term
Sun's Network File System
Definition
caches data blocks, file headers for faster performance at both client and server side
Clients poll the server for any file changes and if there are, server updates
Uses a stateless protocol: server maintains no state about clients or open files. Instead this is maintained by the clients in case the server fails?
Has 'at least once' semantics (idempotent ops where you can request as many times as you want without any adverse effects)

Advantage: is actually better than using the local file system because things can be done locally. Uses mounts so multiple file systems appear as one file system
Term
Google File System
Definition
components are known to fail
supports huge files
has a single master used for metadata
metadata: file/chunk namespaces, file to chunk mapping
Term
Security is as strong as the weakest link
Definition
Term
Security should be economical and have little overhead
Definition
Term
Complete mediation (security)
Definition
apply security to ever access to an object
Term
Open Design (security)
Definition
assume that intruders know all about the design
Term
Separation of Privileges (security)
Definition
separates privileges for purpose from another. ex: separate access control on each file
Term
Least Privilege (security)
Definition
give bare minimum access rights
Term
Least Common Mechanism (security)
Definition
avoid sharing parts of the security mechanism among different users
Term
Acceptability (security)
Definition
mechanism must be simple so people will use it
Term
Fail-Safe (security)
Definition
default to lack of access so you won't have to worry about anything being lost
Term
TENEX password problem
Definition
page faults can result in correct guesses of passwords because of where the characters were stored on the page
Term
Use encryption to securely store passwords
Definition
Encrypt given passwords and then compare them to encrypted passwords stored
Term
Salting
Definition
adds complexity to guessing the functions that hash encrypted passwords
Term
Sony Rootkit
Definition
secretly installed DRM software on computer so users couldn't burn CDs and also exposed the computers it was on
Term
Ken Thompson's Unix Trap Door
Definition
Edits the binary and compiler so that it will insert the bug back into the program allowing him the ability to log in anywhere
Term
Worms
Definition
use spawn mechanism, spreads
Term
Viruses
Definition
are embedded in legit programs
Term
Stuxnet
Definition
a worm that targeted the Iranian nuclear program. Spread by using removable drives on computers on private networks. Targets Siemen's software which affected communication between centrifuge machines causing them to falter
Term
Can insert info on low ordered bits of colors to put hidden messages
Definition
Term
OS is basically in an idle loop until it's woken up by an interrupt, system call or exception
Definition
Supporting users have an ad free experience!