Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Operating Systems Layer

Similar presentations


Presentation on theme: "The Operating Systems Layer"— Presentation transcript:

1 The Operating Systems Layer

2 Outline Definition Categories of Software Operating systems
System Software Application Software Operating systems

3 Objectives Define software. List the functions of system software.
List the commonly used application software. Describe operating system. Explain the evolution of operating systems. Explain how the operating system serves as the memory manger, process manager, device manager, and file manager. Recognize different operating systems

4 part 1 DEFINITION

5 Big picture

6 What is software? A computer has no intelligence of its own and must be supplied with instructions that tell it what to do and how and when to do it. These instructions are called Software. The U.S Copyright Act of 1980 defines software as “a set of statements or instructions to be used directly or indirectly in a computer in order to bring about a certain result.”

7 What is software? We define software as the instructions and associated data, stored in electronic format, that direct the computer to accomplish a task. “Software” is a plural noun, so there is no such thing as “softwares” or “one software”. People use “software package” to describe a particular example of software.

8 programs, data and software
A computer program is a set of detailed, step-by-step instructions that tells a computer how to solve a problem or carry out a task. Software is made up of a group of related computer programs, if those programs work together to carry out a task. Software also can include data, but data alone is not software. 软件(中国大陆及香港用语,台湾作软体)是一系列按照特定顺序组织的计算机数据和指令的集合。一般来讲软件被划分为系统软件、应用软件和介于这两者之间的中间件。其中系统软件为计算机使用提供最基本的功能,但是并不针对某一特定应用领域。而应用软件则恰好相反,不同的应用软件根据用户和所服务的领域提供不同的功能。 软件并不只是包括可以在计算机上运行的程序,与这些程序相关的文档一般也被认为是软件的一部分。简单的说软件就是程序加文档的集合体。

9 part 2 CATEGORIES OF SOFTWARE

10 Software categories Computer software can be classified into 2 categories: System Software Application Software System software is the general manager that helps the computer carry out its basic operating tasks. Application software is your servant that helps the human user carry out a specific task. 系统软件 系统软件是负责管理计算机系统中各种独立的硬件,使得它们可以协调工作。系统软件使得计算机使用者和其他软件将计算机当作一个整体而不需要顾及到底层每个硬件是如何工作的。 一般来讲,系统软件包括操作系统和一系列基本的工具(比如编译器,数据库管理,存储器格式化,文件系统管理,用户身份验证,驱动管理,网络连接等方面的工具)。 应用软件 应用软件是为了某种特定的用途而被开发的软件。它可以是一个特定的程序,比如一个图像浏览器。也可以是一组功能联系紧密,可以互相协作的程序的集合,比如微软的Office软件。也可以是一个由众多独立程序组成的庞大的软件系统,比如数据库管理系统。

11 Software categories

12 system software System software deals with the physical complexities of computer hardware. It consists of four kinds of programs: operating systems, utilities, device drivers, and language translators. System software tells the computer how to interpret data and instructions; how to communicate with peripheral equipment like printer, keyboard and disk drives; how to manage files; how to use the hardware in general; ……

13 system software Operating systems are programs that operate your microcomputer. They coordinate computer resources, provide an interface between users and the computer, and run applications. It resides in RAM. It includes BIOS, which manages the essential peripherals.

14 system software Utilities, also known as service programs, perform specific tasks related to managing computer resources or files. They are used to support, enhance, or expand existing programs in a computer system. They include programs to help users identify hardware problems, locate lost files (data recovery), and backup data. 各种服务性程序(如机器的调试、故障检查和诊断程序等)

