overview

29
Overview This and the other PowerPoint files represent an outline only . Each student is responsible for additional details specified in the book or in class

Upload: hija

Post on 22-Feb-2016

20 views

Category:

Documents


0 download

DESCRIPTION

Overview. This and the other PowerPoint files represent an outline only . Each student is responsible for additional details specified in the book or in class. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Overview

Overview This and the other PowerPoint files represent

an outline only. Each student is responsible for additional details specified in the book or in class

Page 2: Overview

The web site [http://www.os-book.com/] has a collection of practice problems and solutions. At the end of each chapter, you should download the exercises, write the solutions and then check them against the published solutions.

Page 3: Overview

Chapter 1: What is an OS?

Coordinate access to resources Make hardware usable Allocate resources Schedule activities Control flow of information among hardware

components. Traffic cop

Page 4: Overview

What actually constitutes an OS is not that simple (see author’s comments on the second paragraph on page 6)

Page 5: Overview

Overview of a computer system: Fig 1.2 Machine Language instruction format (von

Neumann architecture). Fetch-analyze-execute cycle.

Fetch an instruction and store in the Instruction register

Analyze it Execute it, if possible

Registers: general, program counter, instruction register.

Page 6: Overview

Storage hierarchy: fig 1.4

Page 7: Overview

Types of environments Batch Time-sharing Interactive Real-Time Single-processor Multiprocessor

Page 8: Overview

Multiprocessor Asymmetric (master-slave model) Symmetric (processors are peers) – most common Clustered – like multiprocessor except consists of

2 or more entire systems coupled together. Clustered may mean different things to different people.

Page 9: Overview

Types of OS Single tasking Multitasking (sometimes called timesharing) Multiuser

Page 10: Overview

Interrupts vs. traps (exceptions). Interrupt: Occurrence of an event that requires

that the CPU be interrupted from what it is doing in order to execute an interrupt handling routine (e.g. completion of an I/O or a hardware failure)

Trap: an event typically caused by the CPU such as an attempt to divide by 0, numeric overflow, or illegal memory reference. Requires execution of a trap-handling routine.

Page 11: Overview

Dual modes (user mode; monitor, kernel, or supervisor mode) – defined by an internal CPU bit; privileged instructions.

Process: an entity capable of requesting and using computer resources. E.g. a program in execution.

Page 12: Overview

OS responsibilities Process management:

Creating/deleting processes. Process synchronization. Interprocess Communication. Suspending/resuming processes. Deadlock handling:

Page 13: Overview

Memory management: Allocation/deallocation of memory What processes go into memory and where What part of memory is occupied/available. Static/dynamic allocation

Page 14: Overview

Caching (paging, hardware caching). Security: protect memory from other processes.

Page 15: Overview

Scheduling Which processes run? For how long? Which have higher priority? Are they waiting for something?

Page 16: Overview

File management: Create/delete files Maintain directories Storing files on secondary storage File access File security Manage disk space (auxiliary storeage

management)

Page 17: Overview

Goals Consistency Scalability Ease of use Efficiency Throughput Responsiveness

Page 18: Overview

Above goals are often contradictory. Ease of use often implies guis which are NOT efficient. Linux is known to be stable and efficient, but not easy to use.

Best throughput may be obtained by ignoring certain activities, which means bad response times for them.

Page 19: Overview

Examples DOS Various windows flavors Various Unix flavors VMS MVS Mac

Page 20: Overview

Distributed systems: collection of processors, each with its own local memory, connected by high-speed lines.

Embedded systems: Most common – embedded in consumer devices (cars, DVDs, robotic arms, cell phones, ipods, etc)

Page 21: Overview

Client-server computing Peer-to-peer computing. Can skip this stuff.

Page 22: Overview

Chapter 2: Shell/command interpreter. Commands are

really files (e.g. ls, rm, cat, etc.) Interface: command line or gui. Linux flavors have various shells: Bourne

shell, C shell, Korn shell. They look alike but there are small differences.

We use the 2nd version of the Bourne shell. It’s called bash (Bourne Again Shell).

Page 23: Overview

System Calls: interface to service made available by the OS API (Application programmer interface): set of

functions available to the programmer. Examples: fopen, read, write, close, fork, wait,

exec, etc. Linux command handout has those we will use in

this class.

Page 24: Overview

Types of calls: fig 2.5 Can skip most of the stuff on system calls – not

needed for this stage of the course

Page 25: Overview

OS structure Simple structure: eg - DOS allowed programs

to access routines that write directly to display and drives. Vulnerable to crashes. Fig 2.10

Kernel: most critical components; like to keep resident in memory

Layered design: Fig 2.11 and 2.12 Basic design principle to insulate the needs of

a layer from the details of the next lowest layer

Page 26: Overview

Microkernel: As systems evolved, kernels grew larger. Removes all nonessential components from

the kernel and implements as system or user level programs.

Not always consensus on everything kernel should contain.

Page 27: Overview

Linux and Mac OS use a modular kernel. See example in Fig. 2.13

Windows XP is a layered system of modules (Figure 22.1)

Page 28: Overview

Virtual machine: Abstraction of hardware components. Illusion of having your own machine. Can be useful for testing OS

changes/enhancements. More secure (each application runs on it's

own "machine") IBM's VM operating system. Server virtualization.

Page 29: Overview

Java – more than just a language Language spec - the stuff you learned API – support for graphics, I/O, database

connectivity, networking, server apps, support for telephones, pagers, etc.

Virtual machine spec. Java Virtual Machine (JVM) – Fig 2.17