Operating Systems

Anuncio
Operating Systems
Rafael Ramirez (T, S)
rafael.ramirez@upf.edu
55.316
Sergio Giraldo(P, S)
sergio.giraldo@upf.edu
Matteo Segnorini (P, S)
matteo.segnorini@upf.edu
T=Teoria; S=Seminarios; P=Prácticas
Operating Systems – Introduction
Slide 1
Operating Systems
Calendario Curso en:
Ø  Web de la ESUP
Operating Systems – Introduction
Slide 2
Operating Systems
Topics:
1. Operating System introduction - Introduction, operating system components, types of systems, …
2. Process Management
- Processes & threads, process synchronization, CPU scheduling, …
3. Memory Management
- Main Memory, virtual memory
4. Storage Management
- File-system interface, file-system implementation
5. I/O systems & security
- I/O hardware, application I/O interface, security threats
Operating Systems – Introduction
Slide 3
Operating Systems
Evaluation:
Examen teoría
Prácticas
Seminarios
60%
30%
10%
se ha de aprobar tanto teoria como prác/sem
Prácticas = (0.6 * practicas) + (0.4 * examen de prácticas)
se ha de aprobar tanto prac-examen como prácticas
Participación
Operating Systems – Introduction
Slide 4
Operating Systems
Operating Systems – Introduction
Slide 5
Operating Systems
Seminarios (4): grupos de 2-4
Prácticas (5): grupos de 2
Operating Systems – Introduction
Slide 6
Operating Systems
Course Book:
A. Silberschatz, P.B. Galvin, G. Gagne.
Fundamentos de sistemas operativos.
McGraw Hill, 2009.
Other books:
W. Stallings. Sistemas operativos : aspectos internos y principios de diseño, Prentice Hall 2005.
L. Duran-Rodriguez. Sistemas operativos: referencia bàsica. Marcombo, 2000.
A.S. Tanenbaum, Modern operating systems. Prentice Hall, 2001.
Operating Systems – Introduction
Slide 7
Operating Systems
Contact:
q 
q 
q 
q 
q 
q 
Clase
Seminarios/Prácticas
Email
Horas oficina: Cualquier dia (previa cita)
Anuncios, documentacion, …
Moodle + http://www.dtic.upf.edu/~rramirez/os/
Operating Systems – Introduction
Slide 8
Introduction
Chapter 1 & 2 - Course Book
OS Introduction
Slide 9
What is an Operating System?
OS Introduction
Slide 10
What is an OS?
OS Introduction
Slide 11
What is an Operating System?
" 
A program that acts as an intermediary
between a user of a computer and the
computer hardware.
" 
Operating system goals:
Execute user programs and make solving user
problems easier.
l  Make the computer system convenient to use.
l 
" 
Use the computer hardware in an efficient
manner.
OS Introduction
Slide 12
Types of Operating Systems?
" 
" 
OS for Batch systems
Time-shared OS (multiprogramming)
l 
l 
" 
" 
Why multiprogramming?
OS features needed for multiprogramming?
Desktop OS – convenience/responsiveness?
OS for Parallel systems
l 
l 
l 
Tightly coupled system
Throughput? Economy? Reliability?
Symmetric/asymmetric multiprocessing?
OS Introduction
Slide 13
Types of Operating Systems?
" 
OS for Distributed systems
l 
" 
Real-time OS
l 
l 
l 
" 
Loosely coupled system – LAN & WAN
time constraints
Soft real-time
Hard real-time
Hand-held OS
l 
Limitations
OS Introduction
Slide 14
Common System Components
A system as large and complex as an OS can
be created only by partitioning it into smaller
pieces
" 
" 
" 
" 
" 
" 
" 
Process Management
Main Memory Management
Secondary Storage Management
File Management
I/O System Management
Protection System
…
OS Structures
Slide 15
System Calls
" 
System calls provide the interface between a running program and
the operating system.
l  For example – open input file, create output file, print message
to console, terminate with error or normally
l  Generally available as routines written in C and C++
" 
Mostly accessed by programs via a high-level Application Program
Interface (API) rather than direct system call use
l  Provides portability (underlying hardware handled by OS)
l  Hides the detail from the programmer
" 
Win32 API for Windows
POSIX API for UNIX, Linux, and Mac OS X
Java API for the Java virtual machine (JVM)
" 
" 
OS Structures
Slide 16
API – System Call – OS Relationship
OS Structures
Slide 17
Standard C Library Example
" 
C program invoking printf() library call, which calls
write() system call
OS Structures
Slide 18
System Call Parameter Passing
" 
Three general methods used to pass parameters to the
OS
l 
l 
l 
Simplest: pass the parameters in registers?
Parameters stored in a block, or table, in memory, and address
of block passed as a parameter in a register
Parameters placed, or pushed, onto the stack by the program
and popped off the stack by the operating system
OS Structures
Slide 19
OS Design Implementation
" 
" 
Mechanisms determine how to do something, policies
decide what will be done.
The separation of policy from mechanism is a very
important principle in designing OSs
l 
It allows maximum flexibility if policy decisions are to be
changed later.
l  The timer is a mechanism providing CPU protection. How
long it runs for a particular user is a policy decision.
OS Structures
Slide 20
Virtual Machines
Virtual Machine"
Non-virtual Machine"
•  appearance that users have their own processor
•  operator s console? Virtual computer/memory?
OS Structures
Slide 21
Communication Models
" 
" 
Communication between processes may take place
using either message passing or shared memory.
Message passing
l 
Information is exchanged through an interprocess
communication facility provided by the OS
l 
l 
l 
" 
Computers have host names, processes have process
names for identification purposes
Useful when smaller number of data need to be exchanged
Easier to implement than shared memory
Shared memory
l 
Processes use map memory system calls to gain access to
regions of memory owned by other processes
l 
l 
OS Structures
Allows maximum speed and convenience of
communication
Problems arise in the area of protection and synchronization
Slide 22
Communication Models
Message Passing"
OS Structures
Shared Memory"
Slide 23
Descargar