Operating Systems Midterm Flashcards
operating system definition
a program that acts as an intermediary b/w a user of a computer and the computer hardware
operating system goals
execute user programs and make solving user problems easier, make the computer system convenient to use, use computer hardware efficiently
computer system can be divided into four components
hardware, operating system, application programs, users
bootstrap program definition
the first program that a computer will run when you push its power button
what does a bootstrap program do
initializes the hardware system, loads the OS kernel, and starts execution
where is the bootstrap program located
read-only memory (ROM) or EPROM, aka firmware
volatile
loses its contents when power to the device is removed (ex: main memory)
nonvolatile
loss of power does not result in loss of content (ex: solid-state disks, magnetic disks, optical disks, magnetic tapes; also flash memory and NVRAM, which is DRAM with battery backup power)
software-generated interrupt
code error (exception) or system call (trap)
hardware-generated interrupt
keyboard, insert ethernet cord
cache
a temporary storage system for easy/faster access to recently used information
when new information is needed but not in the cache, what will happen?
it will be loaded into the cache
two design issues for cache
size and management/replacement
if the cache size is too big
too expensive
if the cache size is too small
slows down performance
cache management/replacement refers to
figuring out when to remove or replace data in the cache
cache coherency
in multi-processor systems, multiple CPUs, each with own cache; copies of same data on different caches should be kept updated
asymmetric architecture
one CPU/machine standby (as a master) to monitor/control others (as slaves)
symmetric architecture
monitor each other (in cluster), equal role to run tasks, tasks may be divided evenly among CPUs/computers
how does the OS protect itself from other system components?
dual mode and timer
dual mode
refers to kernel mode and user mode: trap in user mode, then switch to kernel mode to the OS so that the OS can check about the privileged instruction to see if it should be executed or not, return from trap generated interrupt and go back to user mode
timer
set the timer to interrupt periodically so OS can check if a program uses too much CP time (e.g., infinite loop) – terminate if so, otherwise return CPU control back to the program
what is the unit of work in a system?
a process
difference between a program and a process
process: an initiated program; a program loaded into main memory and in execution
a program is passive while a process is active
to execute a program, what must happen?
its instructions and data must be in main memory
cloud computing
delivers computing, storage, and applications as services across a network
CLI stands for ? and allows ?
command-line interface; it allows direct command entry to be performed by the OS
GUI stand for ? and allows ?
graphical user interface; it allows user-friendly desktop metaphor interface (usually mouse, keyboard, and monitor; icons represent files, programs, actions, etc.)
application programmers typically use ? rather than directly invoking system calls
an API
Android uses the ? virtual machine to run Java programs
Dalvik
does C use classes and objects?
no
pointer
a variable whose value is the address of another variable