Documentos de Académico
Documentos de Profesional
Documentos de Cultura
1 - Introducción
1 - Introducción
2
Características del curso
Material complejo
Requiere pensar a varios
niveles
Deben planificar su tiempo de
𝑚𝑒𝑛𝑡𝑒
estudio 𝑝𝑟𝑜𝑐𝑟𝑎𝑠𝑡𝑖𝑛𝑎𝑐𝑖ó𝑛 = 𝑚𝑎𝑡𝑒𝑟𝑖𝑎
Proyectos trabajosos
Altas posibilidades de errores 𝑚𝑎𝑡𝑒𝑟𝑖𝑎 × 𝑝𝑟𝑜𝑐𝑟𝑎𝑠𝑡𝑖𝑛𝑎𝑐𝑖ó𝑛 = 𝑚𝑒𝑛𝑡𝑒
Prohibido procrastinar
𝑚𝑒𝑛𝑡𝑒
Clases densas 𝑚𝑎𝑡𝑒𝑟𝑖𝑎 = 𝑝𝑟𝑜𝑐𝑟𝑎𝑠𝑡𝑖𝑛𝑎𝑐𝑖ó𝑛
Trataremos de usar las dos
horas completas
Deben leer el libro
3
¿Qué tan difícil es esta materia?
4
Recursos
Profesor
Consultas con cita
Libros
Stallings
Bib: 19 ES, 9 EN
Tannenbaum
Bib: 24 ES, 8 EN, 10 RES
Silberachatz
Bib: 5 ES, 5 EN, 6 RES
5
Medidas de Contingencia
6
Plan de Evaluación
Teoría:
Primer Examen: 30 pts
Tradicionalmente Sem 6
Segundo Examen: 30 pts
Tradicionalmente Sem 12
Laboratorio: (40%)
Tarea: 5 pts
Tradicional Entrega Sem 4
Proyecto 1: 20 pts
Tradicional Entrega Sem 8
Proyecto 2: 15 pts
Tradicional Entrega Sem 11
7
(Ver Cronograma)
8
Sobre el Laboratorio
Proyectos en parejas
Libros
Kernighan & Ritchie. El Lenguaje de
Programación C
Bib: 13 ES, 7 EN, 8 RES
9
10
Honestidad: Responsabilidad:
Integridad Un deber u obligación de
Veracidad realizar satisfactoriamente
Completar una actividad que
Sinceridad
hay que cumplir
Laboriosidad:
Paz:
Gusto por trabajar y esforzarse
Tranquilidad
Conseguir objetivos sin rendirse
No permanencia de conflictos
No tener temor
10
Reglamento de Sanciones y Procedimientos Disciplinarios
11
12
Actividad:
¿En qué consiste esta materia?
13
En qué no consiste esta materia (Mitos)
14
Avances rápidos en Sistemas Operativos
15
En qué consiste esta materia
(Programa)
1. Qué es un Sistema Operativo
2. Estructura y llamadas de los Sistemas
Operativos
3. Procesos e Hilos
4. Planificación de procesos (scheduling)
5. Comunicación entre procesos
6. Interbloqueo (deadlock)
7. Memoria Principal
8. Memoria Virtual
9. Sistemas de Archivo
10. Administración de memoria
secundaria
Actividad:
¿Qué creen que es un Sistema Operativo?
17
Breve repaso de Organización del Computador
18
¿Qué es un Sistema Operativo?
Un sistema operativo
indica al CPU cómo
Arrancar
Operar las unidades de
disco
Ejecutar el Software
(David Macaulay)
Un programa que actúa como
intermediario entre un usuario y el
hardware de una computadora
(Definición más general)
Operating System Concepts – 9th Edition 1.19 Silberschatz, Galvin and Gagne ©2013
Componentes de un Sistema de Computación
Operating System Concepts – 9th Edition 1.20 Silberschatz, Galvin and Gagne ©2013
Sistemas Multi-usuario
Operating System Concepts – 9th Edition 1.21 Silberschatz, Galvin and Gagne ©2013
Operating System Definition (Cont.)
No universally accepted definition
“Everything a vendor ships when you order an operating system” is a good
approximation
But varies wildly
“The one program running at all times on the computer” is the kernel.
Everything else is either:
a system program (ships with the operating system) , or
an application program.
Operating System Concepts – 9th Edition 1.22 Silberschatz, Galvin and Gagne ©2013
Sin Sistemas Operativos
Operating System Concepts – 9th Edition 1.23 Silberschatz, Galvin and Gagne ©2013
Computer Startup
bootstrap program is loaded at power-up or reboot
Typically stored in ROM or EPROM, generally known as firmware
Initializes all aspects of system
Loads operating system kernel and starts execution
Operating System Concepts – 9th Edition 1.24 Silberschatz, Galvin and Gagne ©2013
What Operating Systems Do
Operating system goals:
Execute user programs and make solving user problems easier
Make the computer system convenient to use
Use the computer hardware in an efficient manner
Users want convenience, ease of use and good performance
Don’t care about resource utilization
But shared computer such as mainframe or minicomputer must keep all
users happy
Users of dedicate systems such as workstations have dedicated resources
but frequently use shared resources from servers
Handheld computers are resource poor, optimized for usability and battery
life
Some computers have little or no user interface, such as embedded
computers in devices and automobiles
Operating System Concepts – 9th Edition 1.25 Silberschatz, Galvin and Gagne ©2013
Operating System Definition
OS is a resource allocator
Manages all resources
Decides between conflicting requests for efficient and fair resource use
OS is a control program
Controls execution of programs to prevent errors and improper use of
the computer
Operating System Concepts – 9th Edition 1.26 Silberschatz, Galvin and Gagne ©2013
Chapter 1: Introduction
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
PROCESSES
Operating System Concepts – 9th Edition 1.28 Silberschatz, Galvin and Gagne ©2013
Process
• A unit of activity characterized by
– A single thread (sequence of commands) of
execution
– A current state
– An associated set of system resources
29
Process Management
Process
A process is a program in execution. It is a unit of work within the
system. Program is a passive entity, process is an active entity.
Process needs resources to accomplish its task
CPU, memory, I/O, files
Initialization data
Process termination requires reclaim of any reusable resources
Program Counter
Single-threaded process has one program counter specifying
location of next instruction to execute
Process executes instructions sequentially, one at a time, until
completion
Multi-threaded process has one program counter per thread
Typically system has many processes, some user, some operating
system running concurrently on one or more CPUs
Concurrency by multiplexing the CPUs among the processes /
threads
Operating System Concepts – 9th Edition 1.30 Silberschatz, Galvin and Gagne ©2013
Process Management Activities
Operating System Concepts – 9th Edition 1.31 Silberschatz, Galvin and Gagne ©2013
HISTORICAL CONTEXT
Operating System Concepts – 9th Edition 1.32 Silberschatz, Galvin and Gagne ©2013
History of Operating Systems
Generations:
33
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
34
IBM Type 285 tabulators in use at U.S. Social Security Administration
En Venezuela, el usuario principal es la
Creole Petroleum Corporation
36
36
IBM 1401, 1402, 1403
37
Batch Systems (4)
Regresar máquina
a estado original
Fijar estado de
máquina
Figure 1-4. Structure of a typical FMS job.
38
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Resident monitors
Ejemplo de un Sistema con
1955 tres porgramas en memoria
39
Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved. 0-13-6006639
Protection and Security
Operating System Concepts – 9th Edition 1.40 Silberschatz, Galvin and Gagne ©2013
True Multiprogramming
Tom Kilburn and the
1962 Atlas Computer
41
Operating System Structure
Multiprogramming (Batch system) needed for efficiency
Single user cannot keep CPU and I/O devices busy at all times
Multiprogramming organizes jobs (code and data) so CPU always has one
to execute
A subset of total jobs in system is kept in memory
One job selected and run via job scheduling
When it has to wait (for I/O for example), OS switches to another job
Operating System Concepts – 9th Edition 1.42 Silberschatz, Galvin and Gagne ©2013
Circuitos integrados permiten
disponibilidad comerical
IBM 360 1965 – 1978
43
Time-Shared interactive
systems
1975 First True Mainframe
44
Operating System Structure
Timesharing (multitasking) is logical extension in which CPU switches jobs
so frequently that users can interact with each job while it is running, creating
interactive computing
Response time should be < 1 second
Each user has at least one program executing in memory process
If several jobs ready to run at the same time CPU scheduling
If processes don’t fit in memory, swapping moves them in and out to run
Virtual memory allows execution of processes not completely in memory
Operating System Concepts – 9th Edition 1.45 Silberschatz, Galvin and Gagne ©2013
Computadoras Personales
46
Diseño centrado en usuarios
1984 Macintosh
47
Estandarización multiplataforma
de controladores
1995 – 2010
48
Sistemas Operativos
multiplataforma
2010 – ?
49
Avances de los últimos años
51
¿Qué caracteriza la época actual?
Cambio –Manuel
Internet of Things –Simone
Almacenamniento en la nube Jesús De Aguiar
3D Jesús Kauze
52
COMPUTER SYSTEM ORGANIZATION
53
Computer System Organization
Computer-system operation
One or more CPUs, device controllers connect through common
bus providing access to shared memory
Concurrent execution of CPUs and devices competing for
memory cycles
Operating System Concepts – 9th Edition 1.54 Silberschatz, Galvin and Gagne ©2013
Buses
Operating System Concepts – 9th Edition 1.56 Silberschatz, Galvin and Gagne ©2013
Transition from User to Kernel Mode
Timer to prevent infinite loop / process hogging resources
Timer is set to interrupt the computer after some time period
Keep a counter that is decremented by the physical clock.
Operating system set the counter (privileged instruction)
When counter zero generate an interrupt
Set up before scheduling process to regain control or terminate program
that exceeds allotted time
Increasingly CPUs support multi-mode operations
i.e. virtual machine manager (VMM) mode for guest VMs
Operating System Concepts – 9th Edition 1.57 Silberschatz, Galvin and Gagne ©2013
INTERRUPTS
Operating System Concepts – 9th Edition 1.59 Silberschatz, Galvin and Gagne ©2013
Interrupts
• Interrupt the normal sequencing of the
processor
• Most I/O devices are slower than the
processor
– Processor must pause to wait for device
60
Classes of Interrupts
61
Interrupt Handling
Operating System Concepts – 9th Edition 1.62 Silberschatz, Galvin and Gagne ©2013
Common Functions of Interrupts
Interrupt transfers control to
the interrupt service routine
generally, through the
interrupt vector, which
contains the addresses of
all the service routines
Interrupt architecture must
save the address of the
interrupted instruction
A trap or exception is a
software-generated
interrupt caused either by
an error or a user request
An operating system is
interrupt driven
Sample Interrupt Vector, Dr. Jim Plusquellic
Operating System Concepts – 9th Edition 1.63 Silberschatz, Galvin and Gagne ©2013
Interrupt Timeline
Operating System Concepts – 9th Edition 1.64 Silberschatz, Galvin and Gagne ©2013
Transfer of Control via Interrupts
65
Program Flow of Control
66
Program Flow of Control
67
Program Flow of Control
68
I/O Devices
Current instruction
Next instruction
3
3. Return
1. Interrupt
1 4 2
2. Dispatch
to handler
Operating System Concepts – 9th Edition 1.74 Silberschatz, Galvin and Gagne ©2013
End of Chapter 1
Operating System Concepts – 9th Edit9on Silberschatz, Galvin and Gagne ©2013
Qué cubrimos esta clase
Lean el capítulo 1 de
cualquiera de los libros:
Stallings: §1.1 – 1.7 (pp. 8 –
32 en 7ª ed.)
Tannenbaum: §1 –1.5 (pp.
1 – 50 en 4ª ed.)
Silberschatz: §1 – 1.9; 2 –
2.2 (pp. 3 – 30; 49 – 55 en 8ª
ed.)
No cubriremos §1.10 – 1.14
76
Para la próxima clase
77