COS3721 EXAM STUDY SET WITH COMPLETE
SOLUTIONS 100% VERIFIED NEW!!
-COS3721
-COS 3721 - Concepts and Terms
COS3721
Some early computers provided operating-system protection by placing the operating
system in a memory partition that could neither be read nor written by either the user
job or the operating system itself. Describe two problems you think could arise with
such a scheme. - ANSWER a) If the memory is not writable by the operating system,
then some vital and crucial information required by the operating system, such as
protection and/or security data, password and access control information, would have
to be moved or kept in non-protected memory locations and therefore accessible to
unauthorized users.
b) The operating system could never be updated or patched, since it is not modifiable or
accessible by the user or the operating system itself.
Distinguish between the client-server and peer-to-peer models of Distributed systems. -
ANSWER The fundamental advantages of Peer-to-Peer model (as opposed with the
centralized model) are rooted in the fact that each participating computer in the model
may both be the client and server.
In a Peer-to-peer model, services are distributed across a collection of peers, rather
than having a single, centralized server. Peer-to-peer provides fault tolerance and
redundancy. Also, because peers constantly migrate, they can provide a level of
security over a server that always exists at a known location on the Internet. Another
possible advantage of peer-to-peer systems is that they can also provide higher network
bandwidth because you can collectively use all the bandwidth of peers, rather than the
single bandwidth that is available to a single server.
In a multiprogramming and time-sharing environment, several users share the system
simultaneously. This situation may result in various security problems.
What are two such problems? - ANSWER Stealing or copying one's programs or data;
,using system resources (CPU, memory, disk space, peripherals) without proper
accounting.
Can we provide the same security for a time-shared machine that we can for a
dedicated one? Why or why not? - SOLUTION Probably not, since a human, and the
more complex can inevitably break any protection scheme devised by humans the
scheme, the more difficult it is to feel confident of its correct implementation.
What is the purpose of interrupts? How does an interrupt differ from a trap? Can traps
be generated intentionally by a user program? If so, for what purpose? - ANSWER An
interrupt is a hardware-generated change of flow within the system. An interrupt
handler is summoned to deal with the cause of the interrupt; control is then returned to
the interrupted context and instruction.
A trap is a software-generated interrupt. An interrupt can be used to signal the
completion of an I/O to obviate the need for device polling. A trap can be used to call
operating system routines or to catch arithmetic errors.
Describe some of the challenges of designing operating systems for mobile devices
compared with designing operating systems for traditional PCs. - ANSWER The
greatest challenges in designing mobile operating systems include:
Smaller storage capacity requires that the operating system manage memory
carefully.
The operating system must also manage power consumption carefully.
Reduced processing power plus fewer processors mean the operating system must
carefully apportion processors to applications.
Identify several advantages and several disadvantages of open-source operating
systems. Include the types of people who would find each aspect to be an advantage or
a disadvantage. - ANSWER Open source operating systems have the advantages of
having many people working on them, many people debugging them, ease of access and
distribution, and rapid update cycles. Also for students and programmers, surely there
is some advantage of source code that is viewable as well as editable. The major benefit
usually brought about by the existence of free of cost OSs usually provides that users
simply pay to cover costs. As would be expected, commercial operating system
businesses usually do not take too well the competition that open source
operating systems offer since these characteristics are pretty tough to compete with.
, Some open source operating systems do not offer paid support programs. Some
companies avoid open source projects because they need paid support, so that they
have some entity to hold accountable if there is a problem or they need help fixing an
issue. Finally, some complain that a lack of discipline in the coding of open source
operating systems means that backward compatibility is lacking making upgrade
Which of the following are shared between threads in one multithreaded process?
Explain where possible. - ANSWER (a) Register values
(b) Heap memory
(c) Global variables
(d) A stack in memory
Explain why interrupts are not appropriate for implementing synchronization primitives
in multiprocessor systems - ANSWER Interrupts are not sufficient in multiprocessor
systems since disabling interrupts only prevents other processes from executing on the
processor in which interrupts were disabled; there are no limitations on what processes
could be executing on other processors and therefore the process disabling interrupts
cannot guarantee mutually exclusive access to program state.
The Linux kernel has a policy that a process cannot hold a spinlock while attempting to
acquire a semaphore. Explain why this policy is in place. - ANSWER Because acquiring
a semaphore may put the process to sleep while it is waiting for the semaphore to
become available. Spinlocks are to only be held for short durations and a process that is
sleeping may hold the spinlock for too long a period.
Explain two kernel data structures where race conditions may occur.
Be sure to include a description of how a race condition could occur. - ANSWER There
are many answers to this question. Some kernel data structures include a process id
(pid) management system, kernel process table, and scheduling queues. With a pid
management system, it is possible two processes may be created at the same time and
there is a race condition assigning each process a unique pid. The same type of race
condition can occur in the kernel process table: two processes are created at the same
time and there is a race assigning them a location in the kernel process table. With
SOLUTIONS 100% VERIFIED NEW!!
-COS3721
-COS 3721 - Concepts and Terms
COS3721
Some early computers provided operating-system protection by placing the operating
system in a memory partition that could neither be read nor written by either the user
job or the operating system itself. Describe two problems you think could arise with
such a scheme. - ANSWER a) If the memory is not writable by the operating system,
then some vital and crucial information required by the operating system, such as
protection and/or security data, password and access control information, would have
to be moved or kept in non-protected memory locations and therefore accessible to
unauthorized users.
b) The operating system could never be updated or patched, since it is not modifiable or
accessible by the user or the operating system itself.
Distinguish between the client-server and peer-to-peer models of Distributed systems. -
ANSWER The fundamental advantages of Peer-to-Peer model (as opposed with the
centralized model) are rooted in the fact that each participating computer in the model
may both be the client and server.
In a Peer-to-peer model, services are distributed across a collection of peers, rather
than having a single, centralized server. Peer-to-peer provides fault tolerance and
redundancy. Also, because peers constantly migrate, they can provide a level of
security over a server that always exists at a known location on the Internet. Another
possible advantage of peer-to-peer systems is that they can also provide higher network
bandwidth because you can collectively use all the bandwidth of peers, rather than the
single bandwidth that is available to a single server.
In a multiprogramming and time-sharing environment, several users share the system
simultaneously. This situation may result in various security problems.
What are two such problems? - ANSWER Stealing or copying one's programs or data;
,using system resources (CPU, memory, disk space, peripherals) without proper
accounting.
Can we provide the same security for a time-shared machine that we can for a
dedicated one? Why or why not? - SOLUTION Probably not, since a human, and the
more complex can inevitably break any protection scheme devised by humans the
scheme, the more difficult it is to feel confident of its correct implementation.
What is the purpose of interrupts? How does an interrupt differ from a trap? Can traps
be generated intentionally by a user program? If so, for what purpose? - ANSWER An
interrupt is a hardware-generated change of flow within the system. An interrupt
handler is summoned to deal with the cause of the interrupt; control is then returned to
the interrupted context and instruction.
A trap is a software-generated interrupt. An interrupt can be used to signal the
completion of an I/O to obviate the need for device polling. A trap can be used to call
operating system routines or to catch arithmetic errors.
Describe some of the challenges of designing operating systems for mobile devices
compared with designing operating systems for traditional PCs. - ANSWER The
greatest challenges in designing mobile operating systems include:
Smaller storage capacity requires that the operating system manage memory
carefully.
The operating system must also manage power consumption carefully.
Reduced processing power plus fewer processors mean the operating system must
carefully apportion processors to applications.
Identify several advantages and several disadvantages of open-source operating
systems. Include the types of people who would find each aspect to be an advantage or
a disadvantage. - ANSWER Open source operating systems have the advantages of
having many people working on them, many people debugging them, ease of access and
distribution, and rapid update cycles. Also for students and programmers, surely there
is some advantage of source code that is viewable as well as editable. The major benefit
usually brought about by the existence of free of cost OSs usually provides that users
simply pay to cover costs. As would be expected, commercial operating system
businesses usually do not take too well the competition that open source
operating systems offer since these characteristics are pretty tough to compete with.
, Some open source operating systems do not offer paid support programs. Some
companies avoid open source projects because they need paid support, so that they
have some entity to hold accountable if there is a problem or they need help fixing an
issue. Finally, some complain that a lack of discipline in the coding of open source
operating systems means that backward compatibility is lacking making upgrade
Which of the following are shared between threads in one multithreaded process?
Explain where possible. - ANSWER (a) Register values
(b) Heap memory
(c) Global variables
(d) A stack in memory
Explain why interrupts are not appropriate for implementing synchronization primitives
in multiprocessor systems - ANSWER Interrupts are not sufficient in multiprocessor
systems since disabling interrupts only prevents other processes from executing on the
processor in which interrupts were disabled; there are no limitations on what processes
could be executing on other processors and therefore the process disabling interrupts
cannot guarantee mutually exclusive access to program state.
The Linux kernel has a policy that a process cannot hold a spinlock while attempting to
acquire a semaphore. Explain why this policy is in place. - ANSWER Because acquiring
a semaphore may put the process to sleep while it is waiting for the semaphore to
become available. Spinlocks are to only be held for short durations and a process that is
sleeping may hold the spinlock for too long a period.
Explain two kernel data structures where race conditions may occur.
Be sure to include a description of how a race condition could occur. - ANSWER There
are many answers to this question. Some kernel data structures include a process id
(pid) management system, kernel process table, and scheduling queues. With a pid
management system, it is possible two processes may be created at the same time and
there is a race condition assigning each process a unique pid. The same type of race
condition can occur in the kernel process table: two processes are created at the same
time and there is a race assigning them a location in the kernel process table. With