文档库 最新最全的文档下载
当前位置:文档库 › X-ability a theory of replication

X-ability a theory of replication

X-ability a theory of replication
X-ability a theory of replication

X-Ability:A Theory of Replication

Svend Fr?lund1Rachid Guerraoui2

1Hewlett-Packard Laboratories,1501Page Mill Rd,Palo Alto

2Swiss Federal Institute of Technology,CH1015,Lausanne

January15,2000

Abstract

This paper presents x-ability(Exactly-once-ability):a correctness criteria for replicated ser-vices.X-ability provides the illusion that the actions executed by a replicated service are exe-

cuted exactly-once,even if these actions have been actually executed several times and by various

replicas.A client can treat a x-able replicated service as if it was not replicated,even if this

service executes actions that are non-deterministic and have side-e?ects on the environment,

e.g.,invoke other services.X-ability is a local property:replicated services can be speci?ed

and implemented independently,and later composed in the implementation of more complex

replicated services.We illustrate our theory through an asynchronous replication protocol that

handles non-determinism and external side-e?ects.The replication protocol is asynchronous in

the sense that it may vary,at run-time and according to the asynchrony of the system,between

some form of primary-backup and some form of active replication.

1Introduction

Background.There has a been a signi?cant body of literature in the last decade about replication algorithms.Surprisingly,there is no satisfactory speci?cation of what it precisely means for a repli-cation algorithm to be correct.There are well-known speci?cations of correctness for particular ways of implementing replication,such as primary-backup[BMST93]and active replication[Sch93]. However,these are speci?cations of replication“schemes”rather than speci?cation of the actual “problem”solved by replication.The very few abstract replication properties that we know about, e.g.,[Aiz89]and[MP88],do not address correctness with respect to external side-e?ect.They only address consistency of state that is encapsulated within the service.In particular,there is no provisioning,in the speci?cations,of having a replicated service call a third party entity,e.g., another replicated service.This form of interaction is however common in practice.1

X-ability in short.This paper presents a correctness criteria for replicated action execution,which we call x-ability(Exactly-once-ability).The notion of x-ability is independent of a particular repli-cation algorithm:it can be viewed as the speci?cation of the problem solved by the so-called transparent replication,where the aim is to provide the illusion that,as long as the functional

behavior of the service is concerned,replication is transparent and the client of the service typically invokes it as if was implemented by a single process.

Roughly speaking,a sequence of actions is executed correctly(i.e.,is x-able)if their side-e?ect appears to have happened exactly-once.The side-e?ect of the action can be the modi?cation of a shared state or the invocation of another(replicated or not)service.Actions can be non-deterministic as can the particular sequence of actions executed in response to a request.We formally de?ne the notion of“appears to have happened exactly-once”through history reductions. An action history h is x-able if h can be reduced to a history h′where every action is executed exactly-once.We base history reductions on rewriting rules that exploit idempotence and undoabil-ity properties of actions.Basically,an idempotent action has the same side-e?ect whether executed once or multiple times,and an undoable action is one that either commits,or aborts and have its side-e?ect cancelled[GR93].X-ability is a local property.It can be used in a recursive way to locally prove the correctness of composable replicated services.Let S1be a replicated service that is proved to be x-able,and S2be a replicated service that invokes S1.We can prove the x-ability of S2by simply assuming that any interation with S1is an idempotent action.

X-ability in perspective.The role of x-ability for replicated programs is similar to that of lineariz-ability for concurrent objects[HW90]and serializability for concurrent transactions[Pap79].It facilitates certain kinds of formal reasoning by transforming assertions about complex replicated behavior(resp.concurrent for[HW90,Pap79])into assertions about simpler non-replicated(resp. sequential for[HW90,Pap79])behavior.X-ability is similar to1-copy serializability[BHG87]in that it considers a replicated program to be correct if it is“equivalent”to a non-replicated pro-gram.However,x-ability does not directly handle concurrent invocations of a replicated service. More precisely,x-ability states constraints about the concurrency among replicas in the context of a given request(“intra-request”concurrency),but does ignore the concurrency that originates from di?erent requests(from di?erent clients).The latter kind of concurrency is indirectly viewed in our case as a source of non-determinism of actions.2On the other hand,our underlying model is more general than those considered for linearizability and serializability(or1-copy serializabil-ity)in that we do not only consider operations on data objects,but arbitrary actions that may involve third party entities.Furthermore,x-ability encompasses both safety and liveness.It is a safety property because it states that certain partial histories must not occur.It is also a liveness property since it enforces guarantees about what must occur(x-ability encompasses a notion of wait-freedom[Her91]).Finally,and as we pointed out,unlike serializability,but(somehow)like linearizability,x-ability is a local property of replicated services.

X-ability in use.To illustrate the use of x-ability,we present a replication protocol where replicas may invoke non-deterministic actions on third-party entities.We consider here idempotent and undoable actions.At?rst glance,it may appear trivial to guarantee exactly-once execution for idempotent and undoable actions:we can always retry an idempotent action,and we can always cancel an undoable action,and try again,if the action appears to have failed.However,the trick is to coordinate the execution logic with the retry logic so that there is agreement on the result of a nondeterministic idempotent action,and when to cancel an undoable action.Our replication

protocol has an asynchronous?avor.Unlike in primary-backup replication[BMST93],we do not make any assumption about the existence of a single leader at every given time and we tolerate unreliable failure detection.Unlike active replication[Sch93],we do not assume that replicas are deterministic.Our replication protocol is asynchronous:it may vary at run-time and according to the asynchrony of the system,between some form of primary-backup and some form of active replication.

Roadmap.The rest of the paper is organized as follows.Section2describes our system model. Section3de?nes what it means for a history to be x-able.Section4de?nes what it means for a replicated service to be x-able.Section5illustrates the use of x-ability through our asynchronous replication scheme.Section6contrasts our work with related work.

2System model

To describe x-ability,we consider a general model where a set of process replicas implement a service.The functionality of the service is captured by a state machine.Each replica has its own copy of the state machine.Clients send requests to the service to invoke state machine actions.

To describe the fault-tolerance semantics,and reason about correctness,of a service,we associate events with the start and completion of actions.Event histories convey the observable behavior of processes,i.e.,the externally observable behavior of a service.Di?erent runs of a service on the same input may produce di?erent histories:the service may fail di?erently in di?erent runs, actions may be non-deterministic,and the concurrency within the service may cause events to be interleaved di?erently.We use history patterns to abstract out some of these di?erences and capture structural properties of histories.

2.1State Machines

A state machine exports a number of actions.An action takes an input value and produces an output value.In addition,an action may modify the internal state of its state machine and it may communicate with external entities.In contrast to[Sch93],our state machines may be non-deterministic.That is,the side-e?ect and output value of a speci?c action may not be the same each time we execute it,even if we execute it in the same initial state.

A client can invoke a replica’s state machine by sending a request to the replica.A request contains the name of an action and an input value for the action.If no failures occur,the replica returns the action’s output value to the client as a reply to the request.The execution of an action may fail(for example if the action manipulates a database and the database crashes),or the replica executing the action may fail.If the action fails,it returns an exception(or error)value as the result of execution.

Formally speaking,we model action names as elements of a set Action.We refer to elements of this set using the letter a.The set Value contains the input and output values associated with actions.Furthermore,we identify two sets,Request and Result,that are de?ned as follows:

Request?(Action×Value)(1)

Result?Value(2)

3

A request is simply a pair value that contains an action name and an input value.We write pairs as“(a,v)”(this pair contains the action name a and the value v).

2.2Events

A state machine represents the program that a service must execute.To reason about service correctness,we also need a way represent executions of this program.We associate events with the execution of actions,and introduce a hypothetical event observer that can watch the occurrence of events and construct an event history.Events are subject to a total order that re?ects the(relative) time at which they were observed.

We associate events with the start and completion of actions.The causal and temporal rela-tionship between action execution and event observation is subject to the following axioms:?An action’s start event cannot be observed before the action is invoked.

?An action’s completion event cannot be observed before its start event.

?If an action returns successfully,then its start and completion events have been observed.

In a failure-free run,the execution of an action will always give rise to a start event and a completion event.If a failure occurs,an action may give rise to both events,a start event only,or no events at all.

We can use events to reason about the side-e?ect of actions.A start event signi?es that the side-e?ect may happen;a completion event means that the side-e?ect has happened(successfully).

We model events as elements of the set Event.Events are structured values with the following structure:

e::=S(a,iv)|C(a,ov)

The event S(a,iv)captures the start of executing the action a with iv as argument.The event C(a,ov)captures the completion of executing the action a,and ov is the output value produced by the action.

2.3Histories

A history is a sequence of events.The notion of a sequence captures the total order in which events are observed.We model histories as elements of the set History,and we consider histories to be structured values as de?ned by the following syntax:

