Shared Flashcard Set

Details

ECE 391 Midterm #1
All the vocab words from the lecture notes #0-#3
91
Computer Science
Undergraduate 3
10/02/2012

Additional Computer Science Flashcards

 


 

Cards

Term
Bits
Definition
binary digits
Term
Representation
Definition
A way of encoding the things being represented as a set of bits, with each bit pattern corresponding to a unique object or thing
Term
Data Type
Definition
Consists of both a size in bits and a representation, such as the 2's complement representation for signed integers, or the ASCII representation for English text.
Term
Data structure
Definition
A representation scheme that formats information in several components or fields, each with a data type.
Term
Fields
Definition
Several components that make up a data structure, typically a location representation.
Term
Size of a type
Definition
int=32 bits, char=byte, look up the rest
Term
Addressability of memory
Definition
A way to order locations in memory space. It is the size of an address.
Term
Pointer
Definition
Just a bunch of bits that serve one purpose: to point to our stored number in memory.
Term
Dereference
Definition
To reading from the memory location to which the pointer we are dereferencing points to
Term
Pointer-array duality
Definition
Any pointer can be treated as an array, and any array can be treated as a pointer.
Term
Linked list
Definition
When a field points to another structure creating a link between each element in the list.
Term
Systematic decomposition
Definition
Repeatedly breaking each task into subtasks until we reach the desired level, usually only a machine instruction or two.
Term
Flow Chart
Definition
Look at page 5 in the Lecture notes #0. There are three types: sequential, iterative and conditional
Term
Register Transfer Language (RTL)
Definition
A level where we obtain a pointer to the first list element by reading from M[head], the memory location to which head points.
Term
Invariant
Definition
Statements we know to be true
Term
Stopping condition
Definition
The condition that ends an iteration. Typically because search space is empty or middle item is one we want
Term
Strongly typed languages
Definition
Languages that prevent the programmer from changing the type of a given datum (variable/structure).
Term
Primitive data types
Definition
Types that are always available in the language
Term
sizeof built-in function
Definition
Provides the size in bytes of any type or variable. It's a built-in function within C library
Term
Activation records
Definition
Another name for stack frames
Term
struct keyword
Definition
defines a structure type and/or a variable of a structure type
Term
fields
Definition
The components of a data structure
Term
enumerations
Definition
a listing of all of the elements of a set.
Term
type definition
Definition
int, char, double, float preface a variable and set to a semicolon.
Term
namespace
Definition
a container for a set of identifiers (names). A name in a namespace consists of a namespace identifier and a local name.
C++ code:

