Operating System
•A program that controls the
execution of application programs.
An interface between applications
and hardware.
•Responsible for managing
resources.
•Functions same way as ordinary
computer softwareIt is a program
that is executed.
•Operating system relinquishes
control of the processor.
Operating System Objectives
•Convenience.
•Efficiency.
•Ability to evolve.
Layers and Views
•End user.
-Application programs
•Programmer.
-Utilities.
-Operating System.
•Operating System Designer.
-Computer Hardware.
Services Provided by the OS
•Program development.
-Editors and debuggers.
•Program execution.
•Access I/O devices.
•Controlled access to files.
•System access.
•Error detection and response.
-Internal and external hardware
errors
-Software errors.
-Operating system cannot grant
request of application.
•Accounting.
-Collect usage statistics.
-Monitor performance.
I/O manage
1. Proc essor/CPU.
2. Memory/RAM.
3. File System.
4. Input/Output (I/O) Devices.
5. Network Interface.
6. Security Subsystem.
7. Processes and Threads.
8. Schedulers.
9. Device Drivers.
10. User Interface.
Kernel
The Kernel Also called the nucleus
is a portion of operating system
that is in main memory contains
most frequently used functions.
Evolution of Operating Systems
•Hardware upgrades plus new
types of hardware.
•New services.
•Fixes.
•Serial processing
-No operating system.
-Schedule time.
•Simple batch system
-Monitor
•Software that controls the
sequence of events.
•Batch jobs together.
•Program returns control to
monitor when finished.
Job Control Languag
•is the special type of
programming language provides
instruction to the monitor.
-What compiler to use.
-What data to use.
Hardware Feature
•Memory protection
-Does not allow the memory area
containing the monitor to be
altered.
•Timer.
-Prevents a job from
monopolizing the system.
•Privileged instructions.
-Certain machine level
instructions can only be executed
by the monitor.
•Interrupts.
-Early computer models did not
have this capability.
Memory Protection
•User program executes in user
mode.
•Monitor executes in system
mode.
System Utilization Example:
Read one record from file=15 μs
Execute 100 instructions=1µs
Write one record to file=15µs
TOTAL=31µs
Percent CPU
Utilization=1/31=0.032-3.2%
Uniprogramming
The processor must wait for I/O
instruction to complete before
proceeding.
Multiprogramming
Is the When one job needs to wait
for I/O, the processor can switch
to the other job.
Time Sharing Systems
Is define as the Multiple users
simultaneously access the
system through terminals. OR
The processor’s time is shared
among multiple users.
Major Achievements
•Processes.
•Memory management.
•Information protection and
security.
•Scheduling and resource
management.
•System structure.
Process
Process is a program in
execution.
OR
An instance of a program running
on a computer Called Process.
The Process Consists of three
Components:
(1)An executable program.
(2)Associated data needed by the
program.
(3)Execution context of the
program.
Note:All information of the
operating system needs to
manage the process
Difficulties with Designing System
Software
•Improper synchronization.
•Failed mutual exclusion.
•Non determinate program
operation.
•Deadlocks.
Memory Management
•Process isolation.
•Automatic allocation and
management.
•Support of modular
programming.
•Protection and access control.
•Long-term storage
Virtual Memory
•Implements long-term store.
•Information stored in named
objects called files.
•Allows programmers to address
memory from a logical point of
view.
Paging
Allows process to be comprised of
a number of fixed-size blocks,
called pages.
Information Protection and
Security
•Availability.
•Confidentiality.
•Data integrity.
•Authenticity.
Scheduling and Resources
Management
•Fairness.
•Differential responsiveness.
•Efficiency.
Key Elements of an Operating
System:
•Service Call Handler (code).
•Interrupt Handler (code).
•Short-Term Scheduler (code).
System Structure
•View the system as a series of
levels.
•Each level performs a related
subset of functions.
Levels
•Level 1:
-Electronic circuits.
Objects are registers, memory
cells, and logic gates.
-Operations are clearing a
register or reading a memory
location.
•Level 2:
•Processor’s instruction set.
•Operations such as add, subtract,
load, and store.
•Level 3:
-Adds the concept of a procedure
or subroutine, plus call/return
operations.
•Level 4:
-Interrupts
Concepts Related to
Multiprogramming
•Process as a program in
execution
Deal with External Objects
•Communication of information
and messages between
processes.
Modern Operating Systems
•Microkernel architecture.
•Interprocess communication
(IPC).
•Multithreading.
•Symmetric multiprocessing
(SMP).
-All processors can perform the
same functions.
•Distributed operating systems.
•Object-oriented design.