Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operating Systems ( 操作系统原理 ) Text book: Text book:  Dinosaur book (恐龙书)  操作系统概念 ( 中译本 ) Teacher: Teacher:  郑扣根( Zheng Kougen )  Prof. Dr. Mr. … 

Similar presentations


Presentation on theme: "Operating Systems ( 操作系统原理 ) Text book: Text book:  Dinosaur book (恐龙书)  操作系统概念 ( 中译本 ) Teacher: Teacher:  郑扣根( Zheng Kougen )  Prof. Dr. Mr. … "— Presentation transcript:

1 Operating Systems ( 操作系统原理 ) Text book: Text book:  Dinosaur book (恐龙书)  操作系统概念 ( 中译本 ) Teacher: Teacher:  郑扣根( Zheng Kougen )  Prof. Dr. Mr. …  zhengkg@263.net.cn zhengkg@263.net.cn  zkg@cs.zju.edu.cn TA TA lxhzju@cs.zju.edu.cnlxhzju@cs.zju.edu.cn “OS Homework” lxhzju@cs.zju.edu.cn

2 Operating Systems ( 操作系统原理 ) Refs: Refs:  Kernighan and Pike, The UNIX Programming Environment, Prentice-Hall, 1984.  W.R. Stevens, Advanced Programming in the UNIX Environment, Prentice-Hall, 1992  W.R. Stevens, UNIX Network Programming I, Prentice-Hall, 1997.  W.R. Stevens, UNIX Network Programming II, Prentice-Hall, 1998.  www.kernel.org www.kernel.org

3 CHAPTER 1: INTRODUCTION What is an Operating System? What is an Operating System? Mainframe Systems Mainframe Systems Desktop Systems Desktop Systems Multiprocessor Systems Multiprocessor Systems Distributed Systems Distributed Systems Clustered System Clustered System Real -Time Systems Real -Time Systems Handheld Systems Handheld Systems Feature Migration Feature Migration Computing Environments Computing Environments

4 WHAT IS AN OPERATING SYSTEM? An operating system ( 操作系统 ) manages the computer resources, such as CPUs, Memories, Hard disks, and acts as an intermediary between the computer hardware and the computer user, manages the computer resources, such as CPUs, Memories, Hard disks, and acts as an intermediary between the computer hardware and the computer user, provides the system services to user programs, provides the system services to user programs, provides an environment for executing programs. provides an environment for executing programs.

5 What Is an Operating System? The components of a computer system

6 Hardware – provides basic computing resources (CPU, memory, I/O devices). Hardware – provides basic computing resources (CPU, memory, I/O devices). Operating system – controls and coordinates the use of the hardware among the various application programs for the various users. Operating system – controls and coordinates the use of the hardware among the various application programs for the various users. Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). Applications programs – define the ways in which the system resources are used to solve the computing problems of the users (compilers, database systems, video games, business programs). Users (people, machines, other computers). Users (people, machines, other computers).

7 What Is an Operating System? User view PC users ( PC 用户): The OS is designed to mostly for ease of use, with some attention paid to performance, and none paid to resource utilization. PC users ( PC 用户): The OS is designed to mostly for ease of use, with some attention paid to performance, and none paid to resource utilization. Mainframe or minicomputer users ( 大型机和小型机用 户 ) : The OS is designed to maximize resource utilization. Mainframe or minicomputer users ( 大型机和小型机用 户 ) : The OS is designed to maximize resource utilization. Workstation users (工作站用户): The OS is designed to compromise between resource utilization and individual usability. Workstation users (工作站用户): The OS is designed to compromise between resource utilization and individual usability. Handheld users (手持设备用户): Mostly for individual usability, but performance per amount of batter life is important as well. Handheld users (手持设备用户): Mostly for individual usability, but performance per amount of batter life is important as well.

8 What Is an Operating System? System view An operating system is a resource allocator (分配器) An operating system is a resource allocator (分配器) An operating system is a control program that manages the execution of user programs to prevent errors and improper use of the computer. An operating system is a control program that manages the execution of user programs to prevent errors and improper use of the computer. An operating system is to execute user programs and to make solving user problems easier. An operating system is to execute user programs and to make solving user problems easier. What is part of the OS What is part of the OS  An OS is anything a vendor ships.  An OS is the kernel (内核) part and all else are applications.  The matter of what constitutes an OS is becoming important (Microsoft case in 1998)

9 What Is an Operating System? System goals OS goals   Convenience: Make the computer convenient to use.   Efficiency: Use the computer hardware in an efficient manner. Building an OS is a complex task   Designing and implementation   Revising and updating   Hardware support. To find out What the OS is and what it does, let us trace the evolution (not revolution) of OS.

10 MAINFRAME SYSTEMS ( 大型机系统 ) No OS (无操作系统) No OS (无操作系统) Batched OS (批处理操作系统) Batched OS (批处理操作系统) Multiprogrammed OS (多道程序操作系统) Multiprogrammed OS (多道程序操作系统) Time-sharing OS (多时操作系统) Time-sharing OS (多时操作系统)

11 Mainframe Systems: No OS Designer, Implementer, Operator, User Designer, Implementer, Operator, User Designer, Implementer / Operator, User Designer, Implementer / Operator, User Drawbacks: Drawbacks:  Scheduling time  Setup time  slow

12 Mainframe Systems: Batch OS The OS The OS  was always resident in memory  automatically transferred control from one job to another. Batching: Batching:  Programmers submitted jobs in a job control languages (shell, awk, perl)  Operators batched together jobs with similar needs and ran them through the computer as a group. Drawbacks: Drawbacks:  fast CPU and slow I/O devices.

