CS计算机代考程序代写 data structure compiler android concurrency algorithm PowerPoint Presentation

PowerPoint Presentation

Slide 1

Week 05 – Introduction to Operating Systems

Slide 2

This week and the coming weeks

◆Introduction to OS and its Elements

◆Computer Systems Architecture and OS Structures

◆Process Management

◆Process Scheduling

◆Multithreading and its Challenges

◆Concurrency and Synchronization

◆Deadlocks

Week 5

Week 8

Week 7

Week 6

Slide 3

Lecture Objective

To develop a basic understanding of what is an

operating system and why do we need it?

Slide 4

Reading Material

◆ A lot of this course will be based upon material from the

following books:

◼ Operating System Concepts (9th edition) by Silberschatz, Galvin &

Gagne

◼ Operating Systems: Internals and Design Principles (7th edition) by

&

◼ The Linux Command Line: A Complete Introduction (1st edition) by

(2012) (Electronic Book only)

◼ It is recommended that you read these to supplement what you will

learn in the lectures

◆ There are also lots of great research papers available

online – any material covered from these will be linked to

from Canvas.

Slide 5

Why learn Operating Systems?

◆ A modern education in Computer Science would be

incomplete without studying these topics

◆ Knowledge of the above strengthens the practical

appreciation of other parts of your courses:

◼ Software Workshop

◼ Implementation of Data Structures & Algorithms

◼ Systems Programming

◆ Needless to say, it is very interesting!

Slide 6

A brief history of Computer Science at Birmingham

◆ Computing at University of

Birmingham can be traced

back to the KDF9 computing

system

◼16K words of memory

◼Magnetic tape decks for

storage

◼20k transistors

◼Paper tape input and output

Worth a Thousand Words (1967)

Slide 7

Slide 8

A room plan for KDF9 deployment

Slide 9

1968: The KDF9 in the

Slide 10

1968: An operator works on the KDF9

Slide 11

The Role of Human Operator

◆ Each program had to be keyed in
by hand to control the system

function required.

◆ There were few programs to read
or write from a keyboard or a disk

◆ Distinct lack of monitors (screens)
or keyboards

◆ The operators (the people in the
pictures) controlled all

◼ Loaded magnetic tapes

◼Fed in cards/paper tape

◼Maintained the system

Slide 12

The Role of Human Operator

◆ Operators worked in shifts

◼Fed in cards/paper tape

◼Approximately 40 hours per week,

per shift.

◼ In 1967, only a single operator.

◼By 1970, four shifts operated on

the system

◆ Laborious

◆ Expensive

◆ Tedious

◆ Error-prone

Slide 13

The Role of Human Operator

◆ As time progressed, the

University installed faster and

more powerful computers.

◆ However, the limiting factor was

the role of the operators

◆ An automatic system was

required to free the operators

from the mundane tasks

◆ Hence, the arrival of the

Operating System

1976: The ICL 1906A (pictured)

replaced the KDF9

Slide 14

What is an Operating System?

Operating systems are those programs that interface the machine

with the applications programs. The main function of these systems is

to dynamically allocate the shared system resources to the

executing programs. As such, research in this area is clearly

concerned with the management and scheduling of memory,

processes, and other devices. But the interface with adjacent levels

continues to shift with time. Functions that were originally part of the

operating system have migrated to the hardware. On the other side,

programmed functions extraneous to the problems being solved by the

application programs are included in the operating system.

—WHAT CAN BE AUTOMATED?: THE COMPUTER SCIENCE AND

ENGINEERING RESEARCH STUDY,

MIT Press, 1980

Slide 15

What is an Operating System?

◆ An Operating System is a program or collection of programs
that makes it easier for us to use a computer.

◆ An Operating System provides simpler abstraction of the
underlying hardware.

◆ An Operating System is resource manager.

Examples:

◼ DOS, OS/2, Windows XP, Windows 2000

◼ Ubuntu, FreeBSD, Fedora, Solaris, Mac OS

◼ iOS, Android, Symbian OS, Lynx OS

Slide 16

What is an Operating System?

◆ It is a layer of system software that acts as an

intermediary between a computer user and the

computer’s hardware.

◆ From a user’s perspective:

◼ It is designed for ease of use – it hides the hardware

complexity:

► Executing user programs

► Convenient interface

◆ Resource Utilization does not appear to be important!

Slide 17

What is an Operating System?

◆ From the perspective of the system:

◼The OS is closely involved with the hardware