15 system software Device drivers are specialized programs designed to allow particular input or output devices to communicate with the rest of the computer system. Language translators convert the programming instructions written by programmers into a language that computers understand and process. 英文名为“Device Driver”,全称为“设备驱动程序”是一种可以使计算机和设备通信的特殊程序,可以 说相当于硬件的接口,操作系统只有通过这个接口,才能控制硬件设备的工作,假如某设备的驱动程序未能正确安装,便不能正常工作 所有的硬件设备都需要安装相应的驱动程序才能正常工作。但像CPU、内存、主板、软驱、键盘、显示器等设备却并不需要安装驱动程序也可以正常工作,而显卡、声卡、网卡等却一定要安装驱动程序,否则便无法正常工作。这是为什么呢?   这主要是由于这些硬件对于一台个人电脑来说是必需的,所以早期的设计人员将这些硬件列为BIOS能直接支持的硬件。换句话说,上述硬件安装后就可以被BIOS和操作系统直接支持,不再需要安装驱动程序。从这个角度来说,BIOS也是一种驱动程序。但是对于其他的硬件,例如:网卡,声卡,显卡等等 却必须要安装驱动程序,不然这些硬件就无法正常工作。 计算机上运行高级语言程序就必须配备程序语言翻译程序,翻译程序本身是一组程序,不同的高级语言都有相应的翻译程序。 计算机在执行程序时,首先要将存储在存储器中构成程序的指令逐条取出,经过译码后向计算机的各部件发出控制信号,使其执行规定的操作。目前、一般的程序都是用计算机的CPU不能直接识别的程序设计语言,如Visual Basic,Delphi,C++等来编写的。这样的非机器语言程序必须经过翻译,变成机器指令后才能被计算机执行。而负责这种翻译的程序被称为编译程序(编译系统)或解释程序。为了在计算机上执行由某种程序设计语言编写的程序,就必须配置相应的语言处理系统

16 application software Application software (the user’s tools) is software that performs tasks to directly benefit or assist the user. Some types of application software: Word processing Spreadsheet applications Presentation graphics Database management Web browsing Games

17 Computer System Hardware User interface
Home/personal software Education reference software User interface Other system software components Entertainment software specialty software Operating System Hardware Productivity software Misc. software

18 part 3 OPERATING SYSTEMS

19 Functions of OS Every computer has an operating system, and every operating system performs three basic functions: managing resources providing a user interface running applications.

20 Functions of OS Resources: These programs coordinate all the computer's resources including keyboard, mouse, printer, monitor, storage devices, and memory.

21 Functions of OS User interface: Users interact with application programs and computer hardware through a user interface. Almost all operating systems today provide a windows-like graphical user interface (GUI) in which graphic objects called icons are used to represent commonly used features. .

22 Functions of OS Applications: These programs load and run applications such as word processors and spreadsheets. Most operating systems support multitasking, or the ability to run more than one application at a time.

23 Two kinds of user interfaces
The user interface is the part of the operating system with which we are most familiar. This is the part of the operating system we interact with when using the computer. The two most common types of user interfaces are command-line interfaces and graphical interfaces.

24 two kinds of user interfaces
Command-line Interfaces All early computers used command-line interfaces. With this type of interface, you must type the exact command you wish to execute. One of the most widely used command-line interfaces for microcomputer is DOS. This type of interface is not considered user friendly. You must memorize the commands and type them without any spelling errors. Otherwise, they do not work. Win98以前是真正的DOS,因为Win98以前的Windows是以DOS为基础的图形界面操作系统。到了Win2000以后,是以NT为基础的操作系统,其中的命令提示符实际上是模拟DOS环境。

25 Two kinds of user interfaces
Graphical User Interfaces When the user turns on the computer and starts the operating system, a symbolic desktop is displayed. On this desktop are various objects, or icons. These graphical symbols represent files, disks, programs, and other objects. GUIs permit the user to manipulate these on-screen icons. Most people use a pointing device such as a mouse to click on the icons and execute the commands.

26 Common operating systems
DOS Command-driven DOS—short for Disk Operating System—was very popular in the 1980s and early 1990s and runs primarily on PCs (IBM and IBM-compatible). IBM's version of DOS is called PC-DOS and Microsoft's version of DOS is called MS-DOS. Both were developed by Microsoft, and they are essentially the same.

