MOTIVOS DE LAS
INTERRUPCIONES
•Excepcionesdeprograma:haydeterminadascausasque
hacenqueunprogramapresenteunproblemaensu
ejecución,porloquedeberágenerarseunainterrupción,de
formaqueelsistemaoperativotratedichacausa.Ejemplo:
eldesbordamientoenlasoperacionesaritméticas,la
divisiónporcero.
MOTIVOS DE LAS
INTERRUPCIONES
•Interrupcionesdereloj:Elobjetivodeestasinterrupcioneseshacer
queelsistemaoperativoentreaejecutaroperacionesdeforma
sistemáticacadaciertointervalodetiempo.Deestamanera,el
sistemaoperativopuedeevitarqueunprogramamonopoliceeluso
delacomputadoraypuedehacerqueentrenaejecutarseprogramas
endeterminadosinstantesdetiempo.Estasinterrupcionesse
producencadavariosmilisegundos,porejemplocada20
milisegundos.
•ENMASCARABLES :Elprocesadornopuedeatenderlaola
ignora.Seusanparalaatencióndelperiférico.
•NOENMASCARABLES:Elprocesadornopuedeevitar
atenderlaytienenmayorprioridad.
HAY 2 TIPOS DE INTERRUPCIÓN
EXTERNAS POR HARDWARE:
NO ENMASCARABLES
•NoEnmascarables(NoInhibible).
•ElprocesadorNopuedeevitaratenderla.Tienemayor
prioridadqueotrotipodeinterrupciones.
•Seusaeneventostipocatástrofeparaelsistema.
•Significaquelainterrupciónnopuedeserdeshabilitada
porsoftware.Estetipodeinterrupcionesocurrencuando
serecibeunaseñalenlapatillaNMIdelprocesador.
•Deprioridadmásaltaquelasenmascarables.
EJEMPLO DE INTERRUPCIÓN DE
HARDWARE
Lasrutinasdeserviciodelasinterrupcionesporhardware
debensertransparentesalusuario,estoes,deben
preservartodossusregistros.
EJEMPLO DE INTERRUPCIONES DE
HARDWARE
•Unejemploclarodeestetipodeinterrupcionesesla
queactualizaelcontadordelrelojinternodela
computadora,elhardwarehaceelllamadoaesta
interrupciónvariasvecesduranteunsegundopara
mantenerlahoraactualizada.
INTERRUPCIONES POR
SOFTWARE:
CLASIFICACIÓN
Este tipo de interrupciones podemos separarlas en dos
categorías: las interrupciones del sistema, y de usuario.
Interrupciones del Sistema operativo: DOS y del BIOS.
Interrupcionesdelusuario:Sonaquellasprogramadaspor
elusuario,esdecir,elusuariodecidecuandoydonde
ejecutarlas,generalmentesonusadaspararealizarentrada
ysalida.
Estetipode
interrupcionesson
deprioridadmás
altaquelasde
hardware
(enmascarablesy
noenmascarables),
deformaquesise
recibe una
interrupción
hardwaremientras
queseejecutauna
software,esta
última tiene
prioridad.
INTERRUPCIONES DE
SOFTWARE
26
EXCEPCIONES DEL
PROCESADOR
•Duranteelfuncionamientodelprocesadorpuedenocurrir
circunstanciasexcepcionales;esusualcitarcomoejemploelcasode
unadivisiónporcero.Enestoscasos,elprocesadorgenerauna
excepción,queestratadacomosifueseunainterrupciónsoftware
(§6.2),conladiferenciadequeelnúmerodeinterrupciónasociado
dependedeltipodeexcepción.
Orden de prioridad:
•1º:Excepciones del procesador.
•2º:Interrupciones software.
•3º:Interrupciones hardware no enmascarables.
•4º:Interrupciones hardware enmascarables.