Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 4: drptr (a pointer to the allocated memory) and dsptr (a pointer to a global data structure) are passed as parameters to dskenq function.

image text in transcribed

Problem 4: drptr (a pointer to the allocated memory) and dsptr (a pointer to a global data structure) are passed as parameters to dskenq function. Read the code segment carefully to answer the following questions. 1 Problem 2 Code Segment 2 dskeng(drptr, dsptr) struct dreq *drptr; struct dsblk *dsptr: struct dreq p, q DBADDR block; int st 18 ? dsptr->dreqlst drptr drptr->drnext- DRNULL; dskstrt(dsptr); return (DONQ); 12 13 14 15 ? 16 17? 18 19 20 21 v block drpt r--d rdba ; if (p->drdba--block && (st-dskqopt(p, q, drptr)!-SYSERR)) return(st); if ((q->drdba block && block drdba) II (q-drdbablock && block > p->drdba drptr->drnextp; q--drnext = drptr; return(DONQ) 23 24 25 A 26 A 27 28 29 q->drnext- drptr return(DONQ) (2 points) Does the function dskstrt have access to the allocated memory? If yes, explain in one sentence how does it get the access A. B. (2 points) What could be functions that get access to the allocated memory as a result of the assignment in line 28? Explain your answer in one sentence

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

Step: 3

blur-text-image

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

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

How should an expert witness deal with opposing experts?

Answered: 1 week ago