Presentation is loading. Please wait.

Presentation is loading. Please wait.

Operating Systems.

Similar presentations


Presentation on theme: "Operating Systems."— Presentation transcript:

1 Operating Systems

2 OBJECTIVES After reading this chapter, the reader should be able to:
Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the concept of virtual memory. Understand the concept of deadlock and starvation. List some of the characteristics of popular operating systems such as Windows 2000, UNIX, and Linux.

3 Computer System

4 7.1 DEFINITION

5 Definition Some common definitions:
An interface between the hardware of a computer and the user (programs or humans) A program that facilitates the execution of other programs Acts as a general manager supervising the activity of each component in the computer system

6 Definition Note: An operating system is an interface between the hardware of a computer and the user (program or human) that facilitates the execution of the other programs and the access to hardware and software resources Major design goals: Efficient use of hardware Easy to use resource

7 7.2 EVOLUTION

8 Evolution Operating systems have gone through a long history of evolution Batch systems: only ensured all of the resources were transferred from one job to the next Time-sharing systems(multiprogramming): each job can be allocated a portion of time to use the resource Personal systems: DOS Parallel systems: multiple CPUs on the same machine Distributed systems: a program can be run partially on one computer and partially on another computer

9 7.3 COMPONENTS

10 Components of an operating system

11 Memory manager -- Monoprogramming
The memory manager loads the whole program into memory, run it, and replaces it with the next program Several problems: If the size of memory is less than the size of the program cannot be run When one program is being run, no other program can be executed

12 Memory manager -- Multiprogramming
More than one program is in memory at the same time Executed concurrently CPU switches between the programs Several improvements

13 Categories of multiprogramming

14 Partitioning Memory is divided into variable length sections. Each section holds one program The CPU switches between program

15 Partitioning Partitioning improves the efficiency of the CPU, but still some issues: Partition sizes are small, some program cannot be loaded; Partition sizes are large, some holes in memory There may be some holes after programs are replaced by new ones Compact partitions to remove the holes might create extra overhead

16 Paging

17 Paging Improve the efficiency of the partitioning
Memory is divided into equally sized sections called frames Program is divided into equally sized sections called pages A page is loaded into a frame in memory The program does not have to be contiguous in memory

18 Demand paging & Demand segmentation
Paging does require the entire program be in memory for execution Demand paging removed the restriction The pages can be loaded into memory one by one, executed, and replaced by another page Program is usually made of a main program and subprograms. In demand segmentation, the program is divided into segments that match the programmer’s view It technique similar to demand paging

19 Virtual memory Demand paging and demand segmentation mean that part of the program is in main memory and part is on the disk when a program is being executed

20 Process manager Three terms that refer to a set of instructions
Program: a nonactive set of instructions written by a programmer and stored on disk Job: from it is selected for execution until it has finished running and becomes a program again Process: a program in execution

21 State diagram with the boundaries between a program, a job, and a process

22 Job scheduler Job scheduler moves a job from the hold state to the ready state or from the running state to the terminated state

23 Process scheduler Process scheduler moves a process from one state to another

24 Queues for process management
The process manager uses queues to handle multiple processes and jobs that competing with each other for computer resources.

25 Process synchronization
Resource management Whenever resources can be used by more than one user Deadlock starvation

26 Deadlock Note: Deadlock occurs when the operating system does not put resource restrictions on processes.

27 Deadlock on a bridge Four necessary conditions for deadlock:
Mutual exclusion Resource holding No preemption Circular waiting

28 Starvation Starvation can happen when the operating system puts too many resource restrictions on a process

29 Starvation

30 Starvation

31 Classic starvation problem: Dining philosophers

32 Device manager The responsibilites of device manager
monitors every I/O device to assure the device is functioning properly Maintains a queue for each I/O device or one or more queue for similar I/O devices control the different policies for accessing I/O device.

33 File manager The responsibilities of file manager
controls access to files. (read or write) supervises the creation, deletion, and modification control the naming of files supervises the storage of files archiving and backups

34 User interface Each operating system has a user interface
It is a program that accepts requests from users (process) and interprets them for the rest of the operating system UNIX: shell Windows: window (menu driven and GUI)

35 7.4 POPULAR OPERATING SYSTEMS

36 Popular operating systems
Windows 2000 UNIX Linux


Download ppt "Operating Systems."

Similar presentations


Ads by Google