A specialised monitor capable of acquiring and
releasing a resource in a system with R resources and N processes,
each having a unique priority number, following the rule that the
lowest priority number gets the resource
We can start by defining
#define MAXRESOURCES R
#define MAXPROCESSES N
The solution for the above problem needed in C Language |
Request for Question Clarification by
studboy-ga
on
23 Mar 2003 14:51 PST
Does this have anything to do with deadlock prevention and resource
sharing? We need a more detail spec (ie, post your assignment spec,
etc). The instructor usually gives you a template / library of things
to modify in addition to a handout. We need those. Thanks. Also, I
think the cost of implementation for this will need to be a little
higher...
|
Clarification of Question by
dilan-ga
on
23 Mar 2003 15:17 PST
Hi studboy-ga
I have seen this question in a C programming book and that doesnt
mention anything about deadlock prevention and resource sharing. It
further syas as its a short algorithm we do not need a computer to
write this code.
Any way I would be grateful if you can give me a solution for this
problem.(I have made a change in the price list)
|
Request for Question Clarification by
studboy-ga
on
23 Mar 2003 17:14 PST
Thanks dilan-ga. Now we have more clue--can you tell me the title of
the book you mentioned? Is this an operating systems / computer
architecture book by chance? Usually the questions are at the end of
a particular chapter--if you can tell me what that chapter is all
about maybe I can get a better idea of where this fits in. Resources
and processes are a common theme in several computer algorithms--not
just one. Also, you mention "dos not require a computer to write the
code"--how are you going to check the code if you don't have a
computer? Is this for a class? If this is for a class that does not
require computers I suspect that what your instructor is looking for
is not C code, but some kind of "pseudo" code per se. Thanks.
|
Clarification of Question by
dilan-ga
on
23 Mar 2003 18:25 PST
Hi studboy!
This question book is from my university and its an operating systems
book.
Actually what was meant by, "no need for a computer" is this question
should not take that long to figure out the answer, I think.
The chapter was Pointers and I'm not sure whether its fully related to
the topic of pointers.
No doubt, answer needed in C code.
Thanks
|
Request for Question Clarification by
studboy-ga
on
23 Mar 2003 20:46 PST
Hi dilan-ga,
First of all, thanks for the clarification. Secondly, I need more
clarification: can you tell me the title/author of this book an dthe
chapter/page #? There's a library/bookstore nearby from where I can
take a look, but you must provied me enough info to find this book.
Thanks.
|
Request for Question Clarification by
studboy-ga
on
23 Mar 2003 20:48 PST
Also, if this is a university specific book (like a collection of quad
questions), please specify the universoty name. Thanks.
|