h::=Λ

|e1...e n

|h1?...?h n

The symbolΛdenotes the empty history—a history with no events.The history e1...e n contains the events e1through e n.The history h1?...?h n is the concatenation of histories h1through h n.The semantics of concatenating histories is to concatenate the corresponding event sequences:

4

h1=e1...e n h2=e n+1...e m

??(History×Pattern)(4) S(a,iv)C(a,ov)?[a,iv,ov](5)Λ??[a,iv,ov](6) S(a,iv)??[a,iv,ov](7) S(a,iv)C(a,ov)??[a,iv,ov](8) h1?sp1h2?sp2

(?rst(h1)?h3?second(h1)?h4??rst(h2)?h5?second(h2))?(sp1 h

3?h4?h5sp2)

(10)

h1?sp1h2?sp2

it is asymmetric,and h′always has fewer events than h.Essentially,a history is x-able if it can be reduced,under?to a history that is identical to a history that is produced by system without failures.

Then main idea in de?ning?is to consider two particular types of actions:idempotent and https://www.wendangku.net/doc/6b10127010.html,rmally speaking,n executions of an idempotent action has the same side-e?ect as a single execution of it.Thus,we can say that h?h′if h contains n incarnations of an action and h′contains n?1incarnations of the same action.Similarly,an undoable action is like a database transaction:it can be rolled back up to a certain point(the commit point)after which its e?ects are permanent.In terms of undoable actions,we can say that h?h′if h contains an undoable action that was rolled back and if h′does not contain the action at all.

More formally speaking,we identify two subsets of Action:Idempotent and Undoable.The set Idempotent contains the names of idempotent actions.We use the notation a i to indicate that the action a is idempotent.The set Undoable contains names of undoable actions.We use the notation a u to indicate that an action a is undoable.An undoable action,a u,has two associated actions: a cancellation action,a?1and a commit action,a c.The commit and cancellation actions for an action a u take the same arguments as a u,and they return the value nil.Cancellation and commit actions are idempotent.

??(History×History)(16)

h1?h2h2?h3

(18)

h1?h?h2?h1?h′?(S(a i,iv)C(a i,ov))?h2

h?(?[a u,iv,ov] h′[a?1,iv,nil])(a u,iv)/∈h1(a c,iv)/∈h′

(20)

h1?h?h2?h1?h′?(S(a c,iv)C(a c,nil))?h2

Figure4:De?nition of history reduction

We then de?ne the?operator in terms of idempotent and undoable actions in Figure4.

?The?rst inference rule(17)de?nes?as a transitive relation.

?The second rule(18)captures the semantics of idempotent actions.If a history contains a successfully executed idempotent action a i,then we can remove the events from a previous attempt to execute a i.The events from the previous attempt and the successful attempt can overlap.Moreover,there can be an interleaving history h′between these sets of events as well.

?The third rule(19)is concerned with cancellation of undoable actions.Intuitively,if we successfully cancel an undoable action,then we remove its side-e?ect(it appears as if the

7

action was never executed).We can keep alternating between executing the action and cancelling it.But for the action to happen exactly-once,we must eventually execute it successfully and execute its commit action successfully.The rule captures when we can remove events that stem from an attempt to execute an action a u and then cancel it.

The sub-history h contains the events from such an action pair(a u followed by a?1).It also contains a history h′that is interleaved with the events from a u and a?1.One requirement is that h′must not contain the commit action of a u:if we committed a u before issuing a?1, the cancellation would not take e?ect.Furthermore,we need the constraint on h′to ensure that an algorithm does not concurrently cancel and commit the same action.

The requirement that(a u,iv)/∈h1states that the preceeding sub-history,h1,cannot contain any events from a u.Since?[a,iv,ov]matches the empty history,we need to ensure that the cancellation events are not removed by themselves if they actually do cancel an action.If that is the case,we should also remove the action itself from the history.Thus,we create a constraint so that the?[a,iv,ov]part of the pattern only matches the empty history if there are no events from a to the left of?[a,iv,ov].

?The fourth rule(20)states that commit actions are idempotent.The requirement that

(a u,iv)/∈h′ensures that the commit action and the action being committed do not overlap.

3.2Failure-Free Histories

A failure-free history is a history that could have been produced by a failure-free execution of a single state machine action.To de?ne the notion of failure-free history,we de?ne a function, called eventsof,on actions and their values.The eventsof function returns the failure-free history associated with the action and the values.

eventsof(a u,iv,ov)=S(a u,iv)C(a u,ov)S(a c,iv)C(a c,nil)(21)

eventsof(a i)=S(a i,iv)C(a i,ov)(22) Due to non-determinism,there are multiple failure-free histories which are possible for a given action a and a given input value iv.We de?ne the set of all possible as histories,FailureFree(a,iv) as follows:

FailureFree(a,iv)={h∈History|?ov∈Value:h=eventsof(a,iv,ov)}

A single-action history is x-able if it can be“reduced”to a failure-free history under the?relation.We capture this through a predicate,x-able on histories:

(23)

x-able(a,iv)(h)= true if?h′∈FailureFree(a,iv):h?h′

false otherwise

Notice that the predicate x-able(a,iv)determines x-ability relative to a particular action-value pair.

8

3.3History Signature

Given a request(a,iv),we use the set FailureFree(a,iv)to constrain the server-side processing of that request to have exactly-once side-e?ect.We also need to ensure that the result delivered to the client corresponds to the server-side history.We introduce the notion of a history signature,which captures the client-side information(request and result)that is legal relative to a given server-side history.Because of non-determinism and server-side retry,a history can have multiple signatures. We de?ne the set of signatures by the following inference rules:

h?S(a u,iv)C(a u,ov)S(a c,iv)C(a c,nil)

(a,iv,ov)∈signature(h)

(25) 3.4Possible Reply Values

The execution of state machine actions may be non-deterministic.The same request may result in di?erent reply values.For example,the state of the machine may determine the reply value,and this state may change over time.

We want to characterize the set of possible reply values for a given request.Since we do not know what state machine actions do,we cannot describe which speci?c values are possible.Instead, we assume the existence of a set PossibleReply that contains the possible reply values for a given request.To capture the history-sensitive nature of the set of possible replies,we de?ne PossibleReply in the context of a request sequence R1...R n.The interpretation of PossibleReply in the context of a sequence is the set of possible replies to request R n after the state machine has executed the

requests R1...R n?1.Thus,we write the set as:PossibleReply(R

1...R n).

Notice that the set PossibleReply is de?ned for state machines,not replicated services.Thus, there is no notion of failures or replication involved in its de?nition.The set is well-de?ned for state machines in general.

4X-Able Services

We provide here a formal speci?cation of replication that is idependent of a particular replication protocol.We can implement the speci?cation with various protocols,including protcols that have a primary-backup?avor and protocols that have an active-replication?avor.Moreover,the spec-i?cation takes side-e?ect into account.We use the notion of x-able histories to capture correct execution of actions with side-e?ect.

We consider here a single client submitting one request to a replicated service.Formally speak-ing,a replicated service consists of a sequencer S and an action submit.The sequencer captures the functionality of the service.It is executed by a set of server proceses s1...s n that each have a copy of S.These are the only processes that have a copy of S.The action submit can be used by any process p to invoke the service.The action takes a value in the domain Request and,when executed,produces a value in the domain Result.We specify correctness relative to a single client

9

C.Thus,we consider a system that consists of the processes s1...s n and C only.The service is x-able if the following conditions hold:

R1.The action submit is idempotent.

R2.The client C will eventually be able to execute submit successfully.

R3.If C submits a sequence of requests R1...R n,and if C only submits R i+1after R i succeeds,

then the history produced by s1...s n satis?es either x-able(S,R

1...R n)or x-able(S,R

1...R n?1)

.

R4.If C executes submit successfully on a request R,then submit returns a value in Possible(S,R).

The?rst two requirements are concerned with the contract between a service and its clients. Clients use the action submit to invoke the service.Because submit is idempotent,clients can repeatedly invoke the service without concern for duplicating side-e?ects.The second requirement (R2)is a liveness property.The action submit is not allowed to fail an in?nite number of times. There must be a time after which submit does not fail.The requirement also makes a service non-blocking in the sense that the submit is guaranteed to eventually return a value.In addition, submit is free to fail a?nite number of times and return an error value(a value that does not belong to Result).The combination of the?rst two requirements facilitates composition of services.Since a replicated service can execute idempotent actions that eventually succeed,it can invoke another replicated service and view its invocation as an idempotent action.

The third requirement(R3),deals with the server-side“e?ect”of executing a sequence of requests.The resulting server-side history must be x-able,that is,it must be equivalent(under history reduction)to a failure-free history obtained from S.This forces the replication algorithm to correctly retry failed actions,and execute each action returned by S so that it appears to have happened exactly-once.

