Beruflich Dokumente
Kultur Dokumente
http://lms.nthu.edu.tw/course/22911/
Jia-Shung Wang
Department of Computer Science
National Tsing Hua University
2015/9/23
OS0-2015
2015/9/23
OS0-2015
Scoring
Midterm Exam
n Quiz
n Final Exam
n Exercises
n Term Projects
n
Office Hour
Friday
2015/9/23
9:00~10:00
OS0-2015
Term Projects
" Will be announced soon
2015/9/23
OS0-2015
Book Information
" http://codex.cs.yale.edu/avi/os-book/OS9/
n
Source codes
2015/9/23
OS0-2015
2015/9/23
OS0-2015
2015/9/23
OS0-2015
(2)
system
programs
(1)
kernel
Handling
char I/O
terminal
drivers
block I/O
demand paging
disk and tape
virtual
drivers
memory
memory controllers
physical memory
8
2015/9/23
OS0-2015
Overview (1)
pOperating systems are an essential part of any
computer system.
2015/9/23
OS0-2015
10
Overview (2)
2015/9/23
OS0-2015
11
Overview (3)
2015/9/23
OS0-2015
12
2015/9/23
OS0-2015
13
2015/9/23
OS0-2015
14
2015/9/23
OS0-2015
15
PART ONE
Chapter 1
Chapter 2
OVERVIEW
Introduction
Operating-System Structures
PART TWO
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
PROCESS MANAGEMENT
Processes
Threads
Process Synchronization
CPU Scheduling
Deadlocks
PART THREE
Chapter 8
STORAGE MANAGEMENT
Memory Management
2015/9/23
OS0-2015
16
Chapter 9
Virtual Memory
PART FOUR
Chapter 10
Chapter 11
Chapter 12
Chapter 13
STORAGE MANAGEMENT
Mass-Storage Structure
File-System Interface
File-System Implementation
I/O Systems
PART FIVE
Chapter 14
Chapter 15
PART SIX
Chapter 16
ADVANCED TOPICS
Virtual Machines
2015/9/23
OS0-2015
17
Chapter 17
Distributed Systems
PART SEVEN
CASE STUDIES
Chapter 18
Chapter 19
Chapter 20
Appendix A
Appendix B
Appendix
2015/9/23
OS0-2015
18
2015/9/23
OS0-2015
19
" 6(CPU Scheduling): Linux CFS scheduler and Windows usermode scheduling.
" 7 (Main Memory): swapping on mobile systems and Intel 32and 64-bit architectures. A new section for ARM architecture.
2015/9/23
OS0-2015
20
2015/9/23
OS0-2015
21
2015/9/23
OS0-2015
22
(2)
system
programs
(1)
kernel
Handling
char I/O
terminal
drivers
block I/O
demand paging
disk and tape
virtual
drivers
memory
memory controllers
physical memory
23
Operating-System Structures
" Operating System Services
" User and Operating-System Interface
" System Calls
" System Programs
" OS Design and Implementation
" Operating-System Structure
" OS Debugging, Generation and System Boot
2015/9/23
OS0-2015
24
OS0-2015
25
Historical Perspective
" Mainframe: Batch
" Mainframe: Multiprogramming
" Mainframe: Time-Sharing
" Computer-system Architecture
n
Single-processor Systems
w PCs
Multiprocessor Systems
w Parallel Systems or Tightly Coupled Systems
n
2015/9/23
Cluster Systems
OS0-2015
26
n
2015/9/23
27
$END
$RUN
$LOAD
$FNT
$JOB
data for the program
program to be compiled
2015/9/23
OS0-2015
28
2015/9/23
OS0-2015
29
2015/9/23
OS0-2015
30
Disk
Card Reader
Memory
Line Printer
CPU
Spooling
2015/9/23
OS0-2015
31
2015/9/23
OS0-2015
32
Mainframe: Multiprogramming
Batched Systems
" Spooling provides an important data structure: a job
2015/9/23
OS0-2015
33
Multiprogramming Systems
Several jobs are kept in main memory at the same
time, and the CPU is multiplexed among them. "
2015/9/23
OS0-2015
34
OS0-2015
35
Job Scheduling
Operating System
CPU Scheduling
Job 1
CPU
Job 2
Job 3
Job 4
2015/9/23
OS0-2015
Job pool
36
2015/9/23
OS0-2015
37
w finish
w waiting I/O
w a short period of time
OS0-2015
38
Time-sharing System
" CPU Scheduling and multiprogramming provide
OS0-2015
39
The Movement of OS
" MULTICS (1965-1970 MIT) for GE 645
" UNIX (Ken Thompson, 1970 Bell Lab) for DEC PDP-11, Clanguage
OS0-2015
40
Computer-system Architecture
" Single-processor Systems
n
PCs
2015/9/23
OS0-2015
41
Desktop Systems
2015/9/23
OS0-2015
42
Personal-Computer Systems
PCs: appeared in the 1970s, instead of maximizing
CPU and peripheral utilization, the systems opt for
maximizing user convenience and responsiveness.
" GUI
" Lack of file protection at first: destroy data, system
or even worldwide networks via virus mechanisms.
OS0-2015
43
w graceful degradation
2015/9/23
OS0-2015
44
n
n
2015/9/23
45
Shared dynamically
Among PEs
2015/9/23
OS0-2015
46
2015/9/23
OS0-2015
47
Multi-Core
" On-chip communication is faster than
between-chip communication
OS0-2015
48
A Dual-Core Design
other designs:
A combination of
local and shared caches
2015/9/23
blade servers:
Each bladeprocessor board
boots independently and
run its own OS.
OS0-2015
49
Clustered Systems
" Definition: Cluster computers share storage and are
closely linked via a local area network (LAN) or a
faster interconnect, such as InfiniBand.
2015/9/23
OS0-2015
50
Parallelization and
Distributed Lock Management
" Parallelization: divide a program in several
components and run in parallel
2015/9/23
OS0-2015
51
2015/9/23
OS0-2015
52
2015/9/23
OS0-2015
53
Dual-mode
" Dual-mode operation allows OS to protect itself and
other system components
n
n
kernel code
w Some instructions designated as privileged, only executable in kernel
mode
w System call changes mode to kernel, return from call resets it to user
2015/9/23
OS0-2015
54
System Structures
2015/9/23
OS0-2015
55
OS0-2015
56
System Implementation
" Traditionally written in assembly language, operating
systems can now be written in higher-level
languages.
is more compact
2015/9/23
OS0-2015
57
2015/9/23
OS0-2015
58