27 Common operating systems
Windows By far the most popular microcomputer operating system is Microsoft's Windows with over 90 percent of the market. Windows is designed to run with Intel and Intel-compatible microprocessors such as the Pentium III, and IV. It comes in a variety of different versions including Windows 98, Windows 2000 , Windows XP and Windows Vista,…… Microsoft公司推出Windows 1.0。 Windows 3.0发布 Windows 95发布,这是不要求MS-DOS的第一个Windows版本,且被看作是一个用户界面相当友好的操作系统。

28 Common operating systems
OS/2 OS/2 is IBM's multitasking graphical user interface operating system designed to work with 32-bit microprocessors. However, due to some management and marketing disasters, IBM failed to increase its market share against Windows. Nowadays, only some businesses use OS/2. OS/2是Microsoft公司和IBM公司合作于1987年开发的配置在PS/2微机上的图形化用户界面的操作系统。

29 Common operating systems
UNIX UNIX is the oldest operating system still used today. UNIX is a multiuser, multitasking operating system with built-in networking capabilities. Because it can run with relatively simple modifications on most types of computers—from micros to minis to mainframes—UNIX is called a portable operating system. 由于它只需要做小量的修改就能在很多计算机上进行使用,称为可移植的操作系统. 上世纪六十年代时,大部分计算机都是采用批处理(Batch Processing)的方式(也就是说,当作业积累一定数量的时候,计算机才会进行处理)。那时,我们熟知的美国电话及电报公司(American Telephone and Telegraph Inc.;AT&T)、通用电器公司(General Electrics;G.E.)及麻省理工学院(Massachusetts Institute of Technology;MIT)计划合作开发一个多用途(General-Purpose)、分时(Time-Sharing)及多用户(Multi-User)的操作系统,也就是这个MULTICS,其被设计运行在GE-645大型主机上。不过,这个项目由于太过复杂,整个目标过于庞大,糅合了太多的特性,进展太慢,几年下来都没有任何成果,而且性能都很低。于是到了1969年2月,贝尔实验室(Bell Labs)决定退出这个项目。 肯·汤普逊(左)和丹尼斯·里奇(右) 贝尔实验室中的有个叫Ken Thompson的人,他为MULTICS这个操作系统写了个叫“Space Travel”的游戏,在MULTICS上经过实际运行后,他发现游戏速度很慢而且耗费昂贵 —— 每次运行会花费75美元。退出这个项目以后。他为了让这个游戏能玩,所以他找来Dennis Ritchie为这个游戏开发一个极其简单的操作系统。这就是后来的Unix。(值得一提的是,当时他们本想在DEC-10上写,后来没有申请到,只好在实验室的墙角边找了一台被人遗弃的Digital PDP-7的迷你计算机进行他们的计划,这台计算机上连个操作系统都没有,于是他们用汇编语言仅一个月的时间就开发了一个操作系统的原型)他们的同事Brian Kernighan非常不喜欢这个系统,嘲笑Ken Thompson说:“你写的系统真差劲,干脆叫Unics算了。”Unics的名字就是相对于MULTICS的一种戏称,后来改成了Unix。 PDP-7

30 Common operating systems
Linux Linux is a version of UNIX. Linus Torvalds developed Linux in 1990 while he was a computer science student at Helsinki University in Finland. He developed it as freeware, offering UNIX's power without the hefty price. Free Linux versions can be downloaded from hundreds of Internet sites.

31 Common operating systems
Mac OS The Mac OS is designed to run on Macintosh computers. While its market share is much less than that of Windows, it is a very powerful and easy-to-use operating system. Mac computers make up about 4% of the personal computer market. 1976 1997年Mac OS Unix内核 76年Apple I 史蒂夫,沃兹尼克

32 Common operating systems
NetWare Novell's NetWare is a widely used network operating system designed for client-server networks. NetWare has a server portion that resides on the network server and a client portion that resides on each client computer connected to the network. 客户/服务

33 Possible future trend Nothing stands still, everything is changing.

