13.07.2015 Views

de un proceso

de un proceso

de un proceso

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sincronización en multiprocesadores• Nuevas situaciones problemáticas– Una llamada pue<strong>de</strong> ejecutar mientras lo hace <strong>un</strong>a rutina <strong>de</strong> int.• Soluciones <strong>de</strong> sincronización no válidas para SMP– Prohibir interrupción no impi<strong>de</strong> que ejecute rutina en otras UCPs• Técnica básica: Uso <strong>de</strong> spinlocks– Espera activa sobre variable usando accesos atómicos a memoriaspin_lock(int cerrojo) {while (TestAndSet(cerrojo) == 1);}spin_<strong>un</strong>lock(int cerrojo) {cerrojo = 0;}Diseño <strong>de</strong> Sistemas Operativos 109 Fernando Pérez Costoya (2008)

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

Saved successfully!

Ooh no, something went wrong!