The fourth requirement forces submit to communicate with s1...s n,the submit action cannot locally,at C,ensure that the server-side history is x-able.Moreover,once a server process starts to execute the actions in response to a request,the service must execute the action sequence to completion(even if C fails).

Since C submits one request after another,only R n can fail in the sequence R1...R n.If C itself fails before retrying R n,the server-side history may not contain the events related to the processing of R n:perhaps R n was initially sent to a failed replica,and the processing never begun. Thus,because C can fail,we cannot guarantee that all submitted requests are indeed processed. What we can guarantee is that all successfully submitted requests are processed.Furthermore,if the service starts to process a request,then the processing will complete event if C fails.This gives an exactly-once guarantee for all successfully submitted requests and an at-most-once guarantee for all submitted requests.

The third requirement also forces the service to correctly maintain S’s state,if any.The server-side history must be equivalent to a failure-free execution of the sequence R1...R n.But since R1 may result in a transformation of S’s state,the actions executed for R2may depend on this state transformation.So,a replication algorithm must ensure that the state resulting from R1is used as a context for executing R2.The replication algorithm cannot assume that R1did not update the state of S,or that the state update is immaterial to the processing of R2.rep

10

Requirement R4guarantees that the algorithm does not execute a correct sequence of actions and then return a meaningless result.The algorithm must return a result value that is in the set of possible values for each request.

5A General Replication Algorithm

This section presents a general asynchronous replication algorithm.The algorithm is general in the sense that it handles the replication of services that may execute actions that are non-deterministic, or actions that have external side-e?ect.It is asynchronous in the sense that it may vary,at run-time,and according to the asynchrony of the system,between some form of active replica-tion[Sch93],and some form of primary-backup[BMST93].We describe the algorithm and then prove its correctness,i.e.,we show that every service replicated using this algorithm is x-able. 5.1Overview

Our replication algorithm is mainly composed of two parts.A client part,described in Figure53, and the replica part,described in Figure6.For presentation simplicity,we consider only the case of a single client,submitting a single request to the replicated service.The replicated service is implemented by n replicas.Basically,the client sends the request to a single replica and then waits until it either suspects the replica to have failed or receives a result from the replica.All replicas execute the same protocol(Figure6).

In a“nice”run,where no replica crashes or is suspected to have crashed,the protocol goes as follows.The replica that receives the client’s request,executes the corresponding state machine action,and sends back the resulting reply to the client.In such a run,the replication scheme is very much like a primary-back scheme(applied to general actions that might have external side e?ect).

Any replica that suspects the crash of the primary tries to terminate the action execution by the primary:if the primary was executing an undoable action,the replica aborts this action;if the primary was executing a non-deterministic idempotent action,the replica prevents the primary from responding to the client.After terminating the possible ongoing action execution,the replica initiates a new round,and tries to become primary for that round.

Because of false failure suspicions,we may very well end-up in the situation where all replicas concurrently execute actions on behalf of the same clients(in di?erent rounds):in such a con?g-uration,our replication scheme is very much like an active replication scheme(applied to general actions that might be non-deterministic and have external side e?ect).

5.2Assumptions

We assume that processes(client and replicas)fail by crashing.They do not recover after a crash, neither do they ever behave maliciously.A correct process is one that does not fail.We assume that communication channels are reliable:if a correct process sends a message to another correct process,then the message is eventually received,and it is only received once.We also assume that

every action is eventually successful.If we keep invoking them,they will eventually execute to successful completion.Furthermore,we assume that a successfully executed undoable action can be committed.

In order to ensure that the service is indeed x-able,we rely on two kinds of abstractions:

1.Failure detector[CT96].The failure detector is a distributed oracle that provides hints about

failed processes.The client uses the failure detector to monitor the crashes of replicas,and every replica uses the failure detector to monitor the crashes of other replicas.We assume here that the client’s failure detector satis?es the strong completeness property[CT96]:eventually, every crashed replica is suspected by the client.Among the replicas,we assume the failure detector to be eventually perfect[CT96].Besides strong completeness,it also ensures eventual strong accuracy:eventually,no replica is suspected unless it has crashed.These assumptions are needed to guarantee progress.If a replica suspects another replica,it will try to clean up the execution state of the suspected replica.For undoable actions,this means cancelling the actions.Thus,if we forever have false suspicions,the same action could in principle be cancelled over and over again.

2.Consensus object[Her91].The consensus abstraction is used for three kinds of synchroniza-

tions:(1)to ensure agreement about which replica is leader for a given round,(2)to ensure agreement about the outcome of undoable actions(commit or abort),and(3)to ensure agree-ment on the results of idempotent actions(these might be non-deterministic).The consensus abstraction is used here through two primitives:a propose()primitive which takes as input

a value proposed for consensus,and returns the value decided,and a read()primitive that

returns the value decided,if any,or⊥if no such value has been decided.

We simply assume here the existence of these abstractions,i.e.,we do not discuss their imple-mentation in a message passing system.

5.3The pseudo-code

We discuss below the semantics of our C++-like pseudo-code we use to describe our algoritms in Figure5,Figure6,and Figure7.

A channel is speci?ed by two primitives:send and receive.For example,the statement“send [Request,req]to p j”captures the action of sending the message[Request,req]to process p j.A message[Request,req]is of type“Request”and contains the value req.We assume that messages are uniquely identi?ed.In many cases,servers acknowledge receipt of messages.We assume that the receiver of an acknowledgment message can correlate it with the message being acknowledged. This can be achieved by appropriate tagging of acknowledgment messages.However,to simplify the presentation,we do not describe this tagging and correlation in our protocol.The statement “receive[Request,req]from p i”captures the action of waiting for a message of type“Request”from process p i.When such a message arrives,the variable req is assigned to the contents of the message,and the variable p i is assigned to the sender’s identity.We also use the receive primitive without a“from”part if we do not need to assign the sender’s identity to a variable.

Besides message passing,we also use various synchronization primitives.We use“await”statements to wait for an event to occur.Events can be the reception of messages and detection of failures.We use and and or combinators to specify these event sets.Traditional control structures,

12

Client{

Process replicas[n];

Int i=1;

Result submit(Request req){

Result res;

send[Request,req]to replicas[i];

await(receive[Result,res])or suspect(replicas[i]);

if(received[Result,res])then

return res;

else

i=(i+1)mod n;

return failure;

}

}

Figure5:Client-side algorithm

such as branches and loops,are used with their usual semantics.In addition,we also use cobegin and coend to capture concurrent executions.The cobegin statement terminates when any of the contained activities terminates.We use“==”(resp.“!=”)to compare values for equality(resp. non-equality)and“:=”for assignment.Finally,we abstract the suspicion information through a predicate suspect().The execution of suspect(p i)by process p j at t returns true if and only if p j suspects p i at time t.

5.4Algorithm Description

The client part of the algorithm consist of the submit primitive described in Figure5.The submit primitive sends a request to one of the replicas.It then waits for a result,and if it has suspected the replica,it returns an error.The primitive uses two“global”variables replicas and i.The variable replicas contains a list of the replicas.The variable i is the replica to contact next time submit is executed.

All replicas execute the same algorithm,and they all have a copy of the same state machine S. Rather than describe invocation of state machine actions directly,we assume that a state machine has a method,called execute,that“dispatches”a request.A request contains the name of an action and a list of input parameters for the action.One of these parameters is called round,and it keeps track of the current execution round of the request(the server-side algorithm increments this parameter when a new round is initiated).Having the round number as part of the parameters ensures that commit and cancellation actions are speci?c to a particular round.Thus,a cancelletion action issued for round number n cannot cancel the action of round number n+1.

Round number one is initiated by a replica p1,that receives a request from the client.This replica starts executing the requested state machine action.If it does not fail,and is not suspected to have failed,p1executes the action to completion and returns the result to the client.If another replica p i suspects p1to have failed,p i will start round two as a continuation of round one.Each round is owned by a single replica,and a replica only takes ownership of rounds greater than one

13

if they suspect another owner to have failed.

In Figure6,we show the behavior of the main part of a server replica.A server contains two activities:a thread to receive and execute requests and a thread to perform failure detection cleanup.Since the failure suspicion may be false—the replica may be suspected,but has actually not failed—we need to coordinate the actions taken by cleaner threads and replicas during request processing since they may execute in parallel.

Each replica has access to four arrays.The owner-agreement array contains consensus objects that control onwership of particular rounds.This array has a total of max-round objects.If a replica wishes to become the owner of round i,it will try to propose its own identity as the value of consensus object number i in the array.The outcome-agreement array contains consensus objects that implement the required coordination on the outcome(commit or abort)of undoable actions. Finally,the result-agreement array contains consensus objects that ensure agreement on the result of idempotent actions.

