Answers to Exercises





Answers to Exercises
uninitialized data are simply recorded as a size. The initialized data must be
represented in the file so that the kernel can copy them into memory when the
process lirst references them. Me uninitialized data are delined to be zero, and
consequently do not need to occupy any space in the executable file. The kernel
memory that it fills with zeros.
handles an initial fault on a page of uninitialized data by providing a page of
3.8 Why is the conversion from UTC to local time done by user processes,
rather than in the kernel?
All UNIX kernels worldwide have their concept of time synchronized to UTC. A
timestamp from one kernel can be compared with a timestamp on any other
kernel. Having the conversion of UTC to local time done by user processes
ensures that each user process is presented with times that are expected for that
process. If a user is logged into a system remotely, from a different time zone,
she will see times displayed in her local time zone, rather than in the time zone in
which the machine physically resides. Files that she creates will be stamped with
the correct time relative to files created locally on the machine. Thus, programs
such as make will continue to work properly. Finally, removing the conversion
from the kernel reduces the size and complexity of the kernel and allows the same
kernel binary to be run in any time zone without modification.
3.9 Describe the security implicat£ ons of not zero filling the stack region at
program startup.
If pages are not zero filled before being handed to a new process, then that process
can look at the previous content of the page. If the previous content was a file
butftr used by a privileged program to read a security-sensitive file, then the
content of that file would be unwittingly revealed to the unprivileged program.
other possible transgressions include acquiring a page from the login program
that contained the buffer into which the user typed his password. In addition to
the security implications, failing to zero fill a stack page would cause
nonrepeatable behavior in many programs because of their failure to initialize
variables to zero before using them.
3.10
Describe how the ¢¢#l"mechanism can be used to make programs
that require emulation appear as though they were normal
executables.
The program that is to be interpreted has a line appended to the front of the file
containing "#!"followed by the name of the interpreter to be used, When the
kernel finds that the first two characters of the file are#! it executes the
interpreter specified by the rest of the line passing in the name of the file to the
interpreter as its first argument, rather than trying to execute the file directly. For
example, the file




Thanks
Venkata Pilaka

Comments

Popular posts from this blog

termux vnc viewer setup