Notes Intro
Notes Intro
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
Chapitre 1: Introduction
Ce que fait un système d'exploitation
Système informatique
Organisation
Architecture
Structure
Opérations
Gestion
Processus
Memoire
Stockage
Protection et sécurité
Structures de données du noyaux
Environnements informatiques
Operating System Concepts – 9th Edition 1.2 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Objectifs
Décrire l'ogranisation de base d'un système informatique
Operating System Concepts – 9th Edition 1.3 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Un système d'exploitation?
Operating System Concepts – 9th Edition 1.4 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structure d'un système informatique
Operating System Concepts – 9th Edition 1.5 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Quatre éléments d'un système informatique
Operating System Concepts – 9th Edition 1.6 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Que fait un système d'exploitation
Ça dépend à qui on demande
Sur un système partagé (serveur, mainframe ou minicomputer),
partager les resources pour satisfaire tous les utilisateurs
Utilisateurs de système dédiés (workstations, PC) partagent aussi
souvent des resources sur un serveur
Utilisateurs isolés veulent de la facilité d'utilisation
L'usage des resources est moins important
Tablettes et téléphones ont des resources limitées, où il faut
optimiser la durée de la batterie
Certains ordinateurs n'ont pas d'interface uilisateur, tels que les
systèmes embarqués dans des appareils ou des véhicules
Operating System Concepts – 9th Edition 1.7 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Définition d'un système d'exploitation
Operating System Concepts – 9th Edition 1.8 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Déf. d'un système d'exploitation (suite)
Operating System Concepts – 9th Edition 1.9 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computer Startup
Programme de bootstrap est chargé au démarrage
Habituellement stocké en mémoire Flash ou ROM (readonly
memory), générallement dénommé firmware
Initialise tout le matériel du système
Charge le noyau du système d'exploitation et lance son exécution
Operating System Concepts – 9th Edition 1.10 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Organisation d'un système informatique
Opération d'un système informatique
Les CPUs et contrôleurs de périphériques sont connectés par un
bus commun donnant accès à une mémoire partagée
Exécution concurrente des CPUs and des périphériques qui
luttent pour accéder au bus et à la mémoire
Operating System Concepts – 9th Edition 1.11 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Opération d'un système informatique
CPUs et périphériques d'E/S peuvent exécuter concurremment
Operating System Concepts – 9th Edition 1.12 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Interruptions
Une interruption cause un transfert de contrôle à la routine de service
d'interruptions, généralement via un vecteur d'interruptions, qui
contient les adresses des différentes routines de service
Operating System Concepts – 9th Edition 1.13 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Gestion des interruptions
Le système d'exploitation préserve l'état antérieur du CPU, tel que le
contenu des registres
Operating System Concepts – 9th Edition 1.14 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Ligne de temps d'une interruption
Operating System Concepts – 9th Edition 1.15 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structure des E/S
Après le début d'une E/S, le contrôle retourne au programme
seulement quand l'E/S est complétée:
Des instructions d'attente mettent le CPU en pause jusqu'à la
prochaine interruption
Boucle d'attente active
Pas plus d'une requête d'E/S en attente à la fois, pas d'E/S
simultanées
Operating System Concepts – 9th Edition 1.16 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Storage Definitions and Notation Review
bit. Un bit contient soit 0 soit 1. Tout stockage est basé sur une collection de bits.
Un byte = 8 bits, et pour la majorité des systèmes, c'est la plus petite unité facile à manipuler.
Par exemple, la majorité des CPU n'a pas d'instruction pour déplacer un bit, mais en a pour
déplacer un byte.
b=bit; B=byte
Il est courant d'arrondir ces nombres en milliers, et de dire par exemple qu'un megabyte est 1
million de bytes and a gigabyte is 1 billion bytes. Les vitesses de communication sont souvent
Operating System Concepts – 9th Edition 1.17 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structure du DMA
DMA = Accès Direct à la Mémoire
Une seule interruption par transfert plutôt qu'une pour chaque byte
Operating System Concepts – 9th Edition 1.18 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structures de stockage
Mémoire centrale – seul stockage auquel le CPU peut accéder directement
Accès aléatoire
Typiquement volatile
Mémoire de masse – extension de la mémoire centrale qui offre une plus
grande capacité et n'est pas volatile
Disque magnétique – plateaux de metal ou verre recouvert d'un matériau
magnétique d'enregistrement
La surface est divisée en pistes, elles mêmes subdivisées en secteurs
Le contrôleur de disque détermine l'interaction entre le périphérique et
l'ordinateur
disques SSD – plus rapides que les disques magnétiques mais quand
même nonvolatils
Diverses technologies
Très populaire de nos jours
Operating System Concepts – 9th Edition 1.19 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Hiérarchie de stockage
Les systèmes de stockage sont organisés en hiérarchie
Vitesse
Coût
Volatilité
Operating System Concepts – 9th Edition 1.20 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Hiérarchie de stockage
Operating System Concepts – 9th Edition 1.21 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Caching
Principe important, utilisé à toute sortes d'endroits et de niveaux
dans un ordinateur (en matériel, par le SE, par les applications)
Operating System Concepts – 9th Edition 1.22 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Architecture des systèmes
Beaucoup de système n'ont qu'un seul CPU
La majorité ont aussi des processeurs specialisés
Operating System Concepts – 9th Edition 1.23 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Comment fonctionne un ordinateur
Operating System Concepts – 9th Edition 1.24 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Architecture multiprocesseur symmétrique
Operating System Concepts – 9th Edition 1.25 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Un système dual-core
Operating System Concepts – 9th Edition 1.26 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Systèmes en grappes
Comme systèmes multiprocesseurs, mais multiples systèmes travaillant
ensemble
Partage du stockage via un storagearea network (SAN)
Offre un service highavailability qui survit aux pannes
Grappes asymmétriques avec une machine en hotstandby
Grappes symmétriques où les nœuds se surveillent mutuellement
Grappes de calcul highperformance computing (HPC)
Applications écrites pour utiliser la parallélisation
Usage de distributed lock manager (DLM) pour éviter les conflits dans
certaines opérations
Operating System Concepts – 9th Edition 1.27 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Systèmes en grappes
Operating System Concepts – 9th Edition 1.28 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structure des systèmes d'exploitation
Operating System Concepts – 9th Edition 1.29 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Layout mémoire de système multiprogrammé
Operating System Concepts – 9th Edition 1.30 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Opérations de systèmes d'exploitation
Guidé par les interruptions par le matériel
Erreur logicielle et requêtes créent des exceptions ou trap
Division par zéro, appel système
Éviter les problèmes tels que les boucles infinies, les processus qui en modifient
d'autres ou qui modifient le SE luimême
Opération en deux modes permet au SE de protéger les éléments
Mode utilisateur et mode noyau
Bit de mode fourni par le processeur
Permet de distinguer l'exécution dans le noyau
Les instructions “privileged”, autorisées seulement en mode noyau
Interruption et exceptions passent en mode noyau
Operating System Concepts – 9th Edition 1.31 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Transition au mode noyau
Pour éviter les boucles sans fin, le noyau doit garder un œil ouvert
Utiliser un timer pour générer une interruption dans le futur
Avant de retourner en mode user, le SE arme le timer
Quand le timer sonne, l'interruption redonne la main au noyau
Operating System Concepts – 9th Edition 1.32 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Gestion des processus
Un processus est un programme en cours d'exécution. Un programme
est une entité passive, un processes est une entité active.
Unprocessus a besoin de resources pour accomplir sa tâche
CPU, mémoire, E/S, fichiers
Initialisation des données
À la fin d'un processus, il faut récupérer ces resources
Un processus “singlethreaded” a un program counter qui indique
l'adresse de la prochaine instruction à exécuter
Le processus exécute ses instructions séquentiellement, une à la
fois, jusqu'à épuisement
Un processus “multithreaded” a plusieurs program counters, un par
thread, qui peuvent ainsi exécuter en parallèle
Habituellement un système a toujours beaucoup de processus actifs,
certains utilisateurs, d'autres appartenant au système, qui
fonctionnent tous concurremment sur un ou plusieurs CPUs
Multiplexer les CPUs parmis les processus / threads
Operating System Concepts – 9th Edition 1.33 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Activités de gestion des processus
Operating System Concepts – 9th Edition 1.34 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Gestion mémoire
Avoir les données en mémoire avant de les manipuler
Operating System Concepts – 9th Edition 1.35 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Gestion du stockage
FileSystem management
Files usually organized into directories
Access control on most systems to determine who can access
what
OS activities include
Creating and deleting files and directories
Primitives to manipulate files and directories
Mapping files onto secondary storage
Backup files onto stable (nonvolatile) storage media
Operating System Concepts – 9th Edition 1.36 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Mass-Storage Management
Usually disks used to store data that does not fit in main memory or
data that must be kept for a “long” period of time
Proper management is of central importance
Entire speed of computer operation hinges on disk subsystem and its
algorithms
OS activities
Freespace management
Storage allocation
Disk scheduling
Some storage need not be fast
Tertiary storage includes optical storage, magnetic tape
Still must be managed – by OS or applications
Varies between WORM (writeonce, readmanytimes) and RW
(readwrite)
Operating System Concepts – 9th Edition 1.37 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Performance of Various Levels of Storage
128GB 1TB 4TB DIRO
Operating System Concepts – 9th Edition 1.38 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Migration of Integer A from Disk to Register
Operating System Concepts – 9th Edition 1.39 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
I/O Subsystem
One purpose of OS is to hide peculiarities of hardware devices from the
user
Operating System Concepts – 9th Edition 1.40 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Protection and Security
Protection – any mechanism for controlling access of processes or
users to resources defined by the OS
Operating System Concepts – 9th Edition 1.41 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Kernel Data Structures
Many similar to standard programming data structures
Singly linked list
Operating System Concepts – 9th Edition 1.42 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Kernel Data Structures
Operating System Concepts – 9th Edition 1.43 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Kernel Data Structures
Hash function can create a hash map
Operating System Concepts – 9th Edition 1.44 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Traditional
Operating System Concepts – 9th Edition 1.45 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Mobile
Operating System Concepts – 9th Edition 1.46 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments – Distributed
Distributed
Collection of separate, possibly heterogeneous, systems networked
together
Network is a communications path, TCP/IP most common
– Local Area Network (LAN)
– Wide Area Network (WAN)
– Metropolitan Area Network (MAN)
– Personal Area Network (PAN)
Network Operating System provides features between systems across
network
Communication scheme allows systems to exchange messages
Illusion of a single system
Operating System Concepts – 9th Edition 1.47 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments – Client-Server
ClientServer Computing
Dumb terminals supplanted by smart PCs
Many systems now servers, responding to requests generated
by clients
Computeserver system provides an interface to client to
request services (i.e., database)
Fileserver system provides interface for clients to store
and retrieve files
Operating System Concepts – 9th Edition 1.48 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Peer-to-Peer
Operating System Concepts – 9th Edition 1.49 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Virtualization
Emulation used when source CPU type different from target type
(i.e. PowerPC to Intel x86)
Generally slowest method
When computer language not compiled to native code –
Interpretation
Virtualization – OS natively compiled for CPU, running guest Oses
also natively compiled
Consider VMware running WinXP guests, each running
applications, all on native WinXP host OS
VMM provides virtualization services
Operating System Concepts – 9th Edition 1.50 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Virtualization
Use cases involve laptops and desktops running multiple OSes for
exploration or compatibility
Apple laptop running Mac OS X host, Windows as a guest
Developing apps for multiple OSes without having multiple
systems
QA testing applications without having multiple systems
Executing and managing compute environments within data
centers
VMM can run natively, in which case they are also the host
There is no general purpose host then (VMware ESX and Citrix
XenServer)
Operating System Concepts – 9th Edition 1.51 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Virtualization
Operating System Concepts – 9th Edition 1.52 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments – Cloud Computing
Operating System Concepts – 9th Edition 1.53 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments – Cloud Computing
Operating System Concepts – 9th Edition 1.54 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments – Real-Time Embedded Systems
Operating System Concepts – 9th Edition 1.55 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Open-Source Operating Systems
Operating systems made available in sourcecode format rather than
just binary closedsource
Operating System Concepts – 9th Edition 1.56 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
End of Chapter 1
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
Chapitre 1: Introduction
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
1
Chapitre 1: Introduction
Ce que fait un système d'exploitation
Système informatique
Organisation
Architecture
Structure
Opérations
Gestion
Processus
Memoire
Stockage
Protection et sécurité
Structures de données du noyaux
Environnements informatiques
Operating System Concepts – 9th Edition 1.2 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Objectifs
Décrire l'ogranisation de base d'un système informatique
Operating System Concepts – 9th Edition 1.3 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Un système d'exploitation?
Operating System Concepts – 9th Edition 1.4 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structure d'un système informatique
Operating System Concepts – 9th Edition 1.5 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Quatre éléments d'un système informatique
Operating System Concepts – 9th Edition 1.6 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Que fait un système d'exploitation
Ça dépend à qui on demande
Sur un système partagé (serveur, mainframe ou minicomputer),
partager les resources pour satisfaire tous les utilisateurs
Utilisateurs de système dédiés (workstations, PC) partagent aussi
souvent des resources sur un serveur
Utilisateurs isolés veulent de la facilité d'utilisation
L'usage des resources est moins important
Tablettes et téléphones ont des resources limitées, où il faut
optimiser la durée de la batterie
Certains ordinateurs n'ont pas d'interface uilisateur, tels que les
systèmes embarqués dans des appareils ou des véhicules
Operating System Concepts – 9th Edition 1.7 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Définition d'un système d'exploitation
Operating System Concepts – 9th Edition 1.8 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Déf. d'un système d'exploitation (suite)
Operating System Concepts – 9th Edition 1.9 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Microsoft a perdu une poursuite parce qu’il introduisait trop d’applications directement
dans son OS, et limitait la competition avec son monopole. Mais aujourd’hui, ca
redevient de plus en plus present…
Computer Startup
Programme de bootstrap est chargé au démarrage
Habituellement stocké en mémoire Flash ou ROM (readonly
memory), générallement dénommé firmware
Initialise tout le matériel du système
Charge le noyau du système d'exploitation et lance son exécution
Operating System Concepts – 9th Edition 1.10 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Operating System Concepts – 9th Edition 1.11 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Operating System Concepts – 9th Edition 1.12 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Interruptions
Une interruption cause un transfert de contrôle à la routine de service
d'interruptions, généralement via un vecteur d'interruptions, qui
contient les adresses des différentes routines de service
Operating System Concepts – 9th Edition 1.13 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Gestion des interruptions
Le système d'exploitation préserve l'état antérieur du CPU, tel que le
contenu des registres
Operating System Concepts – 9th Edition 1.14 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Operating System Concepts – 9th Edition 1.15 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structure des E/S
Après le début d'une E/S, le contrôle retourne au programme
seulement quand l'E/S est complétée:
Des instructions d'attente mettent le CPU en pause jusqu'à la
prochaine interruption
Boucle d'attente active
Pas plus d'une requête d'E/S en attente à la fois, pas d'E/S
simultanées
Operating System Concepts – 9th Edition 1.16 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Storage Definitions and Notation Review
bit. Un bit contient soit 0 soit 1. Tout stockage est basé sur une collection de bits.
Un byte = 8 bits, et pour la majorité des systèmes, c'est la plus petite unité facile à manipuler.
Par exemple, la majorité des CPU n'a pas d'instruction pour déplacer un bit, mais en a pour
déplacer un byte.
b=bit; B=byte
Il est courant d'arrondir ces nombres en milliers, et de dire par exemple qu'un megabyte est 1
million de bytes and a gigabyte is 1 billion bytes. Les vitesses de communication sont souvent
Operating System Concepts – 9th Edition 1.17 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structure du DMA
DMA = Accès Direct à la Mémoire
Une seule interruption par transfert plutôt qu'une pour chaque byte
Operating System Concepts – 9th Edition 1.18 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
DMA
Structures de stockage
Mémoire centrale – seul stockage auquel le CPU peut accéder directement
Accès aléatoire
Typiquement volatile
Mémoire de masse – extension de la mémoire centrale qui offre une plus
grande capacité et n'est pas volatile
Disque magnétique – plateaux de metal ou verre recouvert d'un matériau
magnétique d'enregistrement
La surface est divisée en pistes, elles mêmes subdivisées en secteurs
Le contrôleur de disque détermine l'interaction entre le périphérique et
l'ordinateur
disques SSD – plus rapides que les disques magnétiques mais quand
même nonvolatils
Diverses technologies
Très populaire de nos jours
Operating System Concepts – 9th Edition 1.19 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
solid-state drive: flash (coûts diminuent, mais encore 7-8x plus chers que disques)
Hiérarchie de stockage
Les systèmes de stockage sont organisés en hiérarchie
Vitesse
Coût
Volatilité
Operating System Concepts – 9th Edition 1.20 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Hiérarchie de stockage
Operating System Concepts – 9th Edition 1.21 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Caching
Principe important, utilisé à toute sortes d'endroits et de niveaux
dans un ordinateur (en matériel, par le SE, par les applications)
Operating System Concepts – 9th Edition 1.22 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Architecture des systèmes
Beaucoup de système n'ont qu'un seul CPU
La majorité ont aussi des processeurs specialisés
Operating System Concepts – 9th Edition 1.23 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Operating System Concepts – 9th Edition 1.24 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Architecture multiprocesseur symmétrique
Operating System Concepts – 9th Edition 1.25 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Un système dual-core
Operating System Concepts – 9th Edition 1.26 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Uniform memory access, prend le meme temps d’acces, alors que nonuniform MA non
Communication sur multi-chip est plus longue que sur multi-cores sur un meme chip,
et multicore demande moins d’electricite
Multicore est multiproc, mais pas tous les multiprocs sont multicores
Blade servers: chaque board a son propre OS, I/O, reseaux, etc.
Systèmes en grappes
Comme systèmes multiprocesseurs, mais multiples systèmes travaillant
ensemble
Partage du stockage via un storagearea network (SAN)
Offre un service highavailability qui survit aux pannes
Grappes asymmétriques avec une machine en hotstandby
Grappes symmétriques où les nœuds se surveillent mutuellement
Grappes de calcul highperformance computing (HPC)
Applications écrites pour utiliser la parallélisation
Usage de distributed lock manager (DLM) pour éviter les conflits dans
certaines opérations
Operating System Concepts – 9th Edition 1.27 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Operating System Concepts – 9th Edition 1.28 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Structure des systèmes d'exploitation
Operating System Concepts – 9th Edition 1.29 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Layout mémoire de système multiprogrammé
Operating System Concepts – 9th Edition 1.30 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Opérations de systèmes d'exploitation
Guidé par les interruptions par le matériel
Erreur logicielle et requêtes créent des exceptions ou trap
Division par zéro, appel système
Éviter les problèmes tels que les boucles infinies, les processus qui en modifient
d'autres ou qui modifient le SE luimême
Opération en deux modes permet au SE de protéger les éléments
Mode utilisateur et mode noyau
Bit de mode fourni par le processeur
Permet de distinguer l'exécution dans le noyau
Les instructions “privileged”, autorisées seulement en mode noyau
Interruption et exceptions passent en mode noyau
Operating System Concepts – 9th Edition 1.31 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Operating System Concepts – 9th Edition 1.32 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Operating System Concepts – 9th Edition 1.33 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Activités de gestion des processus
Operating System Concepts – 9th Edition 1.34 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Gestion mémoire
Avoir les données en mémoire avant de les manipuler
Operating System Concepts – 9th Edition 1.35 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Gestion du stockage
FileSystem management
Files usually organized into directories
Access control on most systems to determine who can access
what
OS activities include
Creating and deleting files and directories
Primitives to manipulate files and directories
Mapping files onto secondary storage
Backup files onto stable (nonvolatile) storage media
Operating System Concepts – 9th Edition 1.36 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Mass-Storage Management
Usually disks used to store data that does not fit in main memory or
data that must be kept for a “long” period of time
Proper management is of central importance
Entire speed of computer operation hinges on disk subsystem and its
algorithms
OS activities
Freespace management
Storage allocation
Disk scheduling
Some storage need not be fast
Tertiary storage includes optical storage, magnetic tape
Still must be managed – by OS or applications
Varies between WORM (writeonce, readmanytimes) and RW
(readwrite)
Operating System Concepts – 9th Edition 1.37 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Performance of Various Levels of Storage
128GB 1TB 4TB DIRO
Operating System Concepts – 9th Edition 1.38 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Operating System Concepts – 9th Edition 1.39 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
I/O Subsystem
One purpose of OS is to hide peculiarities of hardware devices from the
user
Operating System Concepts – 9th Edition 1.40 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Protection and Security
Protection – any mechanism for controlling access of processes or
users to resources defined by the OS
Operating System Concepts – 9th Edition 1.41 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Kernel Data Structures
Many similar to standard programming data structures
Singly linked list
Operating System Concepts – 9th Edition 1.42 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Kernel Data Structures
Operating System Concepts – 9th Edition 1.43 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Kernel Data Structures
Hash function can create a hash map
Operating System Concepts – 9th Edition 1.44 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Traditional
Operating System Concepts – 9th Edition 1.45 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Mobile
Operating System Concepts – 9th Edition 1.46 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
46
Computing Environments – Distributed
Distributed
Collection of separate, possibly heterogeneous, systems networked
together
Network is a communications path, TCP/IP most common
– Local Area Network (LAN)
– Wide Area Network (WAN)
– Metropolitan Area Network (MAN)
– Personal Area Network (PAN)
Network Operating System provides features between systems across
network
Communication scheme allows systems to exchange messages
Illusion of a single system
Operating System Concepts – 9th Edition 1.47 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
47
Computing Environments – Client-Server
ClientServer Computing
Dumb terminals supplanted by smart PCs
Many systems now servers, responding to requests generated
by clients
Computeserver system provides an interface to client to
request services (i.e., database)
Fileserver system provides interface for clients to store
and retrieve files
Operating System Concepts – 9th Edition 1.48 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Peer-to-Peer
Operating System Concepts – 9th Edition 1.49 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Emulation used when source CPU type different from target type
(i.e. PowerPC to Intel x86)
Generally slowest method
When computer language not compiled to native code –
Interpretation
Virtualization – OS natively compiled for CPU, running guest Oses
also natively compiled
Consider VMware running WinXP guests, each running
applications, all on native WinXP host OS
VMM provides virtualization services
Operating System Concepts – 9th Edition 1.50 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Use cases involve laptops and desktops running multiple OSes for
exploration or compatibility
Apple laptop running Mac OS X host, Windows as a guest
Developing apps for multiple OSes without having multiple
systems
QA testing applications without having multiple systems
Executing and managing compute environments within data
centers
VMM can run natively, in which case they are also the host
There is no general purpose host then (VMware ESX and Citrix
XenServer)
Operating System Concepts – 9th Edition 1.51 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments - Virtualization
Operating System Concepts – 9th Edition 1.52 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments – Cloud Computing
Operating System Concepts – 9th Edition 1.53 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments – Cloud Computing
Operating System Concepts – 9th Edition 1.54 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Computing Environments – Real-Time Embedded Systems
Operating System Concepts – 9th Edition 1.55 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Open-Source Operating Systems
Operating systems made available in sourcecode format rather than
just binary closedsource
Operating System Concepts – 9th Edition 1.56 Silberschatz, Galvin and Gagne ©2013, Monnier ©2016
Mac OS X et iOS ont un open-source kernel, Darwin, mais aussi des composantes
privees
End of Chapter 1
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
57