Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions