Question

[2 pts] in decimal, what does b-? a. short a --1 ushort *b &a b-? [2 pts] What conditions are required for a race condition?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

b) we can say race condtion is some situation where 2 or more process attemps
to use same resource at a time


a race condtion can occurs in many things like with device within process and
also within threads etc


let us talk by considering threads.


suppose we have 2 threads .and both the threads are modifieng and accessing same shared resources then the result is definatly unpredictable and causing some bad sitation


so in order to avoid these there should be a things or race condtions to avoid this

mutex
semaphores

mutex is something like for example producer consumer are working on same resouces.
here key is used ..when producer performs any action on resources uses its key and
and consumer waits until producer performs actions


semaphores:

we can say semaphores is more generalized thing. we can say shared memory is divided and
producer and cosnumer performs actions on different blocks at same time

c)

purpose of software security:


purpose of the software security is to make our software protected from outer attacks .

there are many ways in which software gets attacked .here are some of them

virus
malware
attachks
data stolen
etc

to provide a sucuirty we have many applications like anti virus ,firewall etc

and also some authenitcation algoritms to control acces from unauthorized persons for
sensitive information in software.

a)short a=-1;
ushort *b= &a;

above both declaration cause error:

diffrenece between short and ushort is short stores from range of -32768 to 32767, and ushort can be range  0 to 65535
so above declaration cause following error:

main.cs (13,8): error Cs0214: Pointers and fixed size buffers may only be used in an unsafe context main.cs(13,19): error CSe

comment:

please comment me if required further changes

Add a comment
Know the answer?
Add Answer to:
[2 pts] in decimal, what does b-? a. short a --1 ushort *b &a b-? [2 pts] What conditions are required for a race condition? b. [2 pts] The purpose of software security is? c. [2 pts] in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT