Lec 1
Lec 1
Lec 1
Lecture 1
Dr.Hend Mancy
IT MUST VISION
?
100 Marks = 50 (final exam) + 20 Midterm +10 Attendance
+20 Tasks
SYLLABUS
• It is a program.
• It is the first piece of software to run after the
system boots.
• It coordinates the execution of all other software.
• It provides various common services needed by
users and applications.
OPERATING SYSTEM DEFINITION
Short definition:
• a program that manages a computer’s resources and acts
as an intermediary between a user and those resources
computer
user application
operating system
application
user hardware application
OPERATING SYSTEM TERMINOLOGY
• Kernel
– Software component that controls the
hardware directly, and implements the core
privileged OS functions.
• Process
– An executing program.
OPERATING SYSTEM GOALS:
• 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 OPERATING SYSTEMS DO
Mobile Computing
• Handheld smartphones, tablets, etc
• What is the functional difference between them and a “traditional”
laptop?
o Extra feature – more OS features (GPS)
o Allows new types of Apps
o Use IEEE 802.11 wireless, or cellular data networks for connectivity
• As Apple IOS and Google Android
COMPUTING ENVIRONMENTS (CONT.)
Distributed computing
• Collection of separate, possibly heterogeneous
systems networked together.
Network Computing
• Dumb terminals supplanted by smart PCs
Many systems now servers, responding to
requests generated by clients
Compute-server system provides an
interface to client to request services (i.e.,
database)
File-server system provides interface for
clients to store and retrieve files
COMPUTING ENVIRONMENTS (CONT.)
Cloud Computing
• Logical extension of virtualization because it uses virtualization as the base for its functionality.
• E.g.Amazon, Microsoft Azure, and Google Cloud.
• Many types
• Public cloud – available via Internet to anyone willing to pay
• Private cloud – run by a company for the company’s own use
• Hybrid cloud – includes both public and private cloud components
Software as a Service (SaaS) – one or more applications available via the Internet
Platform as a Service (PaaS) – software stack ready for application use via the Internet
Infrastructure as a Service (IaaS) – servers or storage available over Internet (i.e., storage
available for backup use)
COMPUTING ENVIRONMENTS (CONT.)
• Operating systems made available in source-code format rather than just binary
closed-source
• Counter to the copy protection and Digital Rights Management (DRM)
movement
• Examples include Linux and UNIX (including core of Mac OS X), and many more
• Can use VMM like VMware Player (Free on Windows),Virtualbox (open source and
free on many platforms - http://www.virtualbox.com )
• Use to run guest operating systems for exploration
CPU EXECUTION MODES
• Interrupt Control
• Timer
• System Call
INTERRUPTS
• Type of interrupts polling & vectored (interrupt system)
• An operating system is interrupt driven
• Interrupt transfers control to the interrupt service
routine. generally, through the interrupt vector, which
contains the addresses of all the service routines.
• A trap or exception is a software-generated interrupt
caused either by an error or a user request.
INTERRUPT TIMELINE
TIMER
• Timer to prevent infinite loop / process hogging resources
• Timer is set to interrupt the computer after some time period
• Keep a counter that is decremented by the physical clock.
• Operating system set the counter (privileged instruction)
• When counter zero generate an interrupt, Set up before scheduling process to
regain control or terminate program that exceeds allotted time
OPERATING SYSTEM STRUCTURE
➢ Multiprogramming (Multi-jobs)
Single user cannot always keep CPU and I/O devices busy.
• 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 must wait (for I/O for example), OS switches to another job.
1. Increased throughput
2. Economy of scale
3. Increased reliability – fault tolerance
• Two types:
1. Asymmetric Multiprocessing – each processor is assigned a specie
task.
2. Symmetric Multiprocessing – each processor performs all tasks
SYMMETRIC MULTIPROCESSING ARCHITECTURE
HOW A MODERN COMPUTER WORKS
• File-System management
• Files usually organized into directories
• Access control on most systems to determine who can access what.
➢OS activities include
• Creating and deleting files and directories
• Primitives to manipulate files and directories (how to open)
• Mapping files onto secondary storage
• Backup files onto stable (non-volatile) storage media
STORAGE MANAGEMENT
• Usually disks used to store data that does not fit in main memory or
data that must be kept for a “long” period.
• Proper management is of central importance.
• Entire speed of computer operation hinges on disk subsystem and
its algorithms.
• OS activities
• Free-space management
• Storage allocation
• Disk scheduling
MIGRATION OF DATA “A” FROM DISK TO REGISTER