Operating Systems - Unitat de Coordinació Acadèmica …rramirez/os/L01.pdf · Operating Systems...
-
Upload
truongtuong -
Category
Documents
-
view
212 -
download
0
Transcript of Operating Systems - Unitat de Coordinació Acadèmica …rramirez/os/L01.pdf · Operating Systems...
Operating Systems – Introduction Slide 1
Operating Systems
Rafael Ramirez (T, S)
[email protected] 55.316
Sergio Giraldo(P, S)
[email protected] Matteo Segnorini (P, S)
T=Teoria; S=Seminarios; P=Prácticas
Operating Systems – Introduction Slide 3
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 4
Operating Systems Evaluation: Examen teoría 60% Prácticas 30% se ha de aprobar tanto teoria como prác/sem
Seminarios 10% 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 6
Operating Systems
Seminarios (4): grupos de 2-4
Prácticas (5): grupos de 2
Operating Systems – Introduction Slide 7
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 8
Operating Systems
Contact: q Clase q Seminarios/Prácticas q Email q Horas oficina: Cualquier dia (previa cita) q Anuncios, documentacion, … q Moodle + http://www.dtic.upf.edu/~rramirez/os/
OS Introduction Slide 12
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: l Execute user programs and make solving user
problems easier. l Make the computer system convenient to use.
" Use the computer hardware in an efficient manner.
OS Introduction Slide 13
Types of Operating Systems?
" OS for Batch systems " Time-shared OS (multiprogramming)
l Why multiprogramming? l OS features needed for multiprogramming?
" Desktop OS – convenience/responsiveness? " OS for Parallel systems
l Tightly coupled system l Throughput? Economy? Reliability? l Symmetric/asymmetric multiprocessing?
OS Introduction Slide 14
Types of Operating Systems?
" OS for Distributed systems l Loosely coupled system – LAN & WAN
" Real-time OS l time constraints l Soft real-time l Hard real-time
" Hand-held OS l Limitations
OS Structures Slide 15
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 16
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 18
Standard C Library Example " C program invoking printf() library call, which calls
write() system call
OS Structures Slide 19
System Call Parameter Passing " Three general methods used to pass parameters to the
OS l Simplest: pass the parameters in registers?
l Parameters stored in a block, or table, in memory, and address of block passed as a parameter in a register
l Parameters placed, or pushed, onto the stack by the program and popped off the stack by the operating system
OS Structures Slide 20
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 21
Virtual Machines
Non-virtual Machine" Virtual Machine"• appearance that users have their own processor • operator’s console? Virtual computer/memory?
OS Structures Slide 22
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 Computers have host names, processes have process names for identification purposes
l Useful when smaller number of data need to be exchanged l 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 Allows maximum speed and convenience of
communication l Problems arise in the area of protection and synchronization