• No results found

Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction

N/A
N/A
Protected

Academic year: 2021

Share "Outline. Operating Systems Design and Implementation. Chap 1 - Overview. What is an OS? 28/10/2014. Introduction"

Copied!
14
0
0

Loading.... (view fulltext now)

Full text

(1)

Operating Systems

Operating Systems - Winter 2012

Andrew S. Tanenbaum

Melanie Rieback

Arno Bakker

Design and Implementation

Vrije Universiteit Amsterdam

Outline

Vrije Universiteit Amsterdam Slide 4

Introduction

What is an OS?

Concepts

Processes and Threads

Memory Management

File Systems

Operating Systems 2012

Chap 1 - Overview

What is an Operating System?

Concepts

System Calls

Structure

Operating Systems 2012

What is an OS?

(2)

2 Views on OSes

Vrije Universiteit Amsterdam Slide 15

OS as a Virtual Machine

Extending the HW functionality

Hides the messy details of programming the HW

OS as a Resource Manager

Protects against simultaneous usage of resources

Fair sharing of resources (scheduling)

Resource accounting

Operating Systems 2012

How to View an OS

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 16

OS

Program

System calls

Concept: Processes

Operating Systems 2011

Multiple Processes

(3)

System Calls

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 27

Hardware

Operating System

System Calls

Libraries

Library functions

Applications / Processes

Instruction Set Architecture

•System Callsare the interface the Operating System offers to applications.

•Problem:Mechanics of issuing a system call are highly machine dependent

•Solution:Provide a library to allow system calls from C programs: libc

Bash

libc

Linux kernel

x86_64

System Calls: Process

Management (1/2)

Vrije Universiteit Amsterdam Slide 28

System Calls: Process

Management (2/2)

System Calls: Signals

(4)

Concept: Mounting (1/2)

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 23

File System Mounting (2/2)

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 24

Special Files (1/2)

Operating Systems 2011

Storage devices are mapped into the file tree via mounting. Idea: do this for all devices.

Mechanism: Special files in /dev

Two types:

Special Files (2/2)

(5)

System Calls: Files

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 31

System Calls: Directories

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 32

System Calls: Implementation

Operating Systems 2011

OS Structure: UNIX

(6)

OS Structure: Linux

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 38

Operating Systems

Operating Systems - Winter 2012

Chapter 2 - Processes

Vrije Universiteit Amsterdam

Chap 2 - Overview

Operating Systems 2012

Scheduling Processes

Threads

Recall: Process

Operating Systems 2012

(7)

One CPU, Many Processes

Vrije Universiteit Amsterdam Slide 3

Operating Systems 2012

• Processes share the CPU(s)

• A

scheduler

determines which process to run next

• Keeps track of the

process state

• Following some

scheduling policy

(random robin, shortest

job first, etc).

Process States

Vrije Universiteit Amsterdam Slide 5

Operating Systems 2012

Context Switching

Operating Systems 2011

Process Implementation

Operating Systems 2011

Process

Table:

ps -ef

(8)

Threads

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 10

Threads: Minimal Support

Operating Systems 2011

Vrije Universiteit Amsterdam Slide 11

Threads – Some Problems

Operating Systems 2011

Mutual Exclusion

(9)

Operating Systems

Operating Systems - Winter 2012

Chapter 4 – Memory Management

Vrije Universiteit Amsterdam

Chap 4 - Overview

Operating Systems 2012

Vrije Universiteit Amsterdam Slide 1

Memory Management

Paged Memory

Virtual Memory

Segmentation

Memory Management – Simple

Operating Systems 2012

Memory Management - Complex

Operating Systems 2012

(10)

Paged Memory Systems (1/2)

Operating Systems 2012

Vrije Universiteit Amsterdam Slide 15

Paged Memory Systems (2/2)

Vrije Universiteit Amsterdam Slide 17

Virtual Memory

Operating Systems 2012

Idea

: Not all virtual pages have to be in physical memory

Instead stored on

disk

-> cheap storage

In

swap

partition

Much more memory available

Works if not all pages are used at the same time

Segmentation

Operating Systems 2012

Stack

(11)

Operating Systems

Operating Systems - Winter 2012

Chapter 5 – File Systems

Vrije Universiteit Amsterdam

Chap 5 - Overview

Operating Systems 2012

Vrije Universiteit Amsterdam Slide 1

Files

Directories

File system implementation

UNIX/MINIX filesystem

Directories

Operating Systems 2012

i-node

File Attributes

(12)

Directories – Pathnames

Vrije Universiteit Amsterdam Slide 6

Operating Systems 2012

File System Design

Vrije Universiteit Amsterdam Slide 7

Operating Systems 2012

File Storage: Disk Layout

Operating Systems 2012

File Storage – Inodes

(13)

File Storage – UNIX

Vrije Universiteit Amsterdam Slide 13

Operating Systems 2012

File Storage – Name Resolution

Vrije Universiteit Amsterdam Slide 14

Operating Systems 2012

Disk Space Management (1/2)

Operating Systems 2012

File System Consistency

(14)

Buffer Cache

Vrije Universiteit Amsterdam Slide 20

Operating Systems 2012

Log-Structured File Systems

Vrije Universiteit Amsterdam Slide 21

Operating Systems 2012

MINIX Filesystem

Operating Systems 2012

MINIX Superblock

References

Related documents

All operating systems have various technologies in place to deal with the limited memory capacity of smart- phones, but both Android and BlackBerry OS get two stars instead of

The second method proposed in this dissertation was a decomposition method that enabled the simultaneous solution of both distributed and lumped components via FDTD and

Prevalence of TST positivity was compared between household contacts by HIV and ART status of the index case to distinguish those not on ART or on ART for ,1 year from those on ART

Hardinge Lathes Page 9 Square Shank Tool Holders: Left- & Right-hand Y-Axis.. CW CW1 CH1 T CH L S H

Between different imaging techniques with contrast-enhancement, contrast- enhanced ultrasound (CEUS) and, in particular, dynamic CEUS have arisen as a promising and

Combination therapy with intratumoral TNF-alpha administration was performed in two patients during the oral TMZ treatment and one patient with AE has been continuing to show

Notice received Cancellation fee Prior to final payment date Full refund Final payment date to 35 days prior to departure date 25% of tour price 34 days to 48 hours prior