Di?erent rounds can have a di?erent outcome for the same undoable action.For example,we may have a number of rounds in which the outcome is abort followed by a single round in which the outcome is commit.Subsequent rounds will then not execute the action once it has been successfully committed.The outcome-agreement is indexed by requests,which have the round number as part of their parameters.The owner-agreement array is uni-dimensional because there is one owner per round,and result-agreement array is uni-dimensional because the result can be ?xed the?rst time an idempotent action is successfully executed.

The method called result-coordination in Figure6implements the required coordination of action results.The method can be used in two“modes:”cleaning mode and execution mode.In cleaning mode,the method is used to prevent a suspected primary from enforcing its action results. In execution mode,it is used to propose a value that is the result of a successfully executed action. The parameter val determines the mode.If it contains the value empty-result,we are in cleaning mode.If it contains a regular value,that value is used as the agreed upon result.

The method execute-until-success executes a state machine action until it succeeds.For idempotent actions,we simply keep reissuing the action.For undoable actions,the procedure is slightly more complicated.If an undoable action fails,we apply its cancellation action.We obtain the name of a cancellation action by using the primitive cancel.This primitive takes a request r, and returns a request that invokes the cancellation action of r.We construct commit actions in a similar manner by using the primitive called commit.

6Concluding Remarks

Considering that a replicated program is correct if it can somehow be shown to be equivalent to a non-replicated program is an intuitive idea,and this idea has already been explored by di?erent authors.The main di?erences between the various approaches have to do with how the notion of equivalence is de?ned.In[MP88],an algebra of action sequences is used to de?ne a correctness criteria for replication.The N replication of a base process is a replicated process,denoted by P N. The replicated process P N is correct if it is possible to extract,from every trace t N of P N,a trace t of P.The authors assume the existence of a generic extract function,and describe an implemen-tation example of that function for deterministic pure server processes(that do not interact with third party entities).As pointed out by the authors,it is not clear how to devise such a function for non-deterministic programs.It is also not clear neither how to express it for servers that invoke

14

Server{

Consensus(Process,Request,Process)owner-agreement[max-round];

Consensus(Result)result-agreement[Request];

Consensus(Outcome,Result)outcome-agreement[Request];

State-machine S;

cobegin

Request req;Process client;

while true{

receive[Request,req]from client;

req.round:=1;

this->process-request(req,client);

}

||

this->cleaner();

coend;

}

Server::process-request(Request req,Process client){

Process id,tmp-client;Request tmp-val;

(id,tmp-req,tmp-client):=owner-agreement[req.round].propose(my-id,req,client); if id==my-id then

Result res-val:=execute-until-success(req);

res-val:=result-coordination(req,res-val);

if res-val!=empty-result then

send[Result,res-val]to client;

}

Server::cleaner(){

while true{

Process id,suspected-id,client;Request req;

if suspect(suspected-id)then

let last-round be the largest defined index in owner-agreement;

(id,req,client):=owner-agreement[last-round].read();

if id==suspected-id then

res-val:=result-coordination(req,empty-result);

if res-val==empty-result then

req.round:=last-round+1;

this->process-request(req,client);

}

}

Figure6:Main algorithm on server side

15

Result Server::result-coordination(Request req,Value val){

Result res-val;Outcome outcome;

if S.is-idempotent(req)then

res-val:=result-agreement[req].propose(val);

if S.is-undoable(req)then

if val==empty-result then

(outcome,res-val):=outcome-agreement[req.round].propose(abort,val);

else

(outcome,res-val):=outcome-agreement[req.round].propose(commit,val);

if outcome==abort then

this->execute-until-success(cancel(req));

else

this->execute-until-success(commit(req));

return res-val;

}

Result Server::execute-until-success(Request req){

while true{

Result res-val;

try res-val:=S.execute(req);

catch(failure)

if S.is-idempotent(req)then

continue;

if S.is-undoable(req)then

this->execute-until-success(cancel(req));

continue;

return res-val;

}

}

Figure7:Algorithms to execute and clean sequences of actions

16

third party entities.In[Aiz89],the author de?nes a reduction relation between programs in terms of re?nement mapping,using temporal logic descriptions of state sequences.The author does not describe here a mechanical way of performing the reduction,but rather suggests a methodology for transforming a non-replicated program into a replicated one.Our reduction technique is much simpler than those considered in[MP88]and[Aiz89]:we describe simple rewriting rules that me-chanically exploit idempotence and undoability properties of actions.In this sense,our theory is closer to the theory of1-copy serializability[BHG87],which exploits the semantics of read()and write()operations:a replicated history is equivalent to a non-replicated one if they have the same reads-from relationships and?nal writes.The main di?erences between x-ability and1-copy seri-alizability are twofold.First,1-copy serializability assumes replicated entities to be data servers on which read()and write()operations can be performed.4We more generally assume replicated entities to execute arbitrary actions,that may very well be operations on data objects,but also non-deterministic invocations of third party entities(which enables us to state interesting proper-ties about replication composition).Second,we do not restrict ourselves to committed actions,and we integrate liveness in the x-ability theory.

References

[Aiz89]J.Aizikowitz.Designing distributed services using re?nement mappings.Technical Report CS TR89-1040,Cornell University,1989.

[BHG87]P.A.Bernstein,V.Hadzilacos,and N.Goodman.Concurrency Control and Recovery in Database Systems.Addison-Wesley,Reading,Mass.,1987.

[BMST93]N.Budhiraja,K.Marzullo,F.B.Schneider,and S.Toueg.The primary-backup ap-proach.In S.Mullender,editor,Distributed Systems.Addison-Wesley,1993.

[CT96]T.Chandra and S.Toueg.Unreliable failure detectors for reliable distributed systems.

Journal of the ACM,43(2):225–267,1996.

[DSS98]X.D′e fago,A.Schiper,and N.Sergent.Semi-passive replication.In Proceedings of the IEEE Symposium on Reliable Distributed Systems,October1998.

[FG99]S.Frolund and R.Guerraoui.Implementing e-transactions with asynchronous replica-tion.Technical Report to appear,Hewlett-Packard Laboratories,December1999.

[GR93]J.Gray and A.Reuter.Transaction Processing:Concepts and Techniques.Morgan Kaufmann,1993.

[Her91]M.Herlihy.Wait-free synchronization.ACM Transactions on Programming Languages and Systems,13(1):123–149,January1991.

[HW90]M.Herlihy and J.Wing.Linearizability:a correctness condition for concurrent objects.

ACM Transactions on Programming Languages and Systems,12(3):463–492,July1990.

[Lam89]https://www.wendangku.net/doc/6b10127010.html,mport.The part-time parliament.Technical Report49,DEC Systems Research Center,1989.

[LMWF94]N.Lynch,M.Merrit,W.Weihl,and A.Fekete.Atomic Transactions.Morgan-Kaufmann,1994.

[MP88]L.Mancini and G.Pappalardo.Towards a theory of replicated processings.In For-mal Techniques in Real-time and Fault-tolerant Systems,pages175–192.LNCS(331),

Springer Verlag,1988.

[Pap79] C.Papadimitriou.The serializability of concurrent database updates.Journal of the ACM,26(4):631–653,October1979.

[PSB+88] D.Powell,D.Seaton,G.Bonn,P.Verissimo,and F.Waeselynk.The delta-4approach to dependability in open distributed computing systems.In International Symposium

on Fault-Tolerant Computing Systems.IEEE,June1988.

[Sch93] F.B.Schneider.Replication management using the state machine approach.In S.Mul-lender,editor,Distributed Systems.Addison-Wesley,1993.

18

从实践的角度探讨在日语教学中多媒体课件的应用

