Ayudantía 2: El Sistema Operativo
-
Upload
hedwig-buckley -
Category
Documents
-
view
37 -
download
2
description
Transcript of Ayudantía 2: El Sistema Operativo
![Page 1: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/1.jpg)
AYUDANTÍA 2: EL SISTEMA OPERATIVO
UTFSM - Sistemas Operativos
![Page 2: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/2.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
2
Conceptos importantes
Procesos / servicios Tareas: Set de instrucciones cargadas
en memoria. Interfaces Llamadas a sistema
![Page 3: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/3.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
3
Parte del sistema operativo Nos interesa tener más aplicaciones
que las que trae el SO. Estas aplicaciones pueden interferir con
el SO, o con otras aplicaciones. Por lo tanto, tenemos:
U.I.Program executionError detection
![Page 4: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/4.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
4
Evitar interferencias
No queremos que se interfiera con el SO
Cada aplicación con su algoritmo para leer del disco duro? Para cada sistema de archivos?...
Debemos usar llamadas a sistema O no?
Ejemplo para reproducir un sonido
![Page 5: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/5.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
5
Llamadas a sistema Conceptos:
IdentidadParámetros:
○ Registros○ Block/table○ Stack
fd = open(“theFile”, O_RDONLY, 0744);- push 0744- push O_RDONLY- pushd PtrToString- call open- mov [ebp-fd],eax- add esp,12
![Page 6: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/6.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
6
Diferencia entre “system programs”, “system calls”
Ejemplo de copiar archivo. Esto proporciona abstracción .
Basta con esto?Debiera haber un “system program” para cada
cosa que uno desee hacer?Todas las aplicaciones debieran estar formadas
llamando a varios system programs?Rendimiento?Qué pasa si uno quiere una aplicación
multiplataforma?
![Page 7: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/7.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
7
Application programming interfaces Para qué? Ejemplo de interfaz:
DirectSound y WASAPIASIO, OpenAL
![Page 8: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/8.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
8
Ejemplo usando API
using Microsoft.DirectX; using Microsoft.DirectX.DirectSound; Public void playMetal() {
Device device = CreateDevice();Buffer buffer = new Buffer(“Opeth -
Deliverance.mp3”, device);buffer.Play(0, BufferPlayFlags.Default);
}
![Page 9: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/9.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
9
Interfaces
Se facilitó todo! Tenemos API’s para todo:
OpenGLCUDAEtc!
![Page 10: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/10.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
10
Kernel
Qué es? Layered (hardware..UI) Microkernel Modular
![Page 11: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/11.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
11
Virtual machines
Descripción ejemplificada de “The Da Vinci Machine” para JVM, comparándolo con IronPython en .NET
![Page 12: Ayudantía 2: El Sistema Operativo](https://reader036.fdocuments.es/reader036/viewer/2022072016/56813137550346895d97ab09/html5/thumbnails/12.jpg)
Ayudantía Sistemas Operativos - http://villaseca.wordpress.com
12
Debugging
Lo hace el sistema operativo?Stack traces
O la VM?Exceptions
Ejemplo de debugger por debajo del SOSoftICE