13.07.2015 Views

de un proceso

de un proceso

de un proceso

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sincronización con interrupciones en MP• Sincronización entre llamada/rutina <strong>de</strong> int. y otra rutina <strong>de</strong> int.:– Rutinas usan spinlock y rut. interrumpida inhibe localmente interr.int spin_lock_interrupcion(int cerrojo, int nivel) {nivel_anterior = fijar_nivel_int(nivel);spin_lock(cerrojo);return nivel_anterior; }spin_<strong>un</strong>lock_interrupcion(int cerrojo, int nivel) {spin_<strong>un</strong>lock(cerrojo);fijar_nivel_int(nivel); }insertar_ultimo(lista, BCP){prev=spin_lock_interrupcion(lista->cerrojo,NIVEL_MAX);lista->ultimo->siguiente = BCP;lista->ultimo = BCP;spin_<strong>un</strong>lock_interrupcion(lista->cerrojo, prev); }Diseño <strong>de</strong> Sistemas Operativos 110 Fernando Pérez Costoya (2008)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!