34 Evolution of OS Batch systems Time-sharing systems Personal systems
Each program to be executed is called a job. Time-sharing systems Multiprogramming Time sharing Scheduling Process Personal systems Parallel systems Distributed systems Parallel systems ,多个CPU;

35 Components of an OS

36 Memory manager Memory allocation must be managed to prevent the “running out of memory” syndrome. Monoprogramming: one single program is in memory for execution.

37 Memory manager In multiprogramming, more than one program is in memory at the same time, and they are executed concurrently. The CPU switches between programs.

38 Memory manager

39 Partitioning In this scheme, memory is divided into variable length sections. Each section or partition holds one program. The CPU switches between programs.

40 Paging In paging, memory is divided into equally sized sections called frames. The program is divided into equally sized sections called pages. The size of a page and a frame is usually the same and equal to the size of the block used by the system to retrieve information from a storage device.

41 Demand paging In demand paging, the program is divided into pages, but the page can be loaded into memory one by one, executed, and replaced by another page. In other words, memory can hold one page from multiple programs at the same time.

42 Demand segmentation In demand segmentation, the program is divided into segments that match the programmer’s view. These are loaded into memory, executed, and replaced by another module from the same or a different program.

43 Demand paging and segmentation
A segment may be too large to fit any available free space in memory. Memory can be divided into frames, and a module can be divided into pages. The page of a module can then be loaded into memory one by one and executed.

44 Virtual memory Virtual memory, which implies demand paging, demand segmentation, or both, is used in almost all operating systems.

45 Process manager A program is a nonactive set of instructions written by a programmer and stored on disk (or tape). It may or may not become a job. A program becomes a job from the moment it is selected for execution until it has finished running and becomes a program again. During this duration, a job may or may not be executed. A process is a program in execution. It is a program that has started but has not finished. A process is a job that is residing in memory.

46 State diagrams

47 Schedulers To move a job or process from one state to another, the process manager uses two schedulers: The job schedulers(page131) The process schedulers(page131)

48 Queuing There are many jobs and many processes completing with each other for computer resources. To handle multiple processes and jobs, the process manager uses queues (waiting lists). Associated with each job or process is a job control block or process control block that stores information about the job or process.

49 Queuing The process manager can have different policies for selecting the next job or process from a queue: First in, first out (FIFO) Shortest length first The one with the highest priority etc.

50 Process synchronization
The whole idea behind process management is to synchronize different processes with different resources. Whenever resources can be used by more than one user (processes in this case), you can have two situations: deadlock and starvation.

51 Deadlock

52 Deadlock Deadlock occurs when the operating system does not put resources restrictions on processes. 4 necessary conditions for deadlock: Mutual exclusion (only one process can hold a resource) Resource holding ( a process holds a resource even though it cannot use it until other resources are available) No preemption (the OS cannot temporarily reallocate a resource) Circular waiting (all processes and resources involved form a loop) necessary conditions v.s. sufficient conditions

53 Starvation Starvation is the opposite of deadlock.
It can happen when the OS puts too many resource restrictions on a process. For example, imagine an OS that specifies possession of all the required resources before a process can be run. dinning philosophers

54 Device manager The device manager, or I/O manager, is responsible for access to I/O devices. The device manager monitors every I/O device constantly to assure that the device is functioning properly. The manager also needs to know when a device has finished serving one process and is ready to serve the next process in the queue. The manager maintains a queue for each I/O device or one or more queues for similar I/O devices. The manager controls the different policies for accessing I/O devices.

55 File manager A file manager is responsible for access files.
Controls accesses to files. Supervises the creation, deletion, and modification of files. Control the names of files. Supervises the storage of files, how they are stored, where they are stored, etc. Is responsible for archiving and backups. access means read/write/execute…

56 Objectives Define software. List the functions of system software.
List the commonly used application software. Describe operating system. Explain the evolution of operating systems. Explain how the operating system serves as the memory manger, process manager, device manager, and file manager. Recognize different operating systems

57 That’s all for this chapter!


Download ppt "The Operating Systems Layer"

Similar presentations


Ads by Google