程序代写代做代考 assembly android IOS compiler file system Java Fortran gui Object-Oriented Programming

Object-Oriented Programming

Operating Systems

Lecture 1a

Dr Ronald Grau School of Engineering and Informatics Spring term 2018

Operating System – What’s that again?

1

 A piece of software (virtual machine)

 Provides abstractions from the hardware

 Provides the basic services for running other programs

 Gives us a user interface (the shell or GUI)

 Provides a programming interface (e.g., system calls)

 Protects any running programs

(including itself)

Operating System – What’s that again?

2

Module Overview

 Identify the main components of an operating system; understand their basic function.

 Understand and critically assess concepts and processes related to these components.

 Implement some operating system functions in software

Processes Threads

Virtualisation Process

Synchronisation

Process

Scheduling

Input / Output
Memory

management

File Systems

Security

3

Page

Replacement

Deadlocks Inter-Process

Communication

Module Prerequisites

 Introduction to Computer Systems

 Programming Concepts

 Further programming

4

About Myself

Ron Grau

School of Engineering and Informatics

Department of Informatics

Office: Chichester II, 2R 209

Office hour: Tuesday 12pm – 1pm

Friday 3pm – 4pm

(Appointments by e-mail)

E-mail: r.r.grau@sussex.ac.uk

5

Teaching Sessions

 Two lectures per week (FULTON B) – led by me

 Tuesday 11am

 Friday 11am

 One lab class per week (CHI1 014/015) – led by Mohammed Alasmar

 Monday 1pm – 2pm, or

 Monday 2pm – 3pm, or

 Tuesday 1pm – 2pm, or

 Friday 9am – 10am, or

 Friday 10am – 11am

You will have been assigned to one of the above sessions – check your timetable for details.

6

Module Timetable

Teaching: 6 February – 11 May Laboratory class : CHI1 014/015 (Lab 2)

Lectures : FULTON B

 Week

 Assignments

 Lab class

 Lectures

1 2 3 4 5 6 7 8 9 10 Year-end AP

Exam Report Project

7

R

11 12 E E

Pictures: wikipedia.org,telegraph.co.uk

Module Assessment

 Coursework (50% of total module marks)

 Coursework 1 (70% share): Research project & report.

Due in week 7: Thursday 22 March, 4pm.

 Coursework 2 (30% share): Theoretical essay (1500 words)

Due in week 12: Friday 11 May, 4pm.

 Unseen exam (50% of total module marks)

 Date TBA

Make sure to always double-check assessment deadlines in Sussex Direct.

8

How do I pass this module?

 The lecture notes / recordings will give you relevant pointers, but you need to do

more to succeed

 Successful students will normally

 Do the suggested readings and attempt to solve the self-study questions every week

 Prepare for and attend lab classes regularly

 Brush up on their programming skills independently, if necessary

 Do the exercises BEFORE solutions are posted, and review their work afterwards

 Explore the additional material and readings independently

 Make an effort in their coursework assignments

9

Readings

 Core text

Tanenbaum & Bos:

Modern operating systems, 4th edition

Physical copies in the library and online access

 Recommended text

Silberschatz, Galvin & Gagne:

Operating system concepts, 9th edition

Physical copies in the library

10

Readings

 Optional / more in-depth reading

Stallings:

Operating Systems, Internals and Design Principles

Physical copies of the third edition in the library

(latest: ninth ed.)

Love:

Linux Kernel development

Physical copies of the third edition in the library

and online access to an older edition

11

Software / Programming

 QEMU

Virtualisation platform for emulating different hardware devices and operating systems

 Netbeans / Java (majority of programming tasks)

For implementing different operating system parts, also for the first coursework assignment

 Others (incidental)

Notepad++ / NASM compiler: Assembly language

Notepad++ / gcc compiler: C

12

Let’s Get Started

Today: A brief introduction to operating systems

 A bit of history

 Ancient (20th century) systems

 Batch monitors

 Multi-programming and multi-tasking

 PCs and GUIs

 Mobile devices

 Basic concepts

 Abstraction

 Resources

 Protection

13

A bit of history

Humble beginnings: Relays and vacuum tubes

 1930s – 1960s digital computers

 Directly programmed with punched cards or by placing wires to connect to the

machine’s internal functions.

 No operating systems

14

ENIAC ZUSE Z3

A bit of history

Then, this happened:

15

A bit of history

