Cheat Sheet Flashcards

1
Q

Explain the different steps involved in the execution of a system call

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the main difference between a thread and a process?

A

Answer: Different threads of a same process share the same memory address space. Processes
have different memory address spaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give an advantage of using a Direct Memory Access (DMA).

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between a stream I/O device and a block I/O device?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Explain the different steps involved in the execution of a system call.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give the definition of a set of deadlocked tasks?

A

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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly