2

I searched before I asked a question and found this post.
Difference between Syscall and Traps

But this is not clear to me.
Many books explain syscall and trap at once.
In another book said, syscall is a kind of trap.

Someone says that they generate a trap through a syscall, which causes chaos for me.

Aren't both syscall and trap are software interrupts?

I understood that the program need something but It can only work in kernel mode.
So requests syscall and through the trap the operating system takes the cpu.

It is obvious that interrupts occur during the first syscall.
But interrupt occur again during the trap phase after syscall? I'm confused.

  • This could be different for different architectures - could you clarify which one you have in mind (and add the corresponding tag to your question)? – Nate Eldredge Feb 13 '20 at 17:43
  • I thank you for your interest. I studying about the architecture of a Linux operating system. – UnluckyJung Feb 13 '20 at 17:47
  • 1
    I mean, which CPU architecture? [Linux runs on many.](https://en.wikipedia.org/wiki/List_of_Linux-supported_computer_architectures) x86-32, x86-64, ARM, MIPS, SPARC, etc, etc...? – Nate Eldredge Feb 13 '20 at 17:56
  • Oops, sorry. `x86-32.` I am studying the operating system for the first time and reading an introductory book. And almost all of the books are described as x86-32. – UnluckyJung Feb 13 '20 at 18:07

0 Answers0