Pregunta

que describe el cambio entre el espacio de usuario y el espacio del kernel que ocurre en una llamada al sistema. El artículo dice

Una aplicación espera la finalización de la llamada al sistema antes de reanudar la ejecución de modo de usuario.

Ahora, hasta ahora estaba asumiendo que algunas llamadas al sistema son blocking, mientras que otros son non-blocking. Con el comentario anterior, ahora estoy confundido. ¿Quiere decir esto que todas las llamadas al sistema están bloqueando o hizo que entienden mal el concepto?

¿Fue útil?

Solución

You seem to be overloading the term 'blocking'.

Any context switch you make to the kernel, you have to wait for it to switch back to the usermode before your application can continue. This is not what is usually called 'blocking'.

In the current kernel design, blocking calls are calls where the kernel returns only when the request is complete (or error happens). These calls usually take longer amounts of time and usually lead your process to be scheduled out. For instance, many IO calls are blocking.

There are system call which provides asynchronous IO and they are non-blocking. Note that there is still a context switch that happens here, only the application has to take care of the asynchronous nature of the call.

The paper seems to aim to do away with this context switch back and forth (exception-less system calls) and try to make all the calls asynchronous.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a cs.stackexchange
scroll top