What is Write Back? What are the pre-conditions?

What is Write Back? What are the pre-conditions?

Asked on November 13, 2018 in Database.
Add Comment


  • 6 Answer(s)

    Data is written into the cache every time a change occurs, is called write back, a storage method.

    • But it is written into the corresponding location in main memory only at specified intervals or under certain conditions.

    • The data in cache is called fresh, when a data location is updated in write back mode, and stale is defined as the corresponding data in main memory, which no longer matches the data in cache.

    • If a request for stale data in main memory arrives from another application program, the cache controller updates the data in main memory before the application accesses it.

    • As compared with writing the same data into both cache and main memory, Write back takes less time to write data into cache alone, thus optimizes the system speed .

    • However, this speed comes with the risk of data loss in case of a crash or other adverse event.

    • Write back tolerates occasional data loss events. An alternative method called write through can be used in more critical applications such as banking and medical device control, which practically eliminates the risk of data loss because every update gets written into both the main memory and the cache.

    • In write through mode, the main memory data always stays fresh.

    Writeback will not have an effect on the following changes.
        i. A cube’s measure groups, or dimensions, Processing of a cube.
        ii. Adding attributes to any dimension.
        iii. Adding a new dimension.
        iv. Deleting a dimension that does not include the writeback.
        v. Adding, modifying, or removing a hierarchy.
        vi. Adding a new measure.

    • The following changes cannot be made without removing the writeback data:

    1.       Deleting an attribute, or if the attribute is included in the writeback, its attribute hierarchy, . This includes       explicitly removing the attribute, or its attribute hierarchy, or removing the attribute’s parent dimension.
         
    2.      Deleting a measure included in the writeback.
         
    3.      Adding an attribute without a level to a dimension included in the writeback.
           
    4.     For a dimension included in the writeback, changing the dimension granularity.
    Answered on November 13, 2018.
    Add Comment

    WRITE BACK is a storage method in which data is written into the cache every time a change occurs, but is written into the corresponding location in main memory only at specified intervals or under certain conditions.

    When a data location is updated in write back mode, the data in cache is called fresh, and the corresponding data in main memory, which no longer matches the data in cache, is called stale. If a request for stale data in main memory arrives from another application program, the cache controller updates the data in main memory before the application accesses it.

    Write back optimizes the system speed because it takes less time to write data into cache alone, as compared with writing the same data into both cache and main memory. However, this speed comes with the risk of data loss in case of a crash or other adverse event.

    Write back is the preferred method of data storage in applications where occasional data loss events can be tolerated. In more critical applications such as banking and medical device control, an alternative method called write through practically eliminates the risk of data loss because every update gets written into both the main memory and the cache. In write through mode, the main memory data always stays fresh.

    PRE CONDITION:

    In computer programming, a precondition is a condition or predicate that must always be true just prior to the execution of some section of code or before an operation in a formal specification.

    If a precondition is violated, the effect of the section of code becomes undefined and thus may or may not carry out its intended work. Security problems can arise due to incorrect preconditions.

    Often, preconditions are simply included in the documentation of the affected section of code. Preconditions are sometimes tested using guards or assertions within the code itself, and some languages have specific syntactic constructions for doing so.

    For example: the factorial is only defined for integers greater than or equal to zero. So a program that calculates the factorial of an input number would have preconditions that the number be an integer and that it be greater than or equal to zero.

    Answered on January 14, 2019.
    Add Comment

    WRITE BACK :

    • It is  a storage method i n data is written into the cache every time a change occurs,but is written into the corresponding location in main memory only at specified intervals.
    • The data in the cache memory is called FRESH , and the corresponding data in the main memory is called STALE. When a data location  is updated in write back mode.
    • Write back optimizes the system speed because it takes less time to write data into cache alone, as compared with writing the same data into both cache and main memory. However, this speed comes with the risk of data loss in case of a crash or other adverse event.
    • write back method is preferred for the applications where  occasional data loss events can be tolerated.
    • In more critical applications such as banking and medical device control, an alternative method called write through practically eliminates the risk of data loss because every update gets written into both the main memory and the cache. In write through mode, the main memory data always stays fresh.

    PRE- CONDITIONS :

    • Preconditions in object-oriented software development are an essential part of design by contract.
    • The precondition for any routine defines any constraints on object state which are necessary for successful execution. From the program developer’s viewpoint, this constitutes the routine caller’s portion of the contract. The caller then is obliged to ensure that the precondition holds prior to calling the routine. The reward for the caller’s effort is expressed in the called routine’s postconditions.

    For example

    The routine in the following example written in Eiffel takes as an argument an integer which must be a valid value for an hour of the day, i. e., 0 through 23, inclusively. The precondition follows the keyword require. It specifies that the argument must be greater than or equal to zero and less than or equal to 23. The tag “valid_argument:” describes this precondition clause and serves to identify it in case of a runtime precondition violation.

        set_hour (a_hour: INTEGER)
                -- Set `hour' to `a_hour'
            require
                valid_argument: 0 <= a_hour and a_hour <= 23
            do
                hour := a_hour
            ensure
                hour_set: hour = a_hour
            end
    Answered on February 4, 2019.
    Add Comment

    WRITE BACK:

    Write back is a storage method in which data is written into the cache every time a change occurs, but is written into the corresponding location in main memory only at specified intervals or under certain conditions.

    PRE-CONDITION:

    statement or set of statements that outlines a condition that should be true, or conditions that should be true, when the operation is called. The operation is not guaranteed to perform as it should unless the pre-conditions have been met.

    Answered on February 19, 2019.
    Add Comment

    am reading the book Java Concurrency in Practice and getting a little bit confused with these terms:

    1. Pre condition
    2. Post condition
    3. Invariants

    Can someone please explain me them (with an example, if it’s possible)?

    Answered on February 20, 2019.
    Add Comment

    Write back is a storage method in which data is written into the cacheevery time a change occurs, but is written into the corresponding location in main memory only at specified intervals or under certain conditions.

    When a data location is updated in write back mode, the data in cache is called fresh, and the corresponding data in main memory, which no longer matches the data in cache, is called stale. If a request for stale data in main memory arrives from another application program, the cache controller updates the data in main memory before the application accesses it.

    Write back optimizes the system speed because it takes less time to write data into cache alone, as compared with writing the same data into both cache and main memory. However, this speed comes with the risk of data loss in case of a crash or other adverse event.

    Write back is the preferred method of data storage in applications where occasional data loss events can be tolerated. In more critical applications such as banking and medical device control, an alternative method called write through practically eliminates the risk of data loss because every update gets written into both the main memory and the cache. In write through mode, the main memory data always stays fresh.

    Answered on February 25, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.