Subscribe by Email


Showing posts with label Difference. Show all posts
Showing posts with label Difference. Show all posts

Thursday, February 4, 2010

Difference between Location independence and Static location transparency

There are few aspects that differentiates location independence and static location transparency :
- In location independence, divorcing data from location provides better abstraction fro files. Location independent files can be viewed as logical data containers that are not attached to specific storage location.
In static location transparency, the file name still denotes a specific, although hidden, set of physical disk blocks.

- In static location transparency, users can share remote files by simple naming the files in a location transparent manner, as though the files are local but nevertheless, logical names are still attached to physical storage devices.
Location independence promotes sharing the storage space as well as the data objects.
A possible benefit of such a view is the ability to balance the utilization of disks across the system.

- Location independence separates the naming hierarchy from the storage devices hierarchy and from the inter-computer structure.
In static location transparency, the correspondence between component units machines can be easily exposed.

Once the separation of name and location has been completed, files residing on remote server systems may be accessed by different clients. In fact, these clients may be diskless and rely on servers to provide all files, including the operating system kernel.


Wednesday, August 26, 2009

Overview of Threads

A thread is an encapsulation of the flow of control in a program. Most people are used to writing single-threaded programs - that is, programs that only execute one path through their code "at a time". Multi-threaded programs may have several threads running through
different code paths "simultaneously".
A thread is similar to the sequential programs: a single thread also has a beginning, an end, a sequence, and at any given time during the run time of the thread there is a single point of execution. However, a thread itself is not a program--it cannot run on its own--but runs within a program.

Why use threads?
Threads should not alter the semantics of a program. They simply change the timing of operations. As a result, they are almost always used as an elegant solution to performance related problems. Here are some examples of situations where you might use threads :
* Doing lengthy processing: When a windows application is calculating it cannot process any more messages. As a result, the display cannot be updated.
* Doing background processing: Some tasks may not be time critical, but need to execute continuously.
* Doing I/O work: I/O to disk or to network can have unpredictable delays. Threads allow you to ensure that I/O latency does not delay unrelated parts of your application.

In the program, some operations incur a potentially large delay or CPU hogging, but this delay or CPU usage is unacceptable for other operations; they need to be serviced now.
* Making use of multiprocessor systems: You can't expect one application with only one thread to make use of two or more processors! Chapter 3 explains this in more detail.
* Efficient time sharing: Using thread and process priorities, you can ensure that everyone gets a fair allocation of CPU time.

Similarities between process and threads :
* Like processes threads share CPU and only one thread active (running) at a time.
* Like processes, threads within a processes, threads within a processes execute sequentially.
* Like processes, thread can create children.
* And like process, if one thread is blocked, another thread can run.

Differences between process and threads :
* Unlike processes, threads are not independent of one another.
* Unlike processes, all threads can access every address in the task.
* Unlike processes, thread are design to assist one other. Note that processes might or might not assist one another because processes may originate from different users.


Facebook activity