You are on page 1of 36

Chapter 2

Operating System Overview

1
이 장에서 배울 것들…
 OS 간략한 소개

2.1 Operating System Objectives and Functions


2.2 The Evolution of Operating Systems
2.3 Major Achievements
2.4 Developments Leading to Modern Operating Systems
2.5 Virtual Machines
2.6 OS Design Considerations for Multiprocessor and
Multicore

2
2.1 Operating System Objectives
1. Convenience
– Makes the computer more convenient to use
2. Efficiency
– Allows computer system resources to be used in an
efficient manner
3. Ability to evolve
– Permit effective development, testing, and introduction
of new system functions without interfering with
service

3
Operating System as User/Computer Interface
 Services Provided by the Operating System
– Program development
– Program execution
– Access to I/O devices
– Controlled access to files
– System access
– Error detection and response
– Accounting

convenience
4
Computer Hardware and Software Structure

5
Operating System as Resource Manager
 Responsible for managing resources
– Resource Manager

 Functions same way as ordinary computer


software
 Operating system relinquishes control of the
processor 내주다

efficiency
6
7
Kernel
 Portion of operating system that is in main
memory
 Contains most frequently used functions
 Also called the nucleus

8
Ease of Evolution of Operating System

 Major reasons of OS evolution


– Hardware upgrades and New types of hardware
– New services
– Fixes

ability to evolve
9
2.2 Evolution of Operating Systems
 Simple Batch Systems
– Monitors Interrupt
processing
• Software that controls the sequence
of events Device drivers
monitor
• Batch jobs together Job sequencing

• Program branches back to monitor Control Language


Interpreter
when finished

User
Program
area

10
Hardware Features Simple Batch Systems

 Hardware features needed when Monitor


performs scheduling function
Interrupt
 Memory protection processing

– Do not allow the memory area containing Device drivers


monitor
the monitor to be altered Job sequencing
 Timer Control Language
– Prevents a job from monopolizing the Interpreter

system
 Privileged instructions
– Certain machine level instructions can only
be executed by the monitor User
 Interrupts Program
area
– Early computer models did not have this
capability

11
Modes of Operation Simple Batch Systems

 User program executes in user


mode Interrupt
processing
– Certain instructions may not be
Device drivers
executed monitor
Job sequencing
 Monitor executes in system Control Language
Interpreter
mode
– Kernel mode
– Privileged instructions are executed
User
– Protected areas of memory may be Program
area
accessed

12
Multiprogrammed Batch Systems
 I/O Devices Slow

13
Uniprogramming
 Processor must wait for I/O instruction to
complete before preceding

14
Multiprogramming
 When one job needs to wait for I/O, the
processor can switch to the other job

15
Multiprogramming

16
Example
JOB1 JOB2 JOB3
Type of job Heavy compute Heavy I/O Heavy I/O
Duration 5 min. 15 min. 10 min.
Memory required 50K 100 K 80 K
Need disk? No No Yes
Need terminal No Yes No
Need printer? No No Yes

Uniprogramming Multiprogramming
Processor use 22% 43%
Memory use 30% 67%
Disk use 33% 67%
Printer use 33% 67%
Elapsed time 30 min. 15 min.
Throughput rate 6 jobs/hr 12 jobs/hr
Mean response 18 min. 10 min.
time 17
Utilization Histograms

18
Time Sharing
 Using multiprogramming to handle multiple
interactive jobs
 Processor’s time is shared among multiple users
 Multiple users simultaneously access the system
through terminals
user2

user3
user1

processor

19
Batch Multiprogramming vs. Time Sharing

Batch Multiprogramming Time Sharing

Maximize Minimize
Principal objective
processor use response time

Source of directives Job control language commands Commands entered


to operating system provided with the job at the terminal

20
Evolution of Operating Systems
 Multiprogramming and time sharing raise new
problems for the OS
– What?

21
2.3 Major Achievements
 Processes
 Memory Management
 Scheduling and resource management

22
Process
 A program in execution
 An instance of a program running on a computer
 The entity that can be assigned to and executed
on a processor
 A unit of activity characterized by a single
sequential thread of execution, a current state,
and an associated set of system resources

23
Process
 Consists of three components
– An executable program (code)
– Associated data needed by the program
– Execution context of the program
• All information the operating system needs to manage the
process

24
Process

Context
Data
Code

25
Memory Management
 Process isolation
 Automatic allocation and management
 Support of modular programming
 Protection and access control
 Long-term storage

26
Virtual Memory – Memory Management
 Allows programmers to address memory from a
logical point of view
– Without regard to the amount of main memory
physically avaliable

27
Paging – Memory Management

 Allows process to be comprised of a number of


fixed-size blocks, called pages
 Virtual address is a page number and an offset
within the page
 Each page may be located any where in main
memory
 Dynamic mapping from virtual address to
physical address in main memory

28
page
Virtual Memory
frame

29
Virtual Memory Addressing

30
Scheduling and Resource Management
 Fairness
– Give equal and fair access to resources
 Differential responsiveness
– Discriminate among different classes of jobs
 Efficiency
– Maximize throughput, minimize response time, and
accommodate as many uses as possible

31
Key Elements of Operating System

32
2.4 Developments Leading to Modern OS

 Microkernel Architecture
– Running OS services in user mode, not kernel mode

 Multithreading
 Symmetric multiprocessing (SMP)

 Distributed OS

 Object-oriented design

33
2.5 Virtual Machines
 Virtualization
– Enable a single server to simultaneously run multiple
OS

Guest
OS Hyper-V
(Microsoft
Windows server virtualization)

VMware

34
Process VM
 Virtual platform for executing a single process
 Created when the process is created, terminated when
the process is terminated
 EX
– Java VM, .NET framework

35
System VM
 Single hardware platform can support multiple OS
environment simultaneously
– No logical separation of host OS
– Virtualizing software is HOST to a number of guest OSs.

36

You might also like