Chapter 1: Introduction Flashcards
Operating Systems
what are operating systems?
- software that manages a computer’s hardware
- provides a basis for application programs
- acts as an intermediary
between the computer user and the computer hardware.
What are the four components of computer systems?
- hardware
- operating system
- application programs
- user
what are the basic computing resources for the systems provided by the HARDWARE?
- central processing unit
- memory
- input/output devices
what are the application programs?
- word processors,
- spreadsheets,
- compilers,
- web browsers
what do the application programs do?
they defines the ways in which these resources are used to solve users’ computing problems.
why doe we need operating systems?
The operating system controls the hardware and coordinates its use among the various application programs for
the various users.
there are two ways to look at the operating systems, what are they?
- User view - Top down view
- System view - bottom up view
what are the some of the keys of user view?
the operating system is made for ease of use
and not for resource utilization
usually are phones and tablets
using the touch screen or the audio search
OS abstracts away hardware detail in order to ease the use of the
involved hard- and software. Maximize the work the user performs.
Draw a user view diagram:
user <–> application programs (compilers, web browsers) <–> operating systems <–>computer hardware (CPU, memory, I/O)
key takeaways from system view:
operating system is the program most intimately involved with the hardware.
OS is a resource allocator and manages all of the resources, it will also decide between conflicting requests for efficient and fair use
OS is a control program and controls the execution of programs to prevent errors and improper use of the computers
in system view we can view an operating system as a?
resource allocattor
What is a resource allocator?
any resource that may be required to solve a problem
- cpu time
- memory space
- storage space
- I/O devices
what does a control program do?
manages the execution of user programs to prevent errors and improper use of the computer.
It is especially concerned with the operation and control of I/O devices.
Goals of the operating system are?
- make computer system convenient to use
- use the computer hardware and software resources in an efficient manner
what is a common way to explain what OS is?
OS is the one program that is running at all time called Kernel
How can we conclude what operating systems consists of?
the operating system includes the always running kernel,
The middleware frameworks that ease application development and provide features,
and system programs that aid in managing the system while it is running
what is system programs?
deals with resources managed by the OS
What is an application program?
its extra stuff that are installed seperately
What are the main components of a modern general-purpose computer system?
One or more CPUs (Central Processing Units) and a number of device controllers connected through a common bus
What is the role of a device controller in a computer system?
A device controller is responsible for managing specific types of devices
(e.g., disk drives, audio devices, graphics displays)
Maintaining local buffer storage
Using special-purpose registers to move data between peripheral devices and its local buffer storage.
How do operating systems interact with device controllers?
Operating systems typically have a device driver for each device controller, which provides a uniform interface to the device for the rest of the operating system.
What ensures orderly access to shared memory in a computer system?
A memory controller synchronizes access to the shared memory, allowing the CPU and device controllers to compete for memory cycles in an orderly manner.
What initiates an I/O operation in a computer system?
The device driver initiates an I/O operation by loading the appropriate registers in the device controller.
What role does the device controller play in an I/O operation?
The device controller examines the contents of the loaded registers to determine the action to take (e.g., reading a character from the keyboard),
starts the data transfer from the device to its local buffer, and informs the device driver upon completion of the operation.
How does the device driver respond after the completion of an I/O operation?
the device controller informs the device driver that it has finished its operation
The device driver then gives control to other parts of the operating system, returning the data or a pointer to the data if the operation was a read
What mechanism is used by the device controller to inform the device driver about the completion of its operation?
The device controller informs the device driver about the completion of its operation through an interrupt.
What purpose does an interrupt serve in the context of I/O operations?
An interrupt is used to notify the device driver that the device controller has finished its operation, allowing the CPU to respond promptly to events such as completed I/O operations.
How are interrupts triggered in a computer system?
Hardware can trigger an interrupt at any time by sending a signal to the CPU, usually through the system bus, which serves as the main communication path between major components.
What happens when the CPU is interrupted?
When the CPU is interrupted, it halts its current task and immediately transfers execution to a fixed location, typically containing the starting address of the service routine for the interrupt.
Illustrate the transition from user mode to kernel mode
The transition from user mode to kernel mode, also known as a mode switch, occurs when a user process requests a privileged operation, such as accessing hardware or executing system-level instructions.
This transition is typically facilitated by software interrupts, system calls, or exceptions.
When triggered, the CPU switches from executing user-mode instructions to executing privileged kernel-mode instructions, granting access to protected resources and functionalities.
After completing the privileged operation, the CPU returns to user mode to resume executing user-level code.
How are interrupt service routines managed efficiently?
A table of pointers to interrupt routines, known as an interrupt vector, is used for efficient handling.
This table allows direct access to the appropriate service routine without the need for intermediate routines, ensuring quick handling of interrupts.
What is the significance of saving and restoring the processor state during interrupt handling?
The interrupt architecture must save the state information of the interrupted process to ensure proper restoration once the interrupt is serviced. If the interrupt routine modifies the processor state, it must explicitly save and restore the state to ensure the interrupted computation resumes seamlessly.
Describe the basic mechanism of interrupts in a computer system.
- The CPU senses the interrupt-request line after executing each instruction.
- Upon detecting an interrupt signal from a device controller, the CPU reads the interrupt number and jumps to the corresponding interrupt-handler routine using the interrupt vector.
- The handler saves any state it will be changing, processes the interrupt, restores the saved state, and returns the CPU to its previous execution state.
What are the three features needed for interrupt handling in modern operating systems?
- Ability to defer interrupt handling during critical processing.
- Efficient dispatching to the proper interrupt handler for a device.
- Support for multilevel interrupts to distinguish between high- and low-priority interrupts and respond accordingly.
I/O devices and the CPU can execute ——
concurrently (at the same time)
Each device controller is in charge of a particular —–
device type
What storage component does each device controller possess for the data currently undergoing input or output?
Each device controller has a local buffer for the data that is currently subject to input or output.
How does the CPU transfer data between the local buffers of a device controller and main memory during input and output operations?
he CPU copies data via the bus between the local buffers of a device controller and main memory for inputting and outputting data.
Where does the actual input/output operation take place in a computer system?
The actual input/output operation occurs between the local buffer of the controller and the physical input/output device.
What action does an interrupt perform on the CPU’s execution flow?
An interrupt transfers control from any instruction currently executed by the CPU to the interrupt service routine.
What does an interrupt vector contain, and what purpose does it serve?
An interrupt vector, which is an array or table in main memory, holds the addresses of all the service routines for each type or priority of interrupt. It helps direct the CPU to the appropriate service routine when an interrupt occurs.
Describe the process of handling interrupts
when interruption happen, the CPU executes the interrupt service routine. After completion of the routine, the CPU resumes the interrupted computation.