Cheat Sheet Flashcards
Explain the different steps involved in the execution of a system call
Answer:
process puts the code of the sys call in a register.
It generates a trap that switches the execution mode from user mode to kernel mode.
The kernel executes the right system call using the system call code.
The kernel restores the mode bit so that the execution resumes in user mode.
What is the main difference between a thread and a process?
Answer: Different threads of a same process share the same memory address space. Processes
have different memory address spaces
Give an advantage of using a Direct Memory Access (DMA).
The processor can execute other tasks in parallel to the execution of the memory transfer.
Other possible answer: The processor must treat only one interrupt once the whole memory
transfer is completed instead of one interrupt for each data transfer.
What is the difference between a stream I/O device and a block I/O device?
In stream I/O device, the data is being transfered bit-by-bit
In block I/O device, the data is being transfered by fixed-block size
Explain the different steps involved in the execution of a system call.
Answer:
process puts the code of the sys call in a register.
It generates a trap that switches the execution mode from user mode to kernel mode.
The kernel executes the right system call using the system call code.
The kernel restores the mode bit so that the execution resumes in user mode.
Give the definition of a set of deadlocked tasks?
Answer:
A set D of tasks is called deadlocked if - all tasks in D are blocked or terminated (normally or abnormally)
- there is at least one non terminated task in D, and
- for each non terminated task t in D , any task that might unblock t is also in D.