Batch systems

 Invention of the transistor

allowed miniaturisation, and

eventually, integrated circuits

 1950s&60s mainframe systems

could cost millions of $$$

 Simple operating systems

for batch processing

 First programming languages

(e.g., FORTRAN)

16

An IBM 360 mainframe

A bit of history

Batch systems

 Instructions on punched cards are

copied onto tape and then

processed by the computer in

a “batch”

 Results are then printed out

on paper

17

A punched card

An IBM 360 rig in action

A bit of history

Commercial successes

 Integrated circuits become more widespread

 Minicomputers become more affordable for

businesses to use

 Still, we’re pushing buttons to enter machine code

directly

18

PDP “Mini” computer console Not really “Mini” by today’s standards

A bit of history

The problem with batch monitors

 System resources are not efficiently used

e.g., idle CPU during I/O operations

 What can we do?

Multi-programming is a solution

but brings additional problems

(e.g., scheduling, data integrity)

19

Interleaved execution of programs

A bit of history

Time-sharing and multi-tasking

 1970s terminals – interactive computing systems

 Multiple users share centralised resources, using

relatively cheap terminals

 Operating systems needed to handle a lot

of I/O data and coordinate processing

 Responsiveness is assured by time-sharing

 Today, the general concept has been revived

in cloud- and remote-computing, and more
generally, Software-as-a-Service (SaaS) scenarios.

Tip: Read about the story of MULTICS (Further resources on Study Direct)

20

A bit of history

From Mini to Micro: meet the personal computer

 We’re in the 1980s – computers get smaller and

affordable for small businesses and home users

 IBM asks the newly founded Microsoft company

to outfit their new IBM PC with MS-DOS

(Microsoft Disk Operating System)

 MS-DOS: hardware drivers & simple console shell

 Users enter commands with a keyboard

 Later, graphical user interfaces (GUI) became more common
with Apple’s Macintosh products and later also Microsoft’s Windows 3

operating system, and others (e.g., IBM OS/2, Linux).

21

A bit of history

Graphical shells

 The concept of a GUI with windows, icons, etc.

was originally developed by Xerox PARC

22

Windows 3.1
OS/2

Macintosh

A bit of history

Mobile devices

 Focus on networking and internet access

 “Smart” phones – different application focus and requirements

 Operating systems must adapt!

23

Palm OS (1996) Symbian OS (2000) Blackberry (2002) iOS (2007) Android (2008)

A bit of history

Moore’s “Law”

 Current technologies

& materials

are hitting limits

 Other technologies

emerge:

Parallel processing

GPUs
Computing clusters

24

Basic concepts

What do operating systems do?

 Virtual machine abstraction

 The pitfalls and dangers of multi-process scheduling and synchronisation are hidden

from applications and these programs don’t need to care about how they get access

to resources – they are free to “think” that they have the computer for themselves (CPU,

I/O, memory)

 Portability: Programs can run on different hardware devices

 Different devices can support the same physical interfaces

 Multiple levels of abstraction (e.g., file systems) for better performance or security

25

Basic concepts

What do operating systems do?

 Resource allocation

 Request handling

 Conflict management

 Protection

 From errors in programs

 From malicious software

As a result, operating systems are pretty complex pieces of software.

Tip: Compare the code bases of different kinds of software (Further resources on Study Direct)

26

Summary

Today: A brief introduction to operating systems

 A bit of history:

 How operating systems came about and developed over time

 A few basics about operating systems

 They offer a virtual machine abstraction to work with diverse hardware

 They make computers easier to program

 They manage resources for programs

 They offer protection for programs (and their users), and themselves

27

Read

 Tanenbaum & Bos., Modern Operating Systems

 Chapter 1

 Chapter 12

 Silberschatz et al., Operating System Concepts

 Chapter 1

 Chapter 2

28

Watch

 Lecture on Computers and Heuristics by Richard Feynman (1985)

 “Dumber but faster” – on how computers work on the inside

from the start, ca. 38 mins.

Prepare

 Review the basic content on

Microarchitectures,

Instruction set architectures,
Machine code and

Assembly language

from your Year 1 module “Introduction to Computer Systems“.

30

Next Lecture

 Introduction

 Operating System Architectures

 Processes

 Threads

 Process Scheduling

 Process Synchronisation

31

 Deadlocks

 Memory Management

 File Systems

 Input / Output

 Security and Virtualisation