std::array
Term
declaration
Definition
Makes a variable defined elsewhere accessible
Term
definition
Definition
Creation of a new variable
Term
scope
Definition
Specifies what parts of a program can access the variable
Term
storage class
Definition
Specifies when and where in memory the variable is stored
Term
shadowing
Definition
When programmer defines a variable with the same name either within scope or in a broader scope.
Term
static qualifier
Definition
the static qualifier creates a variable local to the file.
Term
global variable
Definition
A variable accessible from other files
Term
automatic (stack) variable
Definition
Any variable declared in a compound statement and without the static qualifier, forcing the stack to allocate space whenever the enclosing function begins execution and is discarded when the function returns.
Term
arithmetic
Definition
addition, subtraction, etc.
Term
bitwise
Definition
AND(&), OR(|), XOR(^), NOT(~), and left(<<) and right(>>) bit shifts
Term
comparison/relational
Definition
(==), (!=), and relative order(<,<=,>=,>)
Term
assignment
Definition
Uses single equals sign (=)
Term
pre- and post-increment and decrement
Definition
Pre-increment: ++p, --p expression produces the new, incremented value
Post-increment: p++, p-- expression produces original, unincremented value
Term
address and dereference
Definition
dereference (*) reads contents of address.
address (&) reads the address
Term
Pointer arithmetic
Definition
Addition and subtraction are defined for pointer types
Term
function signature/prototype
Definition
Specifies the return type, name, and argument types for a function, but does not actually define the function
Term
Pass by value
Definition
The arguments are evaluated and the resulting values are copied(usually onto the stack) when function is called
Term
Implicit type conversion
Definition
When the compiler changes the type for you. Aka, int to float or double. This happens prior to executing operation
Term
Explicit type cast
Definition
Force conversion from one type to another. Such casts must be used with caution, as they silence many of the warnings that a compiler might otherwise generate when it detects potential problems.
Term
#include directive
Definition
Enables the unique definition of new types, structures, and function prototypes within header files that can be included by reference within source files that make use of them
Term
#define directive
Definition
Provides a text-replacement facility
Term
Preprocessor macro
Definition
When a system makes use of parametrized text replacement
Term
RISC
Definition
Reduced Instruction Set Computing. Basically fake instruction sets used in an academic setting like LC-3
Term
CISC
Definition
Complex Instruction Set Computing. The all-powerful x86 (one instruction set to rule them all!)
Term
Registers
Definition
Described using an % sign. Review the table on page 17 for Lecture Notes #1 describing the size of different registers and their basic description
Term
Immediate value
Definition
If you want something returned as an immediate value.
Term
Little endian
Definition
It's the school's new mascot! Described by Prof. Lumetta as "an action where if you store a 32-bit register into memory and then look at the four bytes of memory one by one, you will find the little end of the 32 bits first, followed by the next eight bits, then the next, and finally the high eight bits of the stored value.
Term
Instruction operands that DO NOT affect flags
Definition
MOV, LEA, NOT
Term
Indirect operands
Definition
Preceded by an asterix. Ex: *(%eax) means push the memory of %eax into the Extended Instruction Pointer (EIP).
Term
Pushing of parameters
Definition
They are pushed from right to left to allow for a variable number of parameters without requiring additional space for parameter counts or sentinels (end pointers).
Term
Address requirement for moving data that is 16-bit values
Definition
Can only be writtne or read from even addresses
Term
Address requirement for moving data that is 32-bit values
Definition
Require addresses that are multiples of four
Term
Callee-saved registers
Definition
EBX, ESI, EDI, ESP, EBP
Term
Caller-saved registers
Definition
EAX, EDX, ECX, EFLAGS
Term
System calls
Definition
A calling convention is used: before invoking a system call, arguments are marshaled by a staff sargent into the appropriate registers or locations in the stack. After a system call returns, any result appears in a pre-specified register.
Term
Interrupt
Definition
Asynchronous interruptions generated by other devices, including disk drives, printers, network cards, video cards, keyboards, mice.
Term
Exceptions
Definition
Occur when a processor encounters an unexpected
Term
handler
Definition
The code associated with an interrupt, an exception, or a system call is a form of procedure.
Term
Interrupt enable Flag (IF)
Definition
Set in the flags register, interrupts are allowed to occur.
Term
Non-maskable interrupts (NMI)
Definition
Used to indicate serious conditions such as parity failure in memory, critically, low energy levels in batteries, etc. and will not be addressed in great detail in our course, as most of the hardware and software mechanisms involved are nearly identical to those used for normal interrupts.
Term
Interrupt Descriptor Table (IDT)
Definition
A single 256-entry array vector table for interrupts, exceptions, and system calls. See diagram on page 29, Lecture #2.
Term
I/O port space
Definition
Similar to a memory address space, this space allows for a bus system that sends reads and writes of data to specific port numbers that correspond as addresses.
Term
independent I/O
Definition
A system that separates I/O ports from memory addresses by using distinct instructions for each class of operation.
Term
memory-mapped I/O
Definition
Allows access to device registers from same load and store instructions as are used to access memory(i.e. PUSH, POP). Requires no new instructions for I/O, but demands that a region of the memory address space be set aside for I/O.
Term
Critical section
Definition
A block of code that executes a set of operations that should be executed without stopping or interruption.
Term
Atomically
Definition
Indivisibility. The critical section cannot be divided into chunks to be read/processed.
Term
Race conditions and deadlocks
Definition
Think of a marathon where two runners cross the finish line at once. This is what a race condition is on an a macro level. Who wins? This problem is known as a deadlock.
Term
Spin lock
Definition
Refers to the fact that a program waiting for a lock "spins" idly in a small loop while waiting rather than going off to do other useful work or allowing other programs to use the processor. Make sure no race conditions allow a dynamically allocated spin lock to be used before it is initialized.
Term
Application Programming Interface (API)
Definition
specification intended to be used as an interface by software components to communicate with each other. In ECE 391, we've referred to two examples: spin lock API and API's defined standard POSIX
Term
POSIX
Definition
acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems.
Term
Semaphore
Definition
Generalizes the concept of a lock to allow some fixed number of programs to enter some set of critical sections simulatanously.
Term
down_read, down_write
Definition
Used with semaphores, mutex_locks to execute the read or write operation respectively. Sets semaphore to zero.
Term
up_read, up_write
Definition
Sets semaphore, mutex_lock to one. Releases semaphore or mutex_lock
Term
When to use spin_locks
Definition
When code shares data with interrupt handlers, when a spin_lock is being held, or there's a short critical section. Multiple writers, but few readers
Term
When to use semaphores
Definition
Multiple readers, few writers
Term
Mutex
Definition
When only one program can enter a critical section at a time, the presence of programs in the critical section is mutually exclusive.
Term
Writer starvation
Definition
When readers mosy on into the critical section, throw up a spin lock, and deprive the writer of writing abilities, possibly forever!
Term
Interrupt controller
Definition
Additional piece of hardware to manage the interrupt signals and priorities
Term
Programmable Interrupt controller (PIC)
Definition
A chip used for the interrupt controller that has 28 pins. Study Intel's 8259A PIC on page 39, Lecture #2
Term
When to use mutex locks
Definition
When kernel code is otherwise only executed by programs making system calls or programs running in the kernel.
Term
Function signature/prototype
Definition
Specifies the return type, name, and argument types for a function, but does not actually define the function. Used for linked list removal function
Term
Shortcut evaluation
Definition
The code produced by the compiler stops evaluating operands as soon as the final result is known.
Term
Reader/writer lock
Definition
Allows for writers to access the datum(component/object) when no one else, readers or writers, are accessing it. Also a function, Reader/Writer locks allow for multiple readers to view critical section at once.
Term
Reader/Writer semaphores
Definition
One writer can enter a critical section at any time, and only when no other readers or writers are in critical sections protected by the same reader/wrtier semaphore. A program attempting to acquire a reader/writer semaphore may yield the processor to another program.
Term
Which IR has highest priority when connected to the PIC?
Definition
The lower-numbered IR lines have higher priority. When an IR line is selected, the lower priority IR lines in service are masked
Term
End-Of-Interrupt signal (EOI)
Definition
The PIC removes the interrupt from its set of in-service interrupts. If an interrupt handler fails to send an EOI, the PIC continues to mask lower priority interrupts indefinitely.
Supporting users have an ad free experience!