CHAPTERPractice Exercises2.1 What is the purpose of system calls?Answe dịch - CHAPTERPractice Exercises2.1 What is the purpose of system calls?Answe Việt làm thế nào để nói

CHAPTERPractice Exercises2.1 What i

CHAPTER
Practice Exercises
2.1 What is the purpose of system calls?
Answer: System calls allow user-level processes to request services of
the operating system.
2.2 What are the five major activities of an operating system in regard to
process management?
Answer:
a. The creation and deletion of both user and system processes
b. The suspension and resumption of processes
c. The provision of mechanisms for process synchronization
d. The provision of mechanisms for process communication
e. The provision of mechanisms for deadlock handling
2.3 What are the three major activities of an operating system in regard to
memory management?
Answer:
a. Keep track of which parts of memory are currently being used
and by whom.
b. Decidewhich processes are to be loaded intomemorywhenmem-
ory space becomes available.
c. Allocate and deallocate memory space as needed.
2.4 What are the three major activities of an operating system in regard to
secondary-storage management?
Answer:
56 Chapter 2 Operating-System Structures
• Free-space management.
• Storage allocation.
• Disk scheduling.
2.5 What is the purpose of the command interpreter? Why is it usually
separate from the kernel?
Answer: It reads commands from the user or from a file of commands
and executes them, usually by turning them into one or more system
calls. It is usually not part of the kernel since the command interpreter
is subject to changes.
2.6 What systemcalls have to be executed by a command interpreter or shell
in order to start a new process?
Answer: In Unix systems, a fork system call followed by an exec system
call need to be performed to start a new process. The fork call clones the
currently executing process, while the exec call overlays a new process
based on a different executable over the calling process.
2.7 What is the purpose of system programs?
Answer: System programs can be thought of as bundles of useful
system calls. They provide basic functionality to users so that users do
not need to write their own programs to solve common problems.
2.8 What is the main advantage of the layered approach to system design?
What are the disadvantages of using the layered approach?
Answer: As in all cases of modular design, designing an operating
system in a modular way has several advantages. The system is easier
to debug and modify because changes affect only limited sections of
the system rather than touching all sections of the operating system.
Information is kept only where it is needed and is accessible only within
a defined and restricted area, so any bugs affecting that data must be
limited to a specific module or layer.
2.9 List five services provided by an operating system. Explain how each
provides convenience to the users. Explain also in which cases it would
be impossible for user-level programs to provide these services.
Answer:
a. Program execution. The operating system loads the contents (or
sections) of a file into memory and begins its execution. A user-
level program could not be trusted to properly allocate CPU time.
b. I/O operations. Disks, tapes, serial lines, and other devices must
be communicated with at a very low level. The user need only
specify the device and the operation to perform on it, while the
system converts that request into device- or controller-specific
commands. User-level programs cannot be trusted to access only
devices they should have access to and to access them only when
they are otherwise unused.
c. File-systemmanipulation. There aremany details in file creation,
deletion, allocation, and naming that users should not have to per-
form. Blocks of disk space are used by files and must be tracked.Practice Exercises 7
Deleting a file requires removing the name file information and
freeing the allocated blocks. Protections must also be checked to
assure proper file access. User programs could neither ensure ad-
herence to protection methods nor be trusted to allocate only free
blocks and deallocate blocks on file deletion.
d. Communications. Message passing between systems requires
messages to be turned into packets of information, sent to the net-
work controller, transmitted across a communications medium,
and reassembled by the destination system. Packet ordering and
data correction must take place. Again, user programs might not
coordinate access to the network device, or they might receive
packets destined for other processes.
e. Error detection. Error detection occurs at both the hardware and
software levels. At the hardware level, all data transfers must be
inspected to ensure that data have not been corrupted in transit.
All data on media must be checked to be sure they have not
changed since they were written to the media. At the software
level, media must be checked for data consistency; for instance,
whether the number of allocated and unallocated blocks of storage
match the total number on the device. There, errors are frequently
process-independent (for instance, the corruption of data on a
disk), so there must be
0/5000
Từ: -
Sang: -
Kết quả (Việt) 1: [Sao chép]
Sao chép!
CHAPTERPractice Exercises2.1 What is the purpose of system calls?Answer: System calls allow user-level processes to request services ofthe operating system.2.2 What are the five major activities of an operating system in regard toprocess management?Answer:a. The creation and deletion of both user and system processesb. The suspension and resumption of processesc. The provision of mechanisms for process synchronizationd. The provision of mechanisms for process communicatione. The provision of mechanisms for deadlock handling2.3 What are the three major activities of an operating system in regard tomemory management?Answer:a. Keep track of which parts of memory are currently being usedand by whom.b. Decidewhich processes are to be loaded intomemorywhenmem-ory space becomes available.c. Allocate and deallocate memory space as needed.2.4 What are the three major activities of an operating system in regard tosecondary-storage management?Answer:56 Chapter 2 Operating-System Structures• Free-space management.• Storage allocation.• Disk scheduling.2.5 What is the purpose of the command interpreter? Why is it usuallyseparate from the kernel?Answer: It reads commands from the user or from a file of commandsand executes them, usually by turning them into one or more systemcalls. It is usually not part of the kernel since the command interpreteris subject to changes.2.6 What systemcalls have to be executed by a command interpreter or shellin order to start a new process?Answer: In Unix systems, a fork system call followed by an exec systemcall need to be performed to start a new process. The fork call clones thecurrently executing process, while the exec call overlays a new processbased on a different executable over the calling process.2.7 What is the purpose of system programs?Answer: System programs can be thought of as bundles of usefulsystem calls. They provide basic functionality to users so that users donot need to write their own programs to solve common problems.2.8 What is the main advantage of the layered approach to system design?What are the disadvantages of using the layered approach?Answer: As in all cases of modular design, designing an operatingsystem in a modular way has several advantages. The system is easierto debug and modify because changes affect only limited sections ofthe system rather than touching all sections of the operating system.Information is kept only where it is needed and is accessible only withina defined and restricted area, so any bugs affecting that data must belimited to a specific module or layer.2.9 List five services provided by an operating system. Explain how eachprovides convenience to the users. Explain also in which cases it wouldbe impossible for user-level programs to provide these services.Answer:a. Program execution. The operating system loads the contents (orsections) of a file into memory and begins its execution. A user-level program could not be trusted to properly allocate CPU time.b. I/O operations. Disks, tapes, serial lines, and other devices mustbe communicated with at a very low level. The user need onlyspecify the device and the operation to perform on it, while thesystem converts that request into device- or controller-specificcommands. User-level programs cannot be trusted to access onlydevices they should have access to and to access them only whenthey are otherwise unused.c. File-systemmanipulation. There aremany details in file creation,deletion, allocation, and naming that users should not have to per-form. Blocks of disk space are used by files and must be tracked.Practice Exercises 7Deleting a file requires removing the name file information andfreeing the allocated blocks. Protections must also be checked toassure proper file access. User programs could neither ensure ad-herence to protection methods nor be trusted to allocate only freeblocks and deallocate blocks on file deletion.d. Communications. Message passing between systems requiresmessages to be turned into packets of information, sent to the net-work controller, transmitted across a communications medium,and reassembled by the destination system. Packet ordering anddata correction must take place. Again, user programs might notcoordinate access to the network device, or they might receivepackets destined for other processes.
e. Error detection. Error detection occurs at both the hardware and
software levels. At the hardware level, all data transfers must be
inspected to ensure that data have not been corrupted in transit.
All data on media must be checked to be sure they have not
changed since they were written to the media. At the software
level, media must be checked for data consistency; for instance,
whether the number of allocated and unallocated blocks of storage
match the total number on the device. There, errors are frequently
process-independent (for instance, the corruption of data on a
disk), so there must be
đ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: