3 CHAPTERProcessesPractice Exercises3.1 Palm OS provides no means of c dịch - 3 CHAPTERProcessesPractice Exercises3.1 Palm OS provides no means of c Việt làm thế nào để nói

3 CHAPTERProcessesPractice Exercise

3 CHAPTER
Processes
Practice Exercises
3.1 Palm OS provides no means of concurrent processing. Discuss three
major complications that concurrent processing adds to an operating
system.
Answer:
a. A method of time sharing must be implemented to allow each
of several processes to have access to the system. This method
involves the preemption of processes that do not voluntarily give
up the CPU (by using a system call, for instance) and the kernel
being reentrant (somore than one processmay be executing kernel
code concurrently).
b. Processes and system resources must have protections and must
be protected from each other. Any given process must be limited
in the amount of memory it can use and the operations it can
perform on devices like disks.
c. Care must be taken in the kernel to prevent deadlocks between
processes, so processes aren’t waiting for each other’s allocated
resources.
3.2 The Sun UltraSPARC processor has multiple register sets. Describe the
actions of a context switch if the new context is already loaded into
one of the register sets. What else must happen if the new context is in
memory rather than in a register set and all the register sets are in use?
Answer: The CPU current-register-set pointer is changed to point to the
set containing the newcontext,which takes very little time. If the context
is in memory, one of the contexts in a register set must be chosen and be
moved to memory, and the new context must be loaded from memory
910 Chapter 3 Processes
into the set. This process takes a little more time than on systems with
one set of registers, depending on how a replacement victim is selected.
3.3 When a process creates a new process using the fork() operation, which
of the following state is shared between the parent process and the child
process?
a. Stack
b. Heap
c. Shared memory segments
Answer: Only the shared memory segments are shared between the
parent process and the newly forked child process. Copies of the stack
and the heap are made for the newly created process.
3.4 Again considering the RPC mechanism, consider the “exactly once” se-
mantic. Does the algorithm for implementing this semantic execute cor-
rectly even if the “ACK”message back to the client is lost due to a network
problem?Describe the sequence ofmessages andwhether "exactly once"
is still preserved.
Answer: The “exactly once” semantics ensure that a remore procedure
will be executed exactly once and only once. The general algorithm for
ensuring this combines an acknowledgment (ACK)schemecombined
with timestamps (or some other incremental counter that allows the
server to distinguish between duplicate messages).
The general strategy is for the client to send the RPC to the server along
with a timestamp. The client will also start a timeout clock. The client
will then wait for one of two occurrences: (1) it will receive an ACK from
the server indicating that the remote procedure was performed, or (2) it
will time out. If the client times out, it assumes the server was unable
to perform the remote procedure so the client invokes the RPC asecond
time, sending a later timestamp. The client may not receive the ACK for
one of two reasons: (1) the original RPC was never received by the server,
or (2) the RPC was correctly received—and performed—by the server
but the ACK was lost. In situation (1), the use of ACKs allows the server
ultimately to receive and performthe RPC. In situation (2), the serverwill
receive a duplicate RPC and it will use the timestamp to identify it as a
duplicate so as not to perform the RPC a second time. It is important to
note that the server must send a second ACK back to the client to inform
the client the RPC has been performed.
3.5 Assume that a distributed system is susceptible to server failure. What
mechanisms would be required to guarantee the “exactly once” seman-
tics for execution of RPCs?
Answer: The server should keep track in stable storage (such as a
disk log) information regarding what RPC operations were received,
whether they were successfully performed, and the results associated
with the operations.When a server crash takes place and a RPC message
is received, the server can check whether the RPC had been previously
performed and therefore guarantee “exactly once” semanctics for the
execution of RPCs.
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
CHƯƠNG 3Quy trìnhBài tập thực hành3.1 palm OS cung cấp không có phương tiện xử lý đồng thời. Thảo luận về baCác biến chứng là xử lý đồng thời cho biết thêm một hoạt độngHệ thống.Trả lời:một phương pháp thời gian chia sẻ phải được thực hiện để cho phép mỗitrong một số quá trình để có quyền truy cập vào hệ thống. Phương pháp nàyliên quan đến preemption của các quá trình không tự nguyện cung cấp choCPU (bằng cách sử dụng một hệ thống gọi, ví dụ) và hạt nhânlà reentrant (somore hơn một processmay thực hiện hạt nhânMã đồng thời).b. quy trình và tài nguyên hệ thống phải có bảo vệ và phảiđược bảo vệ khỏi nhau. Bất kỳ quá trình nhất định phải được hạn chếsố lượng bộ nhớ nó có thể sử dụng và các hoạt động đó có thểthực hiện trên thiết bị như đĩa.c. chăm sóc phải được thực hiện trong hạt nhân để ngăn chặn deadlocks giữaquy trình, do đó, quá trình không chờ đợi cho nhau được cấp pháttài nguyên.The Sun UltraSPARC 3.2 bộ vi xử lý có nhiều bộ đăng ký. Mô tả cácCác hành động của một chuyển đổi bối cảnh nếu bối cảnh mới đã được nạp vàomột trong bộ đăng ký. Tất cả những gì khác phải xảy ra nếu bối cảnh mới trongbộ nhớ thay vì bộ đăng ký và tất cả đăng ký bộ sử dụng?Trả lời: Con trỏ hiện tại-đăng ký thiết lập CPU được thay đổi để trỏ đến cácthiết lập chứa newcontext, mà mất rất ít thời gian. Nếu bối cảnhlà trong bộ nhớ, một trong các bối cảnh trong một bộ đăng ký phải được lựa chọn vàchuyển đến bộ nhớ, và bối cảnh mới phải được nạp từ bộ nhớ910 chương 3 quy trìnhvào các thiết lập. Quá trình này mất rất nhiều thời gian hơn trên hệ thống bằngmột tập hợp các đăng ký, tùy thuộc vào cách một nạn nhân thay thế được chọn.3.3 khi một quá trình tạo ra một quy trình mới bằng cách sử dụng các hoạt động fork(), màcủa tiểu bang sau đây được chia sẻ giữa quá trình phụ huynh và đứa trẻquá trình?a. ngăn xếpsinh đốngc. bộ nhớ dùng chung phân đoạnTrả lời: Chỉ là các phân đoạn được chia sẻ bộ nhớ được chia sẻ giữa cácquá trình phụ huynh và quá trình con mới được xẻ thùy. Bản sao của ngăn xếpvà heap được tạo cho quá trình mới được tạo ra.3.4 lại xem xét cơ chế RPC, xem xét các "đúng một lần" se-mantic. Hiện các thuật toán cho việc thực hiện này thực hiện ngữ nghĩa cor-rectly ngay cả khi tin nhắn "ACK" trở lại cho khách hàng bị mất do một mạng lướivấn đề? Mô tả trình tự ofmessages andwhether "đúng một lần"vẫn được bảo tồn.Trả lời: "Chính xác khi" ngữ nghĩa đảm bảo rằng một thủ tục remoresẽ được thực hiện đúng một lần và chỉ một lần. Các thuật toán tổng quát chođảm bảo điều này kết hợp một schemecombined thừa nhận (ACK)với timestamps (hoặc một số truy cập gia tăng khác cho phép cácHệ phục vụ để phân biệt giữa các tin nhắn trùng lặp).Các chiến lược chung là cho khách hàng để gửi RPC cho máy chủ cùngvới một dấu thời gian. Khách hàng cũng sẽ bắt đầu một đồng hồ thời gian chờ. Khách hàngsau đó sẽ chờ đợi cho một trong hai sự kiện: (1) nó sẽ nhận được một ACK từHệ phục vụ chỉ ra rằng các thủ tục từ xa được thực hiện, hoặc CNTT (2)will time out. If the client times out, it assumes the server was unableto perform the remote procedure so the client invokes the RPC asecondtime, sending a later timestamp. The client may not receive the ACK forone of two reasons: (1) the original RPC was never received by the server,or (2) the RPC was correctly received—and performed—by the serverbut the ACK was lost. In situation (1), the use of ACKs allows the serverultimately to receive and performthe RPC. In situation (2), the serverwillreceive a duplicate RPC and it will use the timestamp to identify it as aduplicate so as not to perform the RPC a second time. It is important tonote that the server must send a second ACK back to the client to informthe client the RPC has been performed.3.5 Assume that a distributed system is susceptible to server failure. Whatmechanisms would be required to guarantee the “exactly once” seman-tics for execution of RPCs?Answer: The server should keep track in stable storage (such as adisk log) information regarding what RPC operations were received,whether they were successfully performed, and the results associatedwith the operations.When a server crash takes place and a RPC messageis received, the server can check whether the RPC had been previouslyperformed and therefore guarantee “exactly once” semanctics for theexecution of RPCs.
đang được dịch, vui lòng đợi..
 
Các ngôn ngữ khác
Hỗ trợ công cụ dịch thuật: Albania, Amharic, Anh, Armenia, Azerbaijan, Ba Lan, Ba Tư, Bantu, Basque, Belarus, Bengal, Bosnia, Bulgaria, Bồ Đào Nha, Catalan, Cebuano, Chichewa, Corsi, Creole (Haiti), Croatia, Do Thái, Estonia, Filipino, Frisia, Gael Scotland, Galicia, George, Gujarat, Hausa, Hawaii, Hindi, Hmong, Hungary, Hy Lạp, Hà Lan, Hà Lan (Nam Phi), Hàn, Iceland, Igbo, Ireland, Java, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Kurd, Kyrgyz, Latinh, Latvia, Litva, Luxembourg, Lào, Macedonia, Malagasy, Malayalam, Malta, Maori, Marathi, Myanmar, Mã Lai, Mông Cổ, Na Uy, Nepal, Nga, Nhật, Odia (Oriya), Pashto, Pháp, Phát hiện ngôn ngữ, Phần Lan, Punjab, Quốc tế ngữ, Rumani, Samoa, Serbia, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenia, Somali, Sunda, Swahili, Séc, Tajik, Tamil, Tatar, Telugu, Thái, Thổ Nhĩ Kỳ, Thụy Điển, Tiếng Indonesia, Tiếng Ý, Trung, Trung (Phồn thể), Turkmen, Tây Ban Nha, Ukraina, Urdu, Uyghur, Uzbek, Việt, Xứ Wales, Yiddish, Yoruba, Zulu, Đan Mạch, Đức, Ả Rập, dịch ngôn ngữ.

Copyright ©2024 I Love Translation. All reserved.

E-mail: