Virtual

profilerefresh
virtual.docx

Virtual

1) Discussion #1

2) Discussion #2

3) Answer the students

Discussion #1

· Research a processor architecture and how it supports virtual memory.

Post a 2- to 3-paragraph analysis of the processor’s support for virtual memory. Do the following:

· Summarize how the processor architecture supports virtual memory.

· Identify at least two advantages and two disadvantages in its virtual memory support.

· Explain what effects (positive or negative) the architecture’s virtual memory support has on application software.

Discussion #2

For this Discussion, you will evaluate the failure of a distributed application and analyze where in the OSI Model the failure may be related to.

To prepare:

· Consider a distributed application that you use and for which you have experienced a recent failure.

Post a 2- to 3-paragraph evaluation of the application failure you dealt with. Do the following:

· Describe the application and the failure.

· Analyze the failure relative to each layer of the OSI model. For each layer, identify and describe at least one service from that layer that may have failed and caused the application failure you experienced.

· Explain which layer you consider to be the most likely cause of the failure you experienced and why.

Answer these students:

Respond two of your colleagues' postings in one or more of the following ways:

· Ask a probing question.

· Share an insight from having read your colleague’s posting.

· Offer and support an opinion.

· Validate an idea with your own experience.

· Make a suggestion.

· Expand on your colleague’s posting.

Student # 1

Evaluating Techniques to Ensure Atomicity and Concurrency Control

Modern Operating Systems (OS) like Windows 10, Linux (Various flavors) and Apple’s iOS run multiple programs at the same time. The single program can run several threads of control at the same time. There is always a chance that threads that are running might be accessing shared information concurrently. Thus, it becomes necessary to regulate concurrency control. Concurrency control is all about ensuring that the processes are constrained to avoid accessing shared information at the same time (Weihl, 1998). Locking is one technique that is used to manage concurrency control.

            Spinlocks put the thread in a loop and it continuously checks until the lock becomes available. The threads are active in the OS but they are not processing anything at al. The locks are mostly released dynamically but they can be released explicitly. This type of technique can be wasteful if the threads are held for a longer duration. By implementing the spin locks correctly, as they offer challenges as the programmers must take into account the possibility of simultaneous access to the lock, which could cause race conditions. Generally, such implementation is possible only with special assembly-language instructions, such as atomic test-and-set operations, and cannot be easily implemented in programming languages not supporting truly atomic operations (Silberschatz & Galvin, 1994).

            Spinlocks are best implemented using the all-or-nothing atomicity. It assumes that there is no concurrency. Plus, modern Central Processing Units (CPU) are designed to handle multithreading and if it is implemented on a single core CPU, it has to wait for threaded to be unlocked. On a multi-core CPU, threads are only locked for a small period of time and threads can take advantage of the runtime.

           

References

Silberschatz, Abraham; Galvin, Peter B. (1994). Operating System Concepts (Fourth ed.). Addison-Wesley. pp. 176–179

Weihl, W. E. (1988). Commutativity-based concurrency control for abstract data types. IEEE Transactions on Computers, 37(12), 1488-1505.

 

Student # 2

Concurrency is the ability of multiple users to access data at the same time. For example, in Microsoft SQL Server Compact, concurrency control is achieved by using locks to help protect data because locks control how multiple users can access and change shared data at the same time without conflicting with each other. According to Microsoft (2017), in a database scenario, there are two types of concurrency control mechanisms: optimistic concurrency control and pessimistic concurrency control.

Optimistic concurrency control works on the assumption that resource conflicts among multiple users are unlikely, and it permits transactions to execute without locking any resources. These resources are only checked when transactions are trying to change data to determine whether any conflict has occurred (for example, by checking an Id number). If a conflict occurs, the application must read the data and try the change again. Optimistic concurrency control can be manually built into an application by tracking database access since it is not provided with a product. Pessimistic concurrency control, on the other hand, locks resources as needed, for the duration of a transaction. SQL Server Compact supports pessimistic concurrency control because resources are locked as needed for the duration of a transaction. Therefore, the primary difference between the two is that pessimistic concurrency control assumes that conflicts will occur and avoids them through exclusive locks and explicit synchronization, while optimistic concurrency control assumes that conflicts won't occur, and are therefore dealt with when they happen.

If the modification and reading of data by multiple users are unmanaged, concurrency problems can occur. For example, if several users access a database at the same time, their transactions could try to perform operations on the same data at the same time. In SQL Server Compact, some of the concurrency problems that occur include lost updates, inconsistent analysis (nonrepeatable reads), and phantom reads.

Reference

Microsoft (2017). Concurrency. Retrieved March, 21, 2017 from https://technet.microsoft.com/en-us/library/ms171845(v=sql.110).aspx