Test 1 Flashcards
Operating System
software that runs on the bare hardware of a computer and provides essential support for users to develop and use applications in the most efficient and safe manner
Multiprogramming
a technique that keeps several programs to maximize the use of the CPU and other resources.
Time Sharing ( Multitasking )
an extension of multiprogramming where the CPU is switched periodically among all active computation to guarantee acceptable response time to each user
Is multiprogramming without interrupts?
Multiprogramming does not require interrupts. A context switch happens whenever a computation terminates or blocks to wait for I/O. The termination of an I/O operation can be detected periodically checking the device status.
Is time-sharing possible without interrupts?
Time-sharing requires a periodic interrupt to prevent long-running computations from monopolizing the CPU and thus delaying other computations for unpredictable amounts of time.
What do multiprogramming and time-sharing have in common?
What are the differences between the two?
Multiprogramming allows multiple programs to be active in memory simutaneously. While one is waiting for I/O completion or some other event, another can run on the CPU. The main objective is to increase CPU and device utilization.
Kernel
an os is the minimal set of functions necessary to manage the system resources safely and efficiently.
Privileged Instruction
performs critical operations that access I/O devices and the CPU’s status and control registers. Thus only the OS Kernel is allowed to execute privileged instructions
Kernel Mode
The CPU state where both privilege and non-privilege instruction may be used
User Mode
the CPU state where non-privilege instructions may be used. Any attempt to execute a privilege instruction in user mode automatically transfer control to the Kernel
OS Shell
a command interpreter that accepts and interprets textual commands issued by the user
Interrupt
an event that diverts the current execution of a program to a predefined location in the kernel in other to respond to an event. An interrupt is triggered by a hardware signal sent to the cpu from an external device
Most Common interrupts
Signal to O/S the completion of an I/O operation. The interrupt is generated by the I/O device.
Implement time-sharing by periodically switching the CPU among multiple concurrent computations. THe interrupt generated by a countdown timer
Trap
is an interrupt triggered by the currently executing instruction
Interrupt handler
is kernel function invoked whenever an interrupt occurs, that determines that cause of the interrupt and invokes the appropriate kernel function to provide the response
Process
is an instance of a program being executed by an O/S
Process Control Block (PCB)
a data structure that holds info for a process, including the current instruction address, the execution stack the set of resources used by the process, and the program being executed.
Context Switch
is the transfer of control from one process to another
New -> ready -> suspend -> blocked -> suspend
invalid process that went from ready to suspend must return rather than blocked
suspend -> blocked -> suspend -> clocked -> ready -> running
a suspend process goes back to a blocked state. Next, the process may be suspended again and later return back to the blocked state. When the resource becomes available, the process transition to ready. Finally from ready the process may go into runnning
Multiprogramming generally improves CPU utilization
Multiprogramming generally improves CPU utilization and throughput
True
The main objective of time-sharing is to improve resource utilization
False
Multiprogramming and time-sharing are not used togheter
False