从实践的角度探讨在日语教学中多媒体课件的应用 在今天中国的许多大学,为适应现代化,信息化的要求,建立了设备完善的适应多媒体教学的教室。许多学科的研究者及现场教员也积极致力于多媒体软件的开发和利用。在大学日语专业的教学工作中,教科书、磁带、粉笔为主流的传统教学方式差不多悄然向先进的教学手段而进展。 一、多媒体课件和精品课程的进展现状 然而,目前在专业日语教学中能够利用的教学软件并不多见。比如在中国大学日语的专业、第二外語用教科书常见的有《新编日语》(上海外语教育出版社)、《中日交流标准日本語》(初级、中级)(人民教育出版社)、《新编基础日语(初級、高級)》(上海译文出版社)、《大学日本语》(四川大学出版社)、《初级日语》《中级日语》(北京大学出版社)、《新世纪大学日语》(外语教学与研究出版社)、《综合日语》(北京大学出版社)、《新编日语教程》(华东理工大学出版社)《新编初级(中级)日本语》(吉林教育出版社)、《新大学日本语》(大连理工大学出版社)、《新大学日语》(高等教育出版社)、《现代日本语》(上海外语教育出版社)、《基础日语》(复旦大学出版社)等等。配套教材以录音磁带、教学参考、习题集为主。只有《中日交流標準日本語(初級上)》、《初級日语》、《新编日语教程》等少数教科书配备了多媒体DVD视听教材。 然而这些试听教材,有的内容为日语普及读物,并不适合专业外语课堂教学。比如《新版中日交流标准日本语(初级上)》,有的尽管DVD视听教材中有丰富的动画画面和语音练习。然而,课堂操作则花费时刻长,不利于教师重点指导,更加适合学生的课余练习。比如北京大学的《初级日语》等。在这种情形下,许多大学的日语专业致力于教材的自主开发。 其中,有些大学的还推出精品课程,取得了专门大成绩。比如天津外国语学院的《新编日语》多媒体精品课程为2007年被评为“国家级精品课”。目前已被南开大学外国语学院、成都理工大学日语系等全国40余所大学推广使用。

新视野大学英语全部课文原文

Unit1 Americans believe no one stands still. If you are not moving ahead, you are falling behind. This attitude results in a nation of people committed to researching, experimenting and exploring. Time is one of the two elements that Americans save carefully, the other being labor. "We are slaves to nothing but the clock,” it has been said. Time is treated as if it were something almost real. We budget it, save it, waste it, steal it, kill it, cut it, account for it; we also charge for it. It is a precious resource. Many people have a rather acute sense of the shortness of each lifetime. Once the sands have run out of a person’s hourglass, they cannot be replaced. We want every minute to count. A foreigner’s first impression of the U.S. is li kely to be that everyone is in a rush -- often under pressure. City people always appear to be hurrying to get where they are going, restlessly seeking attention in a store, or elbowing others as they try to complete their shopping. Racing through daytime meals is part of the pace

新视野大学英语第三版第二册课文语法讲解 Unit4

新视野三版读写B2U4Text A College sweethearts 1I smile at my two lovely daughters and they seem so much more mature than we,their parents,when we were college sweethearts.Linda,who's21,had a boyfriend in her freshman year she thought she would marry,but they're not together anymore.Melissa,who's19,hasn't had a steady boyfriend yet.My daughters wonder when they will meet"The One",their great love.They think their father and I had a classic fairy-tale romance heading for marriage from the outset.Perhaps,they're right but it didn't seem so at the time.In a way, love just happens when you least expect it.Who would have thought that Butch and I would end up getting married to each other?He became my boyfriend because of my shallow agenda:I wanted a cute boyfriend! 2We met through my college roommate at the university cafeteria.That fateful night,I was merely curious,but for him I think it was love at first sight."You have beautiful eyes",he said as he gazed at my face.He kept staring at me all night long.I really wasn't that interested for two reasons.First,he looked like he was a really wild boy,maybe even dangerous.Second,although he was very cute,he seemed a little weird. 3Riding on his bicycle,he'd ride past my dorm as if"by accident"and pretend to be surprised to see me.I liked the attention but was cautious about his wild,dynamic personality.He had a charming way with words which would charm any girl.Fear came over me when I started to fall in love.His exciting"bad boy image"was just too tempting to resist.What was it that attracted me?I always had an excellent reputation.My concentration was solely on my studies to get superior grades.But for what?College is supposed to be a time of great learning and also some fun.I had nearly achieved a great education,and graduation was just one semester away.But I hadn't had any fun;my life was stale with no component of fun!I needed a boyfriend.Not just any boyfriend.He had to be cute.My goal that semester became: Be ambitious and grab the cutest boyfriend I can find. 4I worried what he'd think of me.True,we lived in a time when a dramatic shift in sexual attitudes was taking place,but I was a traditional girl who wasn't ready for the new ways that seemed common on campus.Butch looked superb!I was not immune to his personality,but I was scared.The night when he announced to the world that I was his girlfriend,I went along

新视野大学英语读写教程第一册课文翻译及课后答案

Unit 1 1学习外语是我一生中最艰苦也是最有意义的经历之一。虽然时常遭遇挫折,但却非常有价值。 2我学外语的经历始于初中的第一堂英语课。老师很慈祥耐心,时常表扬学生。由于这种积极的教学方法,我踊跃回答各种问题,从不怕答错。两年中,我的成绩一直名列前茅。 3到了高中后,我渴望继续学习英语。然而,高中时的经历与以前大不相同。以前,老师对所有的学生都很耐心,而新老师则总是惩罚答错的学生。每当有谁回答错了,她就会用长教鞭指着我们,上下挥舞大喊:“错!错!错!”没有多久,我便不再渴望回答问题了。我不仅失去了回答问题的乐趣,而且根本就不想再用英语说半个字。 4好在这种情况没持续多久。到了大学,我了解到所有学生必须上英语课。与高中老师不。大学英语老师非常耐心和蔼,而且从来不带教鞭!不过情况却远不尽如人意。由于班大,每堂课能轮到我回答的问题寥寥无几。上了几周课后,我还发现许多同学的英语说得比我要好得多。我开始产生一种畏惧感。虽然原因与高中时不同,但我却又一次不敢开口了。看来我的英语水平要永远停步不前了。 5直到几年后我有机会参加远程英语课程,情况才有所改善。这种课程的媒介是一台电脑、一条电话线和一个调制解调器。我很快配齐了必要的设备并跟一个朋友学会了电脑操作技术,于是我每周用5到7天在网上的虚拟课堂里学习英语。 6网上学习并不比普通的课堂学习容易。它需要花许多的时间,需要学习者专心自律,以跟上课程进度。我尽力达到课程的最低要求,并按时完成作业。 7我随时随地都在学习。不管去哪里,我都随身携带一本袖珍字典和笔记本,笔记本上记着我遇到的生词。我学习中出过许多错,有时是令人尴尬的错误。有时我会因挫折而哭泣,有时甚至想放弃。但我从未因别的同学英语说得比我快而感到畏惧,因为在电脑屏幕上作出回答之前,我可以根据自己的需要花时间去琢磨自己的想法。突然有一天我发现自己什么都懂了,更重要的是,我说起英语来灵活自如。尽管我还是常常出错,还有很多东西要学,但我已尝到了刻苦学习的甜头。 8学习外语对我来说是非常艰辛的经历,但它又无比珍贵。它不仅使我懂得了艰苦努力的意义,而且让我了解了不同的文化,让我以一种全新的思维去看待事物。学习一门外语最令人兴奋的收获是我能与更多的人交流。与人交谈是我最喜欢的一项活动,新的语言使我能与陌生人交往,参与他们的谈话,并建立新的难以忘怀的友谊。由于我已能说英语,别人讲英语时我不再茫然不解了。我能够参与其中,并结交朋友。我能与人交流,并能够弥合我所说的语言和所处的文化与他们的语言和文化之间的鸿沟。 III. 1. rewarding 2. communicate 3. access 4. embarrassing 5. positive 6. commitment 7. virtual 8. benefits 9. minimum 10. opportunities IV. 1. up 2. into 3. from 4. with 5. to 6. up 7. of 8. in 9. for 10.with V. 1.G 2.B 3.E 4.I 5.H 6.K 7.M 8.O 9.F 10.C Sentence Structure VI. 1. Universities in the east are better equipped, while those in the west are relatively poor. 2. Allan Clark kept talking the price up, while Wilkinson kept knocking it down. 3. The husband spent all his money drinking, while his wife saved all hers for the family. 4. Some guests spoke pleasantly and behaved politely, while others wee insulting and impolite. 5. Outwardly Sara was friendly towards all those concerned, while inwardly she was angry. VII. 1. Not only did Mr. Smith learn the Chinese language, but he also bridged the gap between his culture and ours. 2. Not only did we learn the technology through the online course, but we also learned to communicate with friends in English. 3. Not only did we lose all our money, but we also came close to losing our lives.

新大学日语简明教程课文翻译

新大学日语简明教程课文翻译 第21课 一、我的留学生活 我从去年12月开始学习日语。已经3个月了。每天大约学30个新单词。每天学15个左右的新汉字,但总记不住。假名已经基本记住了。 简单的会话还可以,但较难的还说不了。还不能用日语发表自己的意见。既不能很好地回答老师的提问,也看不懂日语的文章。短小、简单的信写得了,但长的信写不了。 来日本不久就迎来了新年。新年时,日本的少女们穿着美丽的和服,看上去就像新娘。非常冷的时候,还是有女孩子穿着裙子和袜子走在大街上。 我在日本的第一个新年过得很愉快,因此很开心。 现在学习忙,没什么时间玩,但周末常常运动,或骑车去公园玩。有时也邀朋友一起去。虽然我有国际驾照,但没钱,买不起车。没办法,需要的时候就向朋友借车。有几个朋友愿意借车给我。 二、一个房间变成三个 从前一直认为睡在褥子上的是日本人,美国人都睡床铺,可是听说近来纽约等大都市的年轻人不睡床铺,而是睡在褥子上,是不是突然讨厌起床铺了? 日本人自古以来就睡在褥子上,那自有它的原因。人们都说日本人的房子小,从前,很少有人在自己的房间,一家人住在一个小房间里是常有的是,今天仍然有人过着这样的生活。 在仅有的一个房间哩,如果要摆下全家人的床铺,就不能在那里吃饭了。这一点,褥子很方便。早晨,不需要褥子的时候,可以收起来。在没有了褥子的房间放上桌子,当作饭厅吃早饭。来客人的话,就在那里喝茶;孩子放学回到家里,那房间就成了书房。而后,傍晚又成为饭厅。然后收起桌子,铺上褥子,又成为了全家人睡觉的地方。 如果是床铺的话,除了睡觉的房间,还需要吃饭的房间和书房等,但如果使用褥子,一个房间就可以有各种用途。 据说从前,在纽约等大都市的大学学习的学生也租得起很大的房间。但现在房租太贵,租不起了。只能住更便宜、更小的房间。因此,似乎开始使用睡觉时作床,白天折小能成为椅子的、方便的褥子。

新视野大学英语第一册Unit 1课文翻译

新视野大学英语第一册Unit 1课文翻译 学习外语是我一生中最艰苦也是最有意义的经历之一。 虽然时常遭遇挫折,但却非常有价值。 我学外语的经历始于初中的第一堂英语课。 老师很慈祥耐心,时常表扬学生。 由于这种积极的教学方法,我踊跃回答各种问题,从不怕答错。 两年中,我的成绩一直名列前茅。 到了高中后,我渴望继续学习英语。然而,高中时的经历与以前大不相同。 以前,老师对所有的学生都很耐心,而新老师则总是惩罚答错的学生。 每当有谁回答错了,她就会用长教鞭指着我们,上下挥舞大喊:“错!错!错!” 没有多久,我便不再渴望回答问题了。 我不仅失去了回答问题的乐趣,而且根本就不想再用英语说半个字。 好在这种情况没持续多久。 到了大学,我了解到所有学生必须上英语课。 与高中老师不同,大学英语老师非常耐心和蔼,而且从来不带教鞭! 不过情况却远不尽如人意。 由于班大,每堂课能轮到我回答的问题寥寥无几。 上了几周课后,我还发现许多同学的英语说得比我要好得多。 我开始产生一种畏惧感。 虽然原因与高中时不同,但我却又一次不敢开口了。 看来我的英语水平要永远停步不前了。 直到几年后我有机会参加远程英语课程,情况才有所改善。 这种课程的媒介是一台电脑、一条电话线和一个调制解调器。 我很快配齐了必要的设备并跟一个朋友学会了电脑操作技术,于是我每周用5到7天在网上的虚拟课堂里学习英语。 网上学习并不比普通的课堂学习容易。 它需要花许多的时间,需要学习者专心自律,以跟上课程进度。 我尽力达到课程的最低要求,并按时完成作业。 我随时随地都在学习。 不管去哪里,我都随身携带一本袖珍字典和笔记本,笔记本上记着我遇到的生词。 我学习中出过许多错,有时是令人尴尬的错误。 有时我会因挫折而哭泣,有时甚至想放弃。 但我从未因别的同学英语说得比我快而感到畏惧,因为在电脑屏幕上作出回答之前,我可以根据自己的需要花时间去琢磨自己的想法。 突然有一天我发现自己什么都懂了,更重要的是,我说起英语来灵活自如。 尽管我还是常常出错,还有很多东西要学,但我已尝到了刻苦学习的甜头。 学习外语对我来说是非常艰辛的经历,但它又无比珍贵。 它不仅使我懂得了艰苦努力的意义,而且让我了解了不同的文化,让我以一种全新的思维去看待事物。 学习一门外语最令人兴奋的收获是我能与更多的人交流。 与人交谈是我最喜欢的一项活动,新的语言使我能与陌生人交往,参与他们的谈话,并建立新的难以忘怀的友谊。 由于我已能说英语,别人讲英语时我不再茫然不解了。 我能够参与其中,并结交朋友。

新大学日语阅读与写作1 第3课译文

习惯与礼仪 我是个漫画家,对旁人细微的动作、不起眼的举止等抱有好奇。所以,我在国外只要做错一点什么,立刻会比旁人更为敏锐地感觉到那个国家的人们对此作出的反应。 譬如我多次看到过,欧美人和中国人见到我们日本人吸溜吸溜地出声喝汤而面露厌恶之色。过去,日本人坐在塌塌米上,在一张低矮的食案上用餐,餐具离嘴较远。所以,养成了把碗端至嘴边吸食的习惯。喝羹匙里的东西也象吸似的,声声作响。这并非哪一方文化高或低,只是各国的习惯、礼仪不同而已。 日本人坐在椅子上围桌用餐是1960年之后的事情。当时,还没有礼仪规矩,甚至有人盘着腿吃饭。外国人看见此景大概会一脸厌恶吧。 韩国女性就座时,单腿翘起。我认为这种姿势很美,但习惯于双膝跪坐的日本女性大概不以为然,而韩国女性恐怕也不认为跪坐为好。 日本等多数亚洲国家,常有人习惯在路上蹲着。欧美人会联想起狗排便的姿势而一脸厌恶。 日本人常常把手放在小孩的头上说“好可爱啊!”,而大部分外国人会不愿意。 如果向回教国家的人们劝食猪肉和酒,或用左手握手、递东西,会不受欢迎的。当然,饭菜也用右手抓着吃。只有从公用大盘往自己的小盘里分食用的公勺是用左手拿。一旦搞错,用黏糊糊的右手去拿,

会遭人厌恶。 在欧美,对不受欢迎的客人不说“请脱下外套”,所以电视剧中的侦探哥隆波总是穿着外套。访问日本家庭时,要在门厅外脱掉外套后进屋。穿到屋里会不受欢迎的。 这些习惯只要了解就不会出问题,如果因为不知道而遭厌恶、憎恨,实在心里难受。 过去,我曾用色彩图画和简短的文字画了一本《关键时刻的礼仪》(新潮文库)。如今越发希望用各国语言翻译这本书。以便能对在日本的外国人有所帮助。同时希望有朝一日以漫画的形式画一本“世界各国的习惯与礼仪”。 练习答案 5、 (1)止める並んでいる見ているなる着色した (2)拾った入っていた行ったしまった始まっていた

新视野大学英语(第三版)读写教程第二册课文翻译(全册)

新视野大学英语第三版第二册读写课文翻译 Unit 1 Text A 一堂难忘的英语课 1 如果我是唯一一个还在纠正小孩英语的家长,那么我儿子也许是对的。对他而言,我是一个乏味的怪物:一个他不得不听其教诲的父亲,一个还沉湎于语法规则的人,对此我儿子似乎颇为反感。 2 我觉得我是在最近偶遇我以前的一位学生时,才开始对这个问题认真起来的。这个学生刚从欧洲旅游回来。我满怀着诚挚期待问她:“欧洲之行如何?” 3 她点了三四下头,绞尽脑汁,苦苦寻找恰当的词语,然后惊呼:“真是,哇!” 4 没了。所有希腊文明和罗马建筑的辉煌居然囊括于一个浓缩的、不完整的语句之中!我的学生以“哇!”来表示她的惊叹,我只能以摇头表达比之更强烈的忧虑。 5 关于正确使用英语能力下降的问题,有许多不同的故事。学生的确本应该能够区分诸如their/there/they're之间的不同,或区别complimentary 跟complementary之间显而易见的差异。由于这些知识缺陷,他们承受着大部分不该承受的批评和指责,因为舆论认为他们应该学得更好。 6 学生并不笨,他们只是被周围所看到和听到的语言误导了。举例来说,杂货店的指示牌会把他们引向stationary(静止处),虽然便笺本、相册、和笔记本等真正的stationery(文具用品)并没有被钉在那儿。朋友和亲人常宣称They've just ate。实际上,他们应该说They've just eaten。因此,批评学生不合乎情理。 7 对这种缺乏语言功底而引起的负面指责应归咎于我们的学校。学校应对英语熟练程度制定出更高的标准。可相反,学校只教零星的语法,高级词汇更是少之又少。还有就是,学校的年轻教师显然缺乏这些重要的语言结构方面的知识,因为他们过去也没接触过。学校有责任教会年轻人进行有效的语言沟通,可他们并没把语言的基本框架——准确的语法和恰当的词汇——充分地传授给学生。

