COMP3361 Operating Systems I Mid-term Review and Study Guide Basic Concepts:
What is an operating system?
A program that acts as an intermediary between a user of a computer and the computer hardware
- basic functions?
1.) OS is a resource allocator
2.) manages all resources
3.) decides between conflicting requests for efficient and fair resource use
4.) OS is a control program
5.) controls execution of programs to prevent errors and improper use of the
6.) a program running at all times on the computer, usually called the kernel
7.)everything else is either a
a.) system program: associated with the OS but not part of the kernel
b.) application ...view middle of the document...
) I/O is from the device to local buffer of controller
3.) Helpful to user
a. Error detection, accounting , resource allocation, user interface, program execution, file system manipulation, protection and security
Q.) When you execute a system call mode changes from user mode to kernel mode, know the difference
1.) An interrupt transfers control to the interrupt service routine through the interrupt vector table, which contains the addresses of all the service routines
2.) Interrupt architecture must save the address of the interrupted instruction
3.) Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt
4.) An operating system is interrupt driven
5.) What happens?
a. The OS preserves the state of the CPU by storing registers and the program counter
b. The interrupt service routine is executed
c. On completion, the CPU resumes the interrupted computation
1.) The objective of multiprogramming is to have some process rum1ing at all times, to maximize CPU utilization.
2.) One job is selected and run via job scheduling
3.) When it has to wait (e.g. for I/O), OS switches to another job
1.) Timesharing (multitasking) is a logical extension of multiprogramming
2.) CPU switches jobs so frequently that users can interact with each job while it is running
3.) Response time should be < 1 second
4.) Each user has at least one program executing in memory
5.) If several jobs are ready to run at the same time, you need CPU scheduling
6.) If processes don’t fit in memory, swapping moves them in and out to run
7.) Virtual memory allows execution of processes not completely residing in memory
1.) increased throughput
2.) economy of scale
3.) increased reliability – graceful degradation or fault tolerant
4.) Two Types:
a. asymmetric multiprocessing -This asymmetric multiprocessing is simple because only one processor accesses the system data structures, reducing the need for data sharing.
b. symmetric multiprocessing-where each processor is self-scheduling. All processes may be in a common ready queue, or each processor may have its own private queue of ready processes
What is a system call?
1.) System calls provide the means for a user program to ask the operating system to perform tasks reserved for the operating system on the user programs behalf;
2.) How are parameters passed during a system call.
a. simplest: pass the parameters in registers may have more parameters than registers (not good if you have a chunk of code)
b. parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register .approach taken by Linux and Solaris
c. parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating system