For this post, an area of threads is discussed. On January the first of 2015, Davidlohr Bueso released a paper called Scalability Techniques for Practical Synchronization Primitives dealing with locks. According to Bueso, locks are a method of concurrent execution of more than one thread. The importance of these locks is that they provide security and accuracy for the context of execution through excluding mutually. Furthermore, the efficiency and accuracy of locks are dependent on hardware architecture. Bueso continued by explaining that the Linux kernel utilizes pointers with locks, an attribute of the C programming language that others such as Java and Visual Basic do not contain. The reasons for this are that the computer is aware of when to stop spinning, and as a debugging tool it allows for deadlock detection. As Bueso mentioned, previous strategies as old as 1975 conceptualized lock ownership within databases. This is useful for deciding for or against reentrant locks that usually utilize a counter field. There are multiple lock paths including Fastpath, Midpath, and Slowpath. All of these can block, the aforementioned primitives require a sleeping context for safety. These locks can be a determining factor in performance. Along with the previously mentioned information, there is a resource cost of utilizing a certain lock that is determined by the size and latency. Essentially, structure size determines CPU cache and memory resource allocation. This becomes increasingly relevant as a structure is utilized with increasing frequency. Fairness is determined by the strictness of semantics. Bueso concluded by explaining the cost of not optimizing with having initiative as greatly important.
While reading this, I thought of the Biblical Scriptures. The Bible has much to say about fairness and the cost of not caring for the resources that our blessed Father in heaven has given us. The Bible says, “The LORD God took the man and put him in the Garden of Eden to work it and take care of it” (NIV, Gen 2:15). The blessing of God is for man, male and female, to properly care for God’s creation. This can be interpreted as the bestowing of a responsibility and a privilege. This has helped me understand more about how computer hardware is directly affected by software. Particularly, strictness of semantics determines the prevention or allowing of resource starvation. In my personal experience, software applications starving other parts of a user experience from correct use can be burdensome, and efficiency of thread use may prevent that.
BUESO, D. (2015). Scalability Techniques for Practical Synchronization Primitives. Communications Of The ACM, 58(1), 66-74. doi:10.1145/2687882