新视野大学英语1课文翻译

新视野大学英语1课文翻译 1下午好!作为校长,我非常自豪地欢迎你们来到这所大学。你们所取得的成就是你们自己多年努力的结果,也是你们的父母和老师们多年努力的结果。在这所大学里,我们承诺将使你们学有所成。 2在欢迎你们到来的这一刻,我想起自己高中毕业时的情景,还有妈妈为我和爸爸拍的合影。妈妈吩咐我们:“姿势自然点。”“等一等,”爸爸说,“把我递给他闹钟的情景拍下来。”在大学期间,那个闹钟每天早晨叫醒我。至今它还放在我办公室的桌子上。 3让我来告诉你们一些你们未必预料得到的事情。你们将会怀念以前的生活习惯,怀念父母曾经提醒你们要刻苦学习、取得佳绩。你们可能因为高中生活终于结束而喜极而泣,你们的父母也可能因为终于不用再给你们洗衣服而喜极而泣!但是要记住:未来是建立在过去扎实的基础上的。 4对你们而言,接下来的四年将会是无与伦比的一段时光。在这里,你们拥有丰富的资源:有来自全国各地的有趣的学生,有学识渊博又充满爱心的老师,有综合性图书馆,有完备的运动设施,还有针对不同兴趣的学生社团——从文科社团到理科社团、到社区服务等等。你们将自由地探索、学习新科目。你们要学着习惯点灯熬油,学着结交充满魅力的人,学着去追求新的爱好。我想鼓励你们充分利用这一特殊的经历,并用你们的干劲和热情去收获这一机会所带来的丰硕成果。 5有这么多课程可供选择,你可能会不知所措。你不可能选修所有的课程,但是要尽可能体验更多的课程!大学里有很多事情可做可学,每件事情都会为你提供不同视角来审视世界。如果我只能给你们一条选课建议的话,那就是:挑战自己!不要认为你早就了解自己对什么样的领域最感兴趣。选择一些你从未接触过的领域的课程。这样,你不仅会变得更加博学,而且更有可能发现一个你未曾想到的、能成就你未来的爱好。一个绝佳的例子就是时装设计师王薇薇,她最初学的是艺术史。随着时间的推移,王薇薇把艺术史研究和对时装的热爱结合起来,并将其转化为对设计的热情,从而使她成为全球闻名的设计师。 6在大学里,一下子拥有这么多新鲜体验可能不会总是令人愉快的。在你的宿舍楼里,住在你隔壁寝室的同学可能会反复播放同一首歌,令你头痛欲裂!你可能喜欢早起,而你的室友却是个夜猫子!尽管如此,你和你的室友仍然可能成

新视野大学英语2课文翻译

新视野大学英语2课文翻译(Unit1-Unit7) Unit 1 Section A 时间观念强的美国人 Para. 1 美国人认为没有人能停止不前。如果你不求进取,你就会落伍。这种态度造就了一个投身于研究、实验和探索的民族。时间是美国人注意节约的两个要素之一,另一个是劳力。 Para. 2 人们一直说:“只有时间才能支配我们。”人们似乎是把时间当作一个差不多是实实在在的东西来对待的。我们安排时间、节约时间、浪费时间、挤抢时间、消磨时间、缩减时间、对时间的利用作出解释;我们还要因付出时间而收取费用。时间是一种宝贵的资源,许多人都深感人生的短暂。时光一去不复返。我们应当让每一分钟都过得有意义。 Para. 3 外国人对美国的第一印象很可能是:每个人都匆匆忙忙——常常处于压力之下。城里人看上去总是在匆匆地赶往他们要去的地方,在商店里他们焦躁不安地指望店员能马上来为他们服务,或者为了赶快买完东西,用肘来推搡他人。白天吃饭时人们也都匆匆忙忙,这部分地反映出这个国家的生活节奏。工作时间被认为是宝贵的。Para. 3b 在公共用餐场所,人们都等着别人吃完后用餐,以便按时赶回去工作。你还会发现司机开车很鲁莽,人们推搡着在你身边过去。你会怀念微笑、简短的交谈以及与陌生人的随意闲聊。不要觉得这是针对你个人的,这是因为人们非常珍惜时间,而且也不喜欢他人“浪费”时间到不恰当的地步。 Para. 4 许多刚到美国的人会怀念诸如商务拜访等场合开始时的寒暄。他们也会怀念那种一边喝茶或咖啡一边进行的礼节性交流,这也许是他们自己国家的一种习俗。他们也许还会怀念在饭店或咖啡馆里谈生意时的那种轻松悠闲的交谈。一般说来,美国人是不会在如此轻松的环境里通过长时间的闲聊来评价他们的客人的,更不用说会在增进相互间信任的过程中带他们出去吃饭,或带他们去打高尔夫球。既然我们通常是通过工作而不是社交来评估和了解他人,我们就开门见山地谈正事。因此,时间老是在我们心中的耳朵里滴滴答答地响着。 Para. 5 因此,我们千方百计地节约时间。我们发明了一系列节省劳力的装置;我们通过发传真、打电话或发电子邮件与他人迅速地进行交流,而不是通过直接接触。虽然面对面接触令人愉快,但却要花更多的时间, 尤其是在马路上交通拥挤的时候。因此,我们把大多数个人拜访安排在下班以后的时间里或周末的社交聚会上。 Para. 6 就我们而言,电子交流的缺乏人情味与我们手头上事情的重要性之间很少有或完全没有关系。在有些国家, 如果没有目光接触,就做不成大生意,这需要面对面的交谈。在美国,最后协议通常也需要本人签字。然而现在人们越来越多地在电视屏幕上见面,开远程会议不仅能解决本国的问题,而且还能通过卫星解决国际问题。

新视野大学英语第三版课文翻译

新视野大学英语3第三版课文翻译 Unit 1 The Way to Success 课文A Never, ever give up! 永不言弃! As a young boy, Britain's great Prime Minister, Sir Winston Churchill, attended a public school called Harrow. He was not a good student, and had he not been from a famous family, he probably would have been removed from the school for deviating from the rules. Thankfully, he did finish at Harrow and his errors there did not preclude him from going on to the university. He eventually had a premier army career whereby he was later elected prime minister. He achieved fame for his wit, wisdom, civic duty, and abundant courage in his refusal to surrender during the miserable dark days of World War II. His amazing determination helped motivate his entire nation and was an inspiration worldwide. Toward the end of his period as prime minister, he was invited to address the patriotic young boys at his old school, Harrow. The headmaster said, "Young gentlemen, the greatest speaker of our time, will be here in a few days to address you, and you should obey whatever sound advice he may give you." The great day arrived. Sir Winston stood up, all five feet, five inches and 107 kilos of him, and gave this short, clear-cut speech: "Young men, never give up. Never give up! Never give up! Never, never, never, never!" 英国的伟大首相温斯顿·丘吉尔爵士,小时候在哈罗公学上学。当时他可不是个好学生,要不是出身名门,他可能早就因为违反纪律被开除了。谢天谢地,他总算从哈罗毕业了,在那里犯下的错误并没影响到他上大学。后来,他凭着军旅生涯中的杰出表现当选为英国首相。他的才思、智慧、公民责任感以及在二战痛苦而黑暗的时期拒绝投降的无畏勇气,为他赢得了美名。他非凡的决心,不仅激励了整个民族,还鼓舞了全世界。 在他首相任期即将结束时,他应邀前往母校哈罗公学,为满怀报国之志的同学们作演讲。校长说:“年轻的先生们,当代最伟大的演说家过几天就会来为你们演讲,他提出的任何中肯的建议,你们都要听从。”那个激动人心的日子终于到了。温斯顿爵士站了起来——他只有5 英尺5 英寸高,体重却有107 公斤。他作了言简意赅的讲话:“年轻人,要永不放弃。永不放弃!永不放弃!永不,永不,永不,永不!” Personal history, educational opportunity, individual dilemmas - none of these can inhibit a strong spirit committed to success. No task is too hard. No amount of preparation is too long or too difficult. Take the example of two of the most scholarly scientists of our age, Albert Einstein and Thomas Edison. Both faced immense obstacles and extreme criticism. Both were called "slow to learn" and written off as idiots by their teachers. Thomas Edison ran away from school because his teacher whipped him repeatedly for asking too many questions. Einstein didn't speak fluently until he was almost nine years old and was such a poor student that some thought he was unable to learn. Yet both boys' parents believed in them. They worked intensely each day with their sons, and the boys learned to never bypass the long hours of hard work that they needed to succeed. In the end, both Einstein and Edison overcame their childhood persecution and went on to achieve magnificent discoveries that benefit the entire world today. Consider also the heroic example of Abraham Lincoln, who faced substantial hardships, failures and repeated misfortunes in his lifetime. His background was certainly not glamorous. He was raised in a very poor family with only one year of formal education. He failed in business twice, suffered a nervous breakdown when his first love died suddenly and lost eight political

