Introduction Flashcards
What is an OS?
Most fundamental software that runs in kernel mode.
Runs on bare hardware and provides base for all other software.
What are the functions of an OS?
1) Providing application programmers a clean abstract set of resources instead of the messy hardware ones
2) Managing these hardware resources
What language are operating systems usually written in?
C
Kernel Mode
AKA supervisor mode. Complete access to all hardware, can execute any instruction machine is capable of
What are the two modes of operation of [most] computers?
User mode and kernel (or supervisor) mode
What is the program users interact with called?
Either
a) the shell: if text-based
b) GUI (graphical user interface): if icon-based
What is the lowest level of user-mode software?
UI program, shell or GUI
Are GUI and shell part of the OS?
No, but they use OS to get work done
What can user mode access?
User programs run in user mode, with only a subset of all instructions/features able to be executed
What is disallowed in user mode?
All instructions involving I/O and memory protection
How can user programs use services from the OS?
They must make a system call, which traps into kernel to invoke the OS. TRAP instruction switches from user to kernel mode and starts OS. Once complete, control is returned to user program at the instruction following the system call.
What are the two types of multiplexing? Which is more efficient?
1) Time: Programs take turns to use the CPU
2) Space: Programs share the resource
Space is more efficient, as multiple programs are held in memory at once, many of which will likely only take up a fraction of the resources
Does the OS know about registers?
An OS must know about all registers.
What happens to registers when OS stops running a program?
These registers must be saved and stored for later