13 Mainframe Systems: Multiprogrammed OS Multiprogrammed OS (vs. uniprogrammed OS) Multiprogrammed OS (vs. uniprogrammed OS)  Keeping many jobs in memory (see the next slide)  Switching to another job if the CPU is idle  As long as at least one job needs to execute, the CPU is never idle. Multiprogrammed OS Multiprogrammed OS  Job scheduling for selecting a job to load into memory  CPU scheduling for selecting which job to run  Memory management  Protection. Drawback: not interactive Drawback: not interactive

14 Mainframe Systems: Multiprogrammed OS

15 Mainframe Systems: Time-sharing OS Memory sharing  multiprogramming Memory sharing  multiprogramming Memory sharing + time sharing  multiprogramming + interaction (or multi-tasking) Memory sharing + time sharing  multiprogramming + interaction (or multi-tasking) The CPU is rapidly multiplexed among several jobs that are kept in memory. (I/O operation is terribly slow!) The CPU is rapidly multiplexed among several jobs that are kept in memory. (I/O operation is terribly slow!) Time-sharing OS Time-sharing OS  Memory management (virtual memory) and protection  File system, disk management  Process synchronization ( 同步 ) and communication  Deadlock handling (死锁处理).

16 DESKTOP SYSTEMS Personal computers Personal computers  computer system dedicated to a single user.  I/O devices – keyboards, mice, display screens, small printers.  Individuals have sole use of computer and do not need advanced CPU utilization of protection features. User convenience and responsiveness not maximizing CPU and peripheral utilization User convenience and responsiveness not maximizing CPU and peripheral utilization Can adopt some of the technology developed for larger operating system. Can adopt some of the technology developed for larger operating system.  Not much of utilization  Protection, and so on Many possible OSes: (Windows, MacOS, UNIX, Linux) Many possible OSes: (Windows, MacOS, UNIX, Linux)

17 PARALLEL AND DISTRIBUTED SYSTEMS Two types Two types  Tightly coupled systems (紧耦合系统)  Parallel systems or multiprocessor systems  Processors share memory and a clock; communication usually takes place through the shared memory.  Loosed coupled systems (松耦合系统)  Distributed systems and clustered systems  Each processor has its own local memory; processors communicate with one another through various communications lines, such as high-speed buses or telephone lines.

18 Parallel and distributed systems: Parallel systems Advantages of parallel systems: Advantages of parallel systems:  Increased throughput  Economy of scale  Increased reliability  graceful degradation (The ability to continue providing service proportional to the level of surviving hardware). fail-soft systems (systems designed for graceful degration) Asymmetric multiprocessing (非对称处理) Asymmetric multiprocessing (非对称处理)  Master processor schedules and allocated work to slave processors.  Each processor is assigned a specific task;  More common in extremely large systems

19 Parallel and distributed systems: Parallel systems Symmetric multiprocessing (SMP) (对称处理) Symmetric multiprocessing (SMP) (对称处理)  Each processor runs an identical copy of the operating system.  Many processes can run at once without performance deterioration.  Most modern operating systems support SMP SMP and ASMP may be the result of either hardware and software SMP and ASMP may be the result of either hardware and software

20 Parallel and distributed systems: Distributed systems Advantages of distributed systems. Advantages of distributed systems.  Resources Sharing  Computation speed up – load sharing  Reliability  Communications Requires networking infrastructure. Requires networking infrastructure. Local area networks (LAN) or Wide area networks (WAN) Local area networks (LAN) or Wide area networks (WAN) May be either client-server or peer-to-peer systems. May be either client-server or peer-to-peer systems.

21 Parallel and distributed systems: Distributed systems

22 Parallel and distributed systems: Clustered systems (集群系统) Clustering allows two or more systems to share storage. Clustering allows two or more systems to share storage. Provides high reliability. Provides high reliability. Asymmetric clustering: one server runs the application while other servers standby. Asymmetric clustering: one server runs the application while other servers standby. Symmetric clustering: all N hosts are running the application. Symmetric clustering: all N hosts are running the application.

23 REAL-TIME SYSTEMS Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Often used as a control device in a dedicated application such as controlling scientific experiments, medical imaging systems, industrial control systems, and some display systems. Well-defined fixed-time constraints. Well-defined fixed-time constraints. Real-Time systems may be either hard or soft real-time. Real-Time systems may be either hard or soft real-time.

24 Real-Time Systems Hard real-time:  Secondary storage limited or absent, data stored in short term memory, or read-only memory (ROM)  Conflicts with time-sharing systems, not supported by general-purpose operating systems. Soft real-time Soft real-time  Limited utility in industrial control of robotics  Useful in applications (multimedia, virtual reality) requiring advanced operating-system features.

25 HANDHELD SYSTEMS Personal Digital Assistants (PDAs) ( 个人数字助理 ) Personal Digital Assistants (PDAs) ( 个人数字助理 ) Cellular telephones (手机 ), Pocket PC, … Cellular telephones (手机 ), Pocket PC, … Issues: Issues:  Limited memory  Slow processors  Small display screens.

26 OS FEATURE MIGRATION

27 COMPUTING ENVIRONMENTS Traditional computing Traditional computing Web-Based Computing Web-Based Computing Embedded Computing Embedded Computing


Download ppt "Operating Systems ( 操作系统原理 ) Text book: Text book:  Dinosaur book (恐龙书)  操作系统概念 ( 中译本 ) Teacher: Teacher:  郑扣根( Zheng Kougen )  Prof. Dr. Mr. … "

Similar presentations


Ads by Google