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.

User programs such as hello and ugrep calls custom system calls "print",

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!