Question
User programs such as hello and ugrep calls custom system calls print, readline, and getarg. However, you wrote the corresponding function body in do_print, do_readline,
User programs such as hello and ugrep calls custom system calls "print", "readline", and "getarg". However, you wrote the corresponding function body in "do_print", "do_readline", and "do_getarg". Answer the following questions which relate to how the custom system calls ends up executing the code in "do_XXX" functions.
(1) What information does void *vector[] store?
(2) How does this vector gets pinned to a fixed address in the memory?
(3) Explain what the code in call-vector.S file does to implement the custom system call in a few sentences. The code relevant to readline is given as a reference.
text _readline = 0x05000000 + (0 + B) .align readline: 16 mova jmp _readline, frax rax -globl readline type readline, function text _readline = 0x05000000 + (0 + B) .align readline: 16 mova jmp _readline, frax rax -globl readline type readline, function
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started