System Call guarantees that a computer system will transition from user mode to kernel mode.
System calls are the mechanism by which user-level programs can request services from the operating system (OS) and transition from user mode to kernel mode. When a user-level program executes a system call, it causes an interrupt to occur, which transfers control to the OS kernel. The OS kernel then performs the requested service and returns control to the user-level program.
Function calls and malloc calls do not necessarily result in a transition to kernel mode. They are both operations that can be performed entirely within user mode.
A page fault can trigger a transition to kernel mode, but it is not guaranteed to do so. A page fault occurs when a program attempts to access a page of memory that is not currently in physical memory. In this case, the OS must handle the page fault and may need to allocate physical memory or swap pages in/out of memory. This requires kernel mode access, but some page faults can be handled entirely within user mode without kernel intervention.