| Current Path : /var/www/html/bibhas.ghoshal/lecture_slides/lect1/ |
| Current File : /var/www/html/bibhas.ghoshal/lecture_slides/lect1/hw_lect1.tex |
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{color}
%opening
\title{Home work - Set1}
%\author{}
\begin{document}
\maketitle
\textbf{There are two sections in this problem set.} \\
\textcolor{red}{Section 1 is for IOPC 332C} while \textcolor{green}{Section 2 for IOSY 332C}
\section{\underline{ Section1 : IOPS 332C }}
\begin{enumerate}
\item In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various
security problems.
\begin{enumerate}
\item What are two such problems?
\item Can we ensure the same degree of security in a time-shared machine as in a dedicated machine? Explain your answer.
\end{enumerate}
% Answer:
% a. Stealing or copying one’s programs or data; using system resources
% (CPU, memory, disk space, peripherals) without proper
% accounting.
% b. Probably not, since any protection scheme devised by humans
% can inevitably be broken by a human, and the more complex
% the scheme, the more difficult it is to feel confident of its correct
% implementation.
\item What is the main difficulty that a programmer overcomes in writing an operating system for real tme environment?
\item Which of the following instructions should be priviledged?
\begin{enumerate}
\item Set value of timer
\item Read the clock
\item Clear memory
\item Issue a trap instruction
\item Access I/O device
\end{enumerate}
\item What is the purpose of interrupts? What are the differences between a trap and an interrupt? 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.
\end{enumerate}
\newpage
\section{\underline{ Section2 : IOSY 332C }}
\begin{enumerate}
\item What are the main functions of Operating System?
\item What is multi-programming?
\item Which of the following instructions should be allowed only in kernel mode?
\begin{enumerate}
\item Disable all interrupts
\item Read the time of day-clock
\item Set the time of day-clock
\item Change the memory map
\item Switch user from user to kernel mode
\end{enumerate}
\item Direct memory access is used for high-speed I/O devices in order to avoid increasing the CPU execution load.
\begin{enumerate}
\item How does the CPU interface with the device to coordinate the transfer?
\item How does the CPU know when the memory operations are complete?
\item The CPU is allowed to execute other programs while the DMA controller is transferring data. Does this process interfere with
the execution of the user programs? If so, describe what forms of interference are caused.
\end{enumerate}
% Answer: The CPU can initiate a DMA operation by writing values
% into special registers that can be independently accessed by the device.
% The device initiates the corresponding operation once it receives a command
% from the CPU. When the device is finished with its operation, it
% interrupts the CPU to indicate the completion of the operation.
% Both the device and the CPU can be accessing memory simultaneously.
% The memory controller provides access to the memory bus in a fair
% manner to these two entities. A CPU might therefore be unable to issue
% memory operations at peak speeds since it has to compete with the
% device in order to obtain access to the memory bus.
\end{enumerate}
\newpage
\end{document}