Lecture 1 Flashcards
What is an Operating System?
A program that acts as an intermediary between a user of a computer and
the computer hardware.
What is operating systems goals?
• Execute user programs and make solving user problems easier
• Make the computer system convenient to use
• Use the computer hardware in an efficient manner
Explain the four components of the computer system?
->Computer system can be divided into four components:
• Hardware – provides basic computing resources
• CPU, memory, I/O devices
• Operating system
• Controls and coordinates use of hardware among various applications and users
• Application programs – define the ways in which the system resources are used to
solve the computing problems of the users
• Word processors, compilers, web browsers, database systems, video games
• Users
• People, machines, other computers
Explain the definitions of the operating system:
• OS is a resource allocator
• OS is a control program
-> OS is a resource allocator:
• Manages all resources
• Decides between conflicting requests for efficient and fair
resource use
-> OS is a control program:
• Controls execution of programs to prevent errors and improper
use of the computer
What is Kernel?
-> “The one program running at all times on the computer” is the kernel.
• Everything else is either
• a system program (ships with the operating system) , or
• an application program.
What is bootstrap program and Where is it stored?
-> bootstrap program is loaded at power-up or reboot
• Typically stored in ROM or EPROM, generally known as firmware
• Initializes all aspects of system
• Loads operating system kernel and starts execution
How CPU access the shared memory?
• One or more CPUs, device controllers connect through common bus providing
access to shared memory
Can I/O devices and the CPU can execute concurrently?
I/O devices and the CPU can execute concurrently
How the device controller informs the CPU that it has finished its operation?
Device controller informs CPU that it has finished its operation by causing
an interrupt
Interrupt transfers control to the interrupt service routine generally,
through the ………. ………., which contains the addresses of all the
………. ……….. .
Interrupt transfers control to the interrupt service routine generally,
through the interrupt vector, which contains the addresses of all the
service routines
What is a Trap or Exeption?
A trap or exception is a software-generated interrupt caused either by an
error or a user request.
How the operating system preserves the state of the CPU?
• The operating system preserves the state of the CPU by storing registers
and the program counter
Determines which type of interrupt has occurred:
• polling
• vectored interrupt system
• Separate segments of code determine what action should be taken for each
type of interrupt
• Main memory?
Main memory – only large storage media that the CPU can access directly
• Random access
• Typically volatile
Secondary storage?
Secondary storage – extension of main memory that provides large
nonvolatile storage capacity
Hard disks?
Hard 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
Solid-state disks?
• Solid-state disks – faster than hard disks, nonvolatile
• Various technologies
• Becoming more popular
Storage systems organized in hierarchy write down what are they?
Storage systems organized in hierarchy
• Speed
• Cost
• Volatility
Caching?
Caching – copying information into faster storage system; main memory can
be viewed as a cache for secondary storage
Device Driver?
Device Driver for each device controller to manage I/O
• Provides uniform interface between controller and kernel
Faster storage (………) checked first to determine if information is there
• If it is, information used directly from the …….. (fast)
• If not, data copied to …….. and used there
Cache
What is multi programming (Batch system)?
Multiprogramming : Multiprogramming operating system allows to execute multiple processes by monitoring their process states and switching in between processes. It executes multiple programs to avoid CPU and memory underutilization. It is also called as Multiprogram Task System.
• Single user cannot keep CPU and I/O devices busy at all times
• Multiprogramming organizes jobs (code and data) so CPU always has one to execute
• A subset of total jobs in system is kept in memory
• One job selected and run via job scheduling
• When it has to wait (for I/O for example), OS switches to another job