CP 226 Lecture 1a
CP 226 Lecture 1a
Lecture One
Reference Book :Chapter One and Two
What is an Operating System?
• A program that acts as an intermediary between a user of a computer and
the computer hardware
• Operating system goals:
• Execute user programs
• solving user problems easier
• Make the computer system convenient to use
• Use the computer hardware in an efficient manner
Computer System Structure
• 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
Four Components of a Computer System
OS Usage/Definition
• Hardware Abstraction
• Turn hardware into something that application can use
• OS is a resource allocator/Manager
• 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
Example
• ,
Example
• Without OS, all programmers need to take care of every nitty gritty detail of
HW
• Execution of program can be complex and tedious
• Program become hardware dependent
• Thus, Abstraction
OS as Resource Manager
OS as Resource Manager …
• OS must manage CPU, Memory, network, secondary Storage (HD) etc.
• Resource management
• Allow multiple apps to share resources
• Protects apps from each other
• Improves performance by efficient utilization of resources
• While sharing, the program should be isolated from each other
Operating System Definition (Cont.)
• No universally accepted definition
• “Everything a vendor ships when you order an operating system” is a good
approximation
• But varies wildly
• “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.
Computer Startup
• A computer to start running to get an instance when it is powered up or
rebooted it need to have an initial program to run
• The initial program is known as bootstrap need to be simple
• 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
System Calls
Example of System Calls
System Call Interfaces
Components of OS
Components of OS (Cont..)
.
OS Structure
OS Structure (Cont..)
Hybrid Kernel
• Read
Discussion Questions
• How OS provide HW abstraction to USER and application program?
• User space and Kernel space (discus)
• How does OS ensures isolation property among different processes?
• Why a programmer dos not need to care about the architecture of computer system
when writing a program?
• Monolithic , Microkernel and Hybrid kernel (discus)
• Why is it possible to have OS for mobile devices which has limited memory size?
Reading
• Read Chapter 1 and 2 from main reference book
• Attempt questions at the end of each chapter
• END of Part 1