Mechanism for code and data sharing, Operating System

Q. Consider a system in which a program is able to be separated into two parts: code and data. The CPU recognizes whether it wants an instruction (instruction fetch) or data (data fetch or store). Consequently two base-limit register pairs are provided: one for instructions and one for data. The instruction base-limit register couple is automatically read-only so programs can be shared among different users. Converse the advantages and disadvantages of this scheme.

Answer: The main advantage of this scheme is that it is an effective mechanism for code and data sharing. For instance only one copy of an editor or a compiler needs to be kept in memory and this code can be shared by all processes needing access to the editor or else compiler code.

Another benefit is protection of code against erroneous modification. The only drawback is that the code and data must be separated which is typically adhered to in a compiler-generated code.

Posted Date: 7/27/2013 5:08:03 AM | Location : United States







Related Discussions:- Mechanism for code and data sharing, Assignment Help, Ask Question on Mechanism for code and data sharing, Get Answer, Expert's Help, Mechanism for code and data sharing Discussions

Write discussion on Mechanism for code and data sharing
Your posts are moderated
Related Questions
Developing Code with Threads Writing code to support a thread-based implementation is very straightforward. Simple APIs are presented to the developer for each threads package.

What is operating system?

Consider the following C program where M, N, K are predefined constants. Assume int is 4 bytes. Suppose this program is run on a machine with 4KB page size and 32 TLB entries. Init

GUI - Short for Graphical User Interface a GUI Operating System contains icons and graphics and is commonly navigated by using a computer mouse. Below are some instances of GUI Op

Q. What are the tradeoffs concerned in rereading code pages from the file system versus using swap space to store them? Answer: If codes pages are accumulate in swap space th

Define the properties operating systems: Batch :- Jobs with similar needs are batched together and  run through the computer as a group by an operator or automatic job sequenc

Q. What is the purpose of system calls? Answer: System calls permit user-level processes to request services of the operating system.

Q. Consider a distributed system with two sites A and B. Consider whether site A can distinguish among the following: a. B goes down. b. The link between A and B goes down.

Q. Consider the following page-replacement algorithms. Rank the algorithms on a five-point scale from "bad" to "perfect" according to their page-fault rate. Detach those algorithm