In the figure below, write the action of entry section and exit section to perform critical section in assembly language

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

In the figure below, write the action of entry section and exit section to perform critical section in assembly language

Post by answerhappygod »

In the figure below, write the action of entry section and exit section to perform critical section in assembly language. (However, suppose that the Lock bit (flag) is at the memory address 0x10000000
The test-and-set function may be implemented with LDREX and STREX commands. LDREX and STREX have the same grammar as LDR and STR, but are always cache miss, write-through, and are always used as pairs for read-modify-write.
If processor 1 reads a memory area in LDREX, it does not occur until processor 1 writes STREX even if processor 2 attempts to read the same memory area in LDR or LDREX. )
In The Figure Below Write The Action Of Entry Section And Exit Section To Perform Critical Section In Assembly Language 1
In The Figure Below Write The Action Of Entry Section And Exit Section To Perform Critical Section In Assembly Language 1 (16.35 KiB) Viewed 52 times
Load lock variable No Unlocked? (-07) Yes Try to lock variable using swap read lock variable and then set variable to locked value (1) No Succeed? (-07) Begin update of shared data Finish update of shared data Unlock set lock variable to 0 -Entry Section -Exit Section
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply