how to convert Sudo Code to C language of these two functions
MsgEnv * request_msg_env( ) {
search for free memory block in the queue of the free blocks(shown in the data structure section );
if (no memory block is available)
{
Block invoking process(Process_switching();
}
else
{
update the data structure;
return a pointer to the memory block;
}
int release_msg_env( MsgEnv * msg_env_ptr ) :
{ if (memory block pointer is not valid)
return ErrorCode;
Add memory block to the pool;
Update datastructure;
Return Sucess code
}
these are the data stucures used in the above functions
// data strucure of message envelops
typedef struct MsgEnv{ struct MsgEnv *Msg_env_ptr;
char body[128];
int time_delay,sender_pid, Target_pid;
int Message_type ; }MsgEnvi;
// queue of message envelops
typedef struct MsgEnvq {
MsgEnvi *head;
MsgEnvi *tail;
MsgEnvi* (*dequeue)();
int (*enqueue)(MsgEnvi *env);
struct MsgEnvq *next;
};
In: Computer Science
Many people have done a reasonably good job conserving water, primarily by turning off their landscape irrigation and allowing their yards to dry up; others have not.
1. Your neighbor wants to conserve water, but does not want to stop watering altogether. They do want to try and keep their landscape green and healthy. What advice / suggestions would you offer your neighbor?
2. 2017 Update: With all of the rain we had the winter of 2017, and the snow pack at almost 180% of normal, do you think that the drought is over and we can go back to our normal water usage, or do you believe that this will be temporary, and we should continue to practice water efficiency and water conservation?
3. 2020 Update: How might the winter of 2019/2020 change your answer for question #2 above?
In: Other
Consider the following set of requirements for a university
information system that is used to keep track of students’
transcripts.
R1: The university keeps track of each student's name, student
number, class, and degree program.
R2. The university consists of various departments. Each department is described by a name, department code and phone.
R3. Each course has a course number, course name, and credits.
R4. Each section has an instructor, course number, and section
number. There might be multiple sections of each course offered in
the semester.
The other requirements for this application are:
R5: An administrator can update the courses to be taught by instructors, and enter the list of students taking a course.
R6: An instructor can enter and update the grades of the course(s) taught by this instructor.
R7: A student can request a grade report from the information system.
REQUIRED
In: Computer Science
10. What are the different types of replication topologies?
In: Computer Science
LinkedIn is a valuable networking technological tool in business. For this discussion you will create or update a LinkedIn account to assist in building your professional network and credibility.
In: Operations Management
The use of a true experimental research design in empirical research is usually not applicable when ______. 1. participants cannot be randomly allocated to groups 2. it is expensive to transport participants to the laboratories 3. it is difficult to find willing individuals to participate 4. strict control measures are put in place throughout the research
In: Economics
A 7.364 gram sample of an organic compound
containing only C, H, and O is analyzed by combustion analysis and
9.343 g CO2 and 2.550
g H2O are produced.
In a separate experiment, the molar mass is found to be
104.1 g/mol. Determine the empirical formula and
the molecular formula of the organic compound.
In: Chemistry
A steel cylinder contains 6.812×10−3 kg of an unknown gas. Combustion analysis indicates that the gas has the empirical formula CH4. The volume of the cylinder is 2.20×103mL, and the pressure inside the cylinder is 3.6×103mmHg. The cylinder is stored in a closet at 25.0 ∘C.
What is the molecular formula of the gas?
In: Chemistry
When 0.25 g of Na combines with elemental oxygen under certain conditions, it forms 0.42 grams of a binary compound NaxOy - made of Na and O atoms only. Find its empirical formula:
Find its molecular formula, given its molar mass of 78g/mol:
In: Chemistry
Could you please do a unit analysis on Riedel and Antoine equation to determine the units of the empirical coefficients. Pressures in kPa and temperatures in Kelvin.
Riedel equation : lnP(T) = Ar + Br/T + Cr.ln(T) + Dr.T6
Antoine equation: lnP(T) = Aa - Ba/(Ca+T)
In: Other