新视野大学英语读写教程2-(第三版)-unit-2-课文原文及翻译

Text A 课文 A The humanities: Out of date? 人文学科:过时了吗? When the going gets tough, the tough takeaccounting. When the job market worsens, manystudents calculate they can't major in English orhistory. They have to study something that booststheir prospects of landing a job. 当形势变得困难时,强者会去选学会计。当就业市场恶化时,许多学生估算着他们不能再主修英语或历史。他们得学一些能改善他们就业前景的东西。 The data show that as students have increasingly shouldered the ever-rising c ost of tuition,they have defected from the study of the humanities and toward applied science and "hard"skills that they bet will lead to employment. In oth er words, a college education is more andmore seen as a means for economic betterment rather than a means for human betterment.This is a trend that i s likely to persist and even accelerate. 数据显示,随着学生肩负的学费不断增加,他们已从学习人文学科转向他们相信有益于将来就业的应用科学和“硬”技能。换言之,大学教育越来越被看成是改善经济而不是提升人类自身的手段。这种趋势可能会持续,甚至有加快之势。 Over the next few years, as labor markets struggle, the humanities will proba bly continue theirlong slide in succession. There already has been a nearly 50 percent decline in the portion of liberal arts majors over the past generatio n, and it is logical to think that the trend is boundto continue or even accel erate. Once the dominant pillars of university life, the humanities nowplay li ttle roles when students take their college tours. These days, labs are more vi vid and compelling than libraries. 在未来几年内,由于劳动力市场的不景气,人文学科可能会继续其长期低迷的态势。在上一代大学生中,主修文科的学生数跌幅已近50%。这种趋势会持续、甚至加速的想法是合情合理的。人文学科曾是大学生活的重要支柱,而今在学生们参观校园的时候,却只是一个小点缀。现在,实验室要比图书馆更栩栩如生、受人青睐。 Here, please allow me to stand up for and promote the true value that the h umanities add topeople's lives. 在这儿,请允许我为人文学科给人们的生活所增添的真实价值进行支持和宣传。

新大学日语课文翻译。

第10课 日本的季节 日本的一年有春、夏、秋、冬四个季节。 3月、4月和5月这三个月是春季。春季是个暖和的好季节。桃花、樱花等花儿开得很美。人们在4月去赏花。 6月到8月是夏季。夏季非常闷热。人们去北海道旅游。7月和8月是暑假,年轻人去海边或山上。也有很多人去攀登富士山。富士山是日本最高的山。 9月、10月和11月这3个月是秋季。秋季很凉爽,晴朗的日子较多。苹果、桔子等许多水果在这个季节成熟。 12月到2月是冬季。日本的南部冬天不太冷。北部非常冷,下很多雪。去年冬天东京也很冷。今年大概不会那么冷吧。如果冷的话,人们就使用暖气炉。 第12课 乡下 我爷爷住哎乡下。今天,我要去爷爷家。早上天很阴,但中午天空开始变亮,天转好了。我急急忙忙吃完午饭,坐上了电车。 现在,电车正行驶在原野上。窗外,水田、旱地连成一片。汽车在公路上奔驰。 这时,电车正行驶在大桥上。下面河水在流动。河水很清澈,可以清澈地看见河底。可以看见鱼在游动。远处,一个小孩在挥手。他身旁,牛、马在吃草。 到了爷爷居住的村子。爷爷和奶奶来到门口等着我。爷爷的房子是旧房子,但是很大。登上二楼,大海就在眼前。海岸上,很多人正在全力拉缆绳。渐渐地可以看见网了。网里有很多鱼。和城市不同,乡下的大自然真是很美。 第13课 暑假 大概没有什么比暑假更令学生感到高兴的了。大学在7月初,其他学校在二十四日左右进入暑假。暑假大约1个半月。 很多人利用这个假期去海边、山上,或者去旅行。学生中,也有人去打工。学生由于路费等只要半价,所以在学期间去各地旅行。因此,临近暑假时,去北海道的列车上就挤满了这样的人。从炎热的地方逃避到凉爽的地方去,这是很自然的事。一般在1月、最迟在2月底之前就要预定旅馆。不然的话可能会没有地方住。 暑假里,山上、海边、湖里、河里会出现死人的事,这种事故都是由于不注意引起的。大概只能每个人自己多加注意了。 在东京附近,镰仓等地的海面不起浪,因此挤满了游泳的人。也有人家只在夏季把海边的房子租下来。 暑假里,学校的老师给学生布置作业,但是有的学生叫哥哥或姐姐帮忙。 第14课 各式各样的学生 我就读的大学都有各种各样的学生入学。学生有的是中国人,有的是美国人,有的是英国人。既有年轻的,也有不年轻的。有胖的学生,也有瘦的学生。学生大多边工作边学习。因此,大家看上去都很忙。经常有人边听课边打盹。 我为了学习日本先进的科学技术和日本文化来到日本。预定在这所大学学习3年。既然特意来了日本,所以每天都很努力学习。即便如此,考试之前还是很紧张。其他学生也是这

新视野大学英语5课文翻译(全)

教育界的科技革命 如果让生活在年的人来到我们这个时代,他会辨认出我们当前课堂里发生的许多事情——那盛行的讲座、对操练的强调、从基础读本到每周的拼写测试在内的教学材料和教学活动。可能除了教堂以外,很少有机构像主管下一代正规教育的学校那样缺乏变化了。 让我们把上述一贯性与校园外孩子们的经历作一番比较吧。在现代社会,孩子们有机会接触广泛的媒体,而在早些年代这些媒体简直就是奇迹。来自过去的参观者一眼就能辨认出现在的课堂,但很难适应现今一个岁孩子的校外世界。 学校——如果不是一般意义上的教育界——天生是保守的机构。我会在很大程度上为这种保守的趋势辩护。但变化在我们的世界中是如此迅速而明确,学校不可能维持现状或仅仅做一些表面的改善而生存下去。的确,如果学校不迅速、彻底地变革,就有可能被其他较灵活的机构取代。 计算机的变革力 当今时代最重要的科技事件要数计算机的崛起。计算机已渗透到我们生活的诸多方面,从交通、电讯到娱乐等等。许多学校当然不能漠视这种趋势,于是也配备了计算机和网络。在某种程度上,这些科技辅助设施已被吸纳到校园生活中,尽管他们往往只是用一种更方便、更有效的模式教授旧课程。 然而,未来将以计算机为基础组织教学。计算机将在一定程度上允许针对个人的授课,这种授课形式以往只向有钱人提供。所有的学生都会得到符合自身需要的、适合自己学习方法和进度的课程设置,以及对先前所学材料、课程的成绩记录。 毫不夸张地说,计算机科技可将世界上所有的信息置于人们的指尖。这既是幸事又是灾难。我们再也无须花费很长时间查找某个出处或某个人——现在,信息的传递是瞬时的。不久,我们甚至无须键入指令,只需大声提出问题,计算机就会打印或说出答案,这样,人们就可实现即时的"文化脱盲"。 美中不足的是,因特网没有质量控制手段;"任何人都可以拨弄"。信息和虚假信息往往混杂在一起,现在还没有将网上十分普遍的被歪曲的事实和一派胡言与真实含义区分开来的可靠手段。要识别出真的、美的、好的信息,并挑出其中那些值得知晓的, 这对人们构成巨大的挑战。 对此也许有人会说,这个世界一直充斥着错误的信息。的确如此,但以前教育当局至少能选择他们中意的课本。而今天的形势则是每个人都拥有瞬时可得的数以百万计的信息源,这种情况是史无前例的。 教育的客户化 与以往的趋势不同,从授权机构获取证书可能会变得不再重要。每个人都能在模拟的环境中自学并展示个人才能。如果一个人能像早些时候那样"读法律",然后通过计算机模拟的实践考试展现自己的全部法律技能,为什么还要花万美元去上法学院呢?用类似的方法学开飞机或学做外科手术不同样可行吗? 在过去,大部分教育基本是职业性的:目的是确保个人在其年富力强的整个成人阶段能可靠地从事某项工作。现在,这种设想有了缺陷。很少有人会一生只从事一种职业;许多人都会频繁地从一个职位、公司或经济部门跳到另一个。 在经济中,这些新的、迅速变换的角色的激增使教育变得大为复杂。大部分老成持重的教师和家长对帮助青年一代应对这个会经常变换工作的世界缺乏经验。由于没有先例,青少年们只有自己为快速变化的"事业之路"和生活状况作准备。

相关文档
相关文档 最新文档