Question

What is the purpose of the system call stack? How does it support recursion?

What is the purpose of the system call stack? How does it support recursion?

Homework Answers

Answer #1

System call:

The system call provides the service to the user and it is a way by which the computer program requests service from the kernel. The kernel manages the key component of the operating system like device management, file management, CPU scheduling, memory management, etc.

System call stack:

The system call stack is a stack data structure that is used to store the information of currently executing process or function or subroutines. This stack is also known as run time stack or execution stack or execution stack.

A stack is a linear data structure in which insertion and deletion operation performed at the top always.

The main use of system call stack is to store the details about the subroutines.

Yes, it support recursion.

When a function is called then the return address is pushed on to the stack.

The recursive function calls to itself and a terminate or base condition is specified which breaks the infinite execution of the recursive call. When the function call to itself then it works like a continue statement and the control goes to the starting of the function with updated argument value.

In recursion, when a function is called then the return address is pushed on to the top of the stack every time and this address is used to return from the function activation.

So, recursion is automatically supported by the system call stack.  

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
x86, 32bit system language question 1. Your stack looks like 0x1050 55 0x1054 57 <- ESP...
x86, 32bit system language question 1. Your stack looks like 0x1050 55 0x1054 57 <- ESP 0x1058 58 You execute push 0x1050 instruction. Stack grows down. How does you stack look like after this instruction? 2. Your stack looks like 0x1050 55 0x1054 57 <- ESP 0x1058 58 You execute pop eax instruction. Stack grows down. What is inside eax and how does you stack look like after this instruction?
What is the Java Virtual Machine? What purpose does it serve & how does it facilitate...
What is the Java Virtual Machine? What purpose does it serve & how does it facilitate program portability?
The Assingment of memory takes place in contiguous blocks.We Call this Stack memory allocation because the...
The Assingment of memory takes place in contiguous blocks.We Call this Stack memory allocation because the assingment takes place in the function call Stack.The size of the memory to be allocated is known to the compiler.When a function is called,its variables get memory allocated on the stack. Suppose you have x functions running on your Pc where x= (3+ your roll number).These programms need memory allocation in decreasing order.(eg f4,f3,f2,f1......) Write a C++ Code to perform following instructions. a:) Insert(push)...
Java: How does Recursion change my view on repetition, and why do I need to be...
Java: How does Recursion change my view on repetition, and why do I need to be concerned about Optimality? As usual, Please comment on two of your classmates posts.
Name a purpose of immersion oil in light microscopy; What does it do? How does it...
Name a purpose of immersion oil in light microscopy; What does it do? How does it work? What objective lenses on your microscope should it be used with?
What is the purpose of RBRVS type of reimbursement system? Briefly explain how RBRVS works?
What is the purpose of RBRVS type of reimbursement system? Briefly explain how RBRVS works?
What is the purpose of clinical decision support systems? Support your answer by giving any CDSS...
What is the purpose of clinical decision support systems? Support your answer by giving any CDSS example used in the hospital? please write by computer form.
What is the purpose of the cash short and over account? How does it affect the...
What is the purpose of the cash short and over account? How does it affect the income statement? in your own words
What alternative view of consciousness does Lund offer and how does he      support it?
What alternative view of consciousness does Lund offer and how does he      support it?
The Windows CreateProcess() system call creates a new process. What is the equivalent system call in...
The Windows CreateProcess() system call creates a new process. What is the equivalent system call in UNIX? NTCreateProcess() fork() process() getpid()
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT