Mod 5 Flashcards
(48 cards)
What component translates source code to object code?
compiler
What component creates the executable bundle?
linker
What component loads the executable bundle into memory at runtime?
loader
List 4 loader responsiblities
Load program into memory,
Resolve dynamic libraries,
Set up the execution environment,
Transfer control to the program
Define intermediate representation (IR)
an abstract machine language used by compilers to translate source code to a machine independent code
Define bytecode
a form of intermediate representation designed for efficient execution by a vm or software interpreter
Define kernel
the core component of the OS, that handles the management of low-level hardware resources like: memory, processors, and I/O devices
How do applications communicate with low-level hardware?
Indirectly, by delegating taks to the kernel via system calls.
Define process
instance of a program that is currently running
What component is responsible for setting up the runtime environment for all processes executing on the system?
operating system
Name the three areas of memory layout
Program code section,
Program data section,
Program stack section
Which area of memory layout stores executable program instructions for execution by the CPU?
Program code section
Which area of memory layout stores program variables that aren’t local to functions, such as global and static variables?
Program data section
Which area of memory layout contains the heap?
Program data section
Define heap
a dynamic memory region for storing dynamically allocated variables
Which area of memory layout stores currently executing functions and keeps track of the chain of function calls?
Program stack section
What causes exception?
Internal errors in java virtual machine
Java methods must advertise exceptions they throw. How do they do this?
Requires the caller to either handle the exception with a try block, or state their method can throw the same exception
What are the 7 best practices for handling exceptions?
- Use exceptions for exceptional circumstances
- Use finally to clean up resource usage
- Resolve problem as close as possible to where problem occurs
- Don’t Bury (Swallow) Exceptions
- Do overzealous exception handling!
- Don’t do overzealous try blocks!
- Provide meaningful messages
How can we monitor our OS?
- Check your logs frequently
- Scan your processes frequently
- Scan your filesystem frequently
What’s one of the most common methods used to uniquely identify malware?
Hashing / Checksumming
Define dynamic analysis
monitored execution of a program
Does dynamic analysis cover the entire code?
No, not all paths are explored
List dynamic analysis techniques
advanced tools,
debuggers,
run-time analyzers,
string analyzers,
trace programs