◼ It can be viewed as a Resource Manager (Allocator)

► CPU time, memory space, file-storage space, I/O devices etc.

► Requests for resources may be numerous, and conflicting.

◆ It can also be seen as a control system between the

I/O devices and the user’s programs.

◆ Managing the execution to prevent errors and

improper use.

Slide 18

Objectives of an Operating Systems

◆ A program that controls the execution of application

programs

◆ An interface between applications and hardware

Main Objectives of an OS:

• Convenience

• Efficiency

• Ability to Evolve

Slide 19

The Components of a Computer System

◆ Hardware: basic computing resources

◆ Operating system: controls and coordinates use of

hardware amongst applications and users

◆ Application programs: define the ways in which the

system resources are used to solve computing

problems: compilers, text editors, email clients, webs

browsers, games

◆ Users: people, machines and other computers

Slide 20

The Components of a Computer System

System and application programs

Operating System

Computer Hardware

user 1 user 2 user n

compiler text editor web browser

Slide 21

A Modern Computer System

CPU
Disk

Controller

USB

Controller

Graphics

Adaptor

(GPU)

Memory

Slide 22

Operating System Services

◆ Program development

◆ Program execution

◆ Access I/O devices

◆ Controlled access to files

◆ System access

◆ Error detection and response

◆ Accounting

Slide 23

Role of an Operating System

◆ A computer is a set of resources for the movement,

storage, and processing of data and for the control of

these functions.

◆ The OS is responsible for managing these resources

Normally, we think of a control mechanism as something

external to that which is controlled.

Example: Heating System and Thermostat

Slide 24

Operating System as a Resource Manager

Slide 25

Evolution Operating Systems

Serial
Processing

Simple Batch
Systems

Multiprogrammed
Batch Systems

Time Sharing
Systems

Slide 26

Serial Processing

EARLIEST COMPUTERS:

❖ No operating system

❖ Programmers

interacted directly with

the computer hardware

❖ Computers ran from a

console with display lights,

toggle switches, some form

of input device, and a

printer

❖ Users have access to the

computer in “series”

PROBLEMS:

Scheduling

❖ Most installations used a

hardcopy sign-up sheet to

reserve computer time

❖ Time allocations could run

short or long, resulting in

wasted computer time

Setup time

❖ A considerable amount of time

was spent just on setting up the

program to run

Slide 27

Simple Batch Systems

Early computers were very expensive

◆ Important to maximize processor utilization

Monitor

◆ User no longer has direct access to processor

◆ Job is submitted to computer operator who batches them

together and places them on an input device

◆ Program branches back to the monitor when finished

Slide 28

Role of a Monitor

◆ Monitor controls the sequence

of events

◆ Resident Monitor is software

that always resides in memory

◆ Monitor reads in job and gives

control

◆ Job returns control to monitor

Slide 29

Role of a Monitor

◆ Processor executes instruction from the memory

containing the monitor

◆ Executes the instructions in the user program until it

encounters an ending or error condition

◆ “control is passed to a job” means processor is fetching

and executing instructions in a user program

◆ “control is returned to the monitor” means that the

processor is fetching and executing instructions from the

monitor program

Slide 30

Simple Batch Systems – Monitor Overhead

Processor time alternates between execution of user

programs and execution of the monitor

Sacrifices:

◆ Some main memory is now given over to the monitor

◆ Some processor time is consumed by the monitor

Despite overhead, the simple batch system improves

utilization of the computer

Slide 31

Uniprogramming

The processor spends a certain amount of time executing,

until it reaches an I/O instruction; it must then wait until that

I/O instruction concludes before proceeding.

Slide 32

Multi-programming

There must be enough memory to hold the OS (resident

monitor) and one user program

When one job needs to wait for I/O, the processor can

switch to the other job, which is likely not waiting for I/O

Slide 33

Time Sharing Systems

◆ Can be used to handle multiple interactive jobs

◆ Processor time is shared among multiple users

◆ Multiple users simultaneously access the system

through terminals, with the OS interleaving the

execution of each user program in a short burst or

quantum of computation

Slide 34

Summary

◆ The Role of Human Operator

◆ How monitor replaced the human operator and

evolved into an Operating System

◆ Operating System as a Resource manager

◆ Evolution of Operating Systems from Serial to Time

Sharing Systems

Slide 35

References / Links

◆Chapter # 1: Operating System Concepts (9th

edition) by Silberschatz, Galvin & Gagne