week 5 os theory Flashcards
what are the two valid os descriptions:
A program that acts as an intermediary between a ‘user’ of a
computer and the computer hardware
The one program that is at all times running on the computer,
with all else being systems programs and application programs
main fucntions of an os
resource allocator
control system
describe os as a resource allocator
Manages all hardware resources and decides between
conflicting requests for efficient and fair resource use
(e.g. accessing CPU, disk or other devices)
describe os as a control system
Controls execution of programs to prevent errors and
improper use of the computer (e.g. protects one user
process from crashing another)
define bootstrapping of os
Small bootstrap program is loaded at power-up or reboot
Typically stored in ROM or EPROM, generally known as
firmware (e.g. BIOS)
Initializes all aspects of the system (e.g. detects connected
devices, checks memory for errors, etc.)
Loads operating system kernel and starts its execution
ROM = Read Only Memory
EPROM = Erasable Programmable ROM
BIOS = Basic Input/Output System
what does ROM stand for
Read Only Memory
what does EPROM stand for
EPROM = Erasable Programmable ROM
what does BIOS stand for
BIOS = Basic Input/Output System
define sharing among reources in os (3 points )
Device controllers are hardware within laptop/computer
needed to connect to external resources
Bus (the ‘wire’) connects CPUs, device controller and memory
OS Kernel runs within the CPU and manages the devices
through the device controllers
define device contollers when sharing among resources
I/O devices and the CPU can execute concurrently
Each device controller (e.g. controller chip) is in charge of a
particular device type
Each device controller has a local buffer (i.e. memory store for
general data and/or control registers)
CPU moves data from/to main memory to/from controller
buffers (e.g. write this data to the screen, read coordinates
from the mouse, etc.)
I/O is from the device to local buffer of controller
Device controller informs CPU that it has finished its
operation by causing an interrupt
decribe aht an interrupt is
Interrupts can be implemented in different way, but a common
approach is through an interrupt vector
Interrupt Vector is a reserved part of the memory, tracking
which interrupts need to be handled
For each interrupt, the OS executes the appropriate ‘Interrupt
Service Routine’ to handle the interrupt
The address of the interrupted instruction is saved so original
processing can be resumed after completion of the interrupt
Software programs can also generate interrupts, through
system calls, for instance when an error occurs. A
software-generated interrupt is called a trap
what does main memory store
large storage media that cpu can access directly
what does secondry storage store
provides large non volatile storage capacity
give importat example of secondary storage
Important example: magnetic disks - rigid metal or glass
platters covered with magnetic recording material
Disk surface is logically divided into tracks, which are
subdivided into sectors
The disk controller determines the logical interaction between
the device and the computer
Today also often flash memory. However, same logical division
intro tracks and sectors still used
how do users interact with os
Users interact indirectly through a collection of system
programs that make up the operating system interface. The
interface could be:
A GUI, with icons and windows, etc. Nowadays, this is the
norm.
A command-line interface for running processes and scripts,
browsing files in directories, etc. For Computer Scientists only
how do processes interact with os
Processes (the programs in execution) interact with the
Operating System by making system calls into the operating
system kernel.
Though we will see that, for stability, such calls are not direct
calls to kernel functions
state the 4 processes os offers
Program execution
I/O operations
file system manipulation
Interprocess Communication (IPC)
what is program execution
The system must be able to load a
program into memory and to run that program, end execution,either normally or abnormally (indicating error)
what is i/o operations :
A running program may require I/O, which
may involve a file or an I/O device
File-system manipulation: Programs need to read and write
what is file system manipulation
programs need to read and write
files and directories, create and delete them, search them, list
file Information, permission management.
what is interprocess communication (IPC)
Allowing processes to
share data through message passing or shared memory
what are the fours services for os itself
Error handling
Resource allocation
Accounting
Protection and Security
what is error handling
managing errors like if function dives by zero etc
what is accounting
e.g. how much disk space is this or that user using? how much network bandwidth are we using?