Tải bản đầy đủ (.ppt) (83 trang)

Bài giảng nhập môn điện toán Hệ điều hành

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (5.19 MB, 83 trang )

Chương 3
Phần 1: Hệ điều hành
1.
2.
3.
4.
5.
6.

What is an operating system
History of operating systems
The operating system zoo
Computer hardware review
Operating system concepts
System calls

1


Tài liệu tham khảo: chương 1 của quyển
Andrew S. Tanenbaum: Modern Operating Systems,
2nd ed, Prentice Hall
/>
2


Giới thiệu

• A computer system consists of
– hardware
– system programs


– application programs
3


Hệ điều hành là gì?
• It is an extended machine
– Hides the messy details which must be performed
– Presents user with a virtual machine, easier to use
(by using system calls)

• It is a resource manager
– Multiplexing the resource in time: each program
gets time with the resource, e.g. CPU, printer
– Multiplexing the resource in space: each program
gets space on the resource, e.g. memory, disk

4


Lịch sử hệ điều hành
• First generation 1945 - 1955
– vacuum tubes, plug boards
– Inventors: Aiken (USA), Zuse (Germany)

• Second generation 1955 - 1965
– transistors
– batch systems

• Third generation 1965 – 1980
– ICs (Integrated Circuits)

– multiprogramming, spooling, time-sharing

• Fourth generation 1980 – present
– LSI (Large Scale Integration)
– Hệ điều hành cho PC
5


Lịch sử hệ điều hành
Thế hệ thứ 2

Early batch system (hệ thống xử lý bó)





bring cards to 1401
read cards to tape
put tape on 7094 that does computing
put tape on 1401 that prints output

6


Lịch sử hệ điều hành
Thế hệ thứ 2

Structure of a typical FMS job
(FMS: Fortran Monitor System, hệ điều hành của IBM cho mainframe 7094)

7


Lịch sử hệ điều hành
Thế hệ thứ 3
OS/360 của IBM
MULTICS (MIT, Bell Labs)

(Các vùng của bộ nhớ)

• Multiprogramming system
• Spooling (Simultaneous Peripheral Operation On Line)
• Time sharing
8


Lịch sử hệ điều hành
Thế hệ thứ 4

• 1974, first microcomputer
– Intel 8080, first general-purposed 8-bit CPU
– floppy disk
– CP/M (Control Program for Microcomputers)

• early 1980s, IBM PC
– DOS (Disk Operating System)
– MS-DOS (Microsoft Disk Operating System)

• 1983, IBM PC/AT (Intel 80286 CPU)
• 1985-1995, Windows on top of MS-DOS

• Pentium PC
– UNIX, Linux, Windows 2000
– X Windows system (UNIX, Linux)
9


The Operating System Zoo
• Mainframe operating systems

High-end Web servers

– OS/390

• Server operating systems

Web service, file service

– UNIX, Linux, Windows 2000

• Multiprocessor operating systems
• Personal computer operating systems
– Linux, Windows XP, Macintosh

• Real-time operating systems

Control systems

– VxWorks, QNX

• Embedded operating systems


Mobile phones

– uCLinux, PalmOS, Windows CE

• Smart card operating systems

Smart cards

10


Computer Hardware Review
Monitor

Bus

Các thành phần của một PC đơn giản
11


Computer Hardware Review
Processors

• Special registers
– Program counter
– Stack pointer
– Program Status Word (PSW)
• kernel mode
• user mode


• TRAP instruction
– System call
12


Computer Hardware Review
Memory (1)

Typical memory hierarchy
numbers shown are rough approximations
13


Computer Hardware Review
Memory (2)

Cấu trúc của một ổ đĩa cứng
14


Computer Hardware Review
Memory (3)

Một cặp base-limit

Hai cặp base-limit
15



Computer Hardware Review
I/O Devices
Device driver là gì?

(a)

(b)

(a) Steps in starting an I/O device and getting interrupt
(b) Interrupt processing
16


Computer Hardware Review
Buses

IDE bus
SCSI bus

Cấu trúc của một hệ thống Pentium
17


Các ý niệm chủ đạo trong hệ điều hành









Q trình (process)
Deadlock
Quản lý bộ nhớ (memory management)
Nhập/xuất dữ liệu (input/output)
Tập tin (file)
An ninh dữ liệu (security)
The shell
18


Các ý niệm chủ đạo trong hệ điều hành
Quá trình
Quá trình là một chương trình đang thực thi

Một cây quá trình (process tree)
– A đã tạo hai quá trình con, B và C
– B đã tạo ba quá trình con, D, E, và F
19


Các ý niệm chủ đạo trong hệ điều hành
Deadlocks

• Khi hai hay nhiều quá trình tương tác với nhau thì
chúng có thể lâm vào tình trạng deadlock
– Ví dụ: một máy tính với một ổ băng từ và một ổ ghi
CD. Hai quá trình A và B muốn ghi lên CD từ dữ liệu
trên băng từ






Q trình A u cầu và được cấp phát ổ băng từ
Quá trình B yêu cầu và được cấp phát ổ ghi CD
Quá trình A yêu cầu ổ ghi CD, bị tạm dừng
Quá trình B yêu cầu ổ băng từ, bị tạm dừng

20



×