CECS 326 Assignment 1 - Introduction to Operating Systems
20 points
Assignment Description. Answer the following questions from the Chapter 1 reading from your text-
book. Be through and complete with your answers. You may work on these questions with a partner (no
more than two working together), but both students must submit the document individually on Beachboard
Dropbox along with both students’ names on each submission.
1. What are the two main functions of an operating system? An operating system must provide the users
with an extended machine, and it must manage the I/O devices and other system resources. To some
extent, these are different functions.
2. What is the difference between timesharing and multiprogramming systems? In a timesharing system,
multiple users can access and perform computations on a computing system simultaneously using their
own terminals. Multiprogramming systems allow a user to run multiple programs simultaneously.
All timesharing systems are multiprogramming systems but not all multiprogram- ming systems are
timesharing systems since a multiprogramming system may run on a PC with only one user.
3. The family-of-computers idea was introduced in the 1960s with the IBM System/360 mainframes. Is
this idea now dead as a doornail or does it live on? It is still alive. For example, Intel makes Core i3,
i5, and i7 CPUs with a variety of different properties including speed and power consumption. All of
these machines are architecturally compatible. They differ only in price and performance, which is the
essence of the family idea.
4. What is the difference between kernel and user mode? Explain how having two distinct modes aids in
designing an operating system. Most modern CPUs provide two modes of execution: kernel mode and
user mode. The CPU can execute every instruction in its instruction set and use every feature of the
hardware when executing in kernel mode. However, it can execute only a subset of instructions and
use only subset of features when executing in the user mode. Having two modes allows designers to
run user programs in user mode and thus deny them access to critical instructions.
5. On early computers, every byte of data read or written was handled by the CPU (i.e., there was no
DMA). What implications does this have for multiprogramming? The prime reason for multiprogram-
ming is to give the CPU something to do while waiting for I/O to complete. If there is no DMA, the
CPU is fully occupied doing I/O, so there is nothing to be gained (at least in terms of CPU utilization)
by multiprogramming. No matter how much I/O a program does, the CPU will be 100% busy. This
of course assumes the major delay is the wait while data are copied. A CPU could do other work if
the I/O were slow for other reasons (arriving on a serial line, for instance).
6. There are several design goals in building an operating system, for example, resource utilization,
timeliness, robustness, and so on. Give an example of two design goals that may contradict one another.
Consider fairness and real time. Fairness requires that each process be allo- cated its resources in a
fair way, with no process getting more than its fair share. On the other hand, real time requires that
resources be allocated based on the times when different processes must complete their execution. A
real-time process may get a disproportionate share of the resources.
7. Which of the following instructions should be allowed only in kernel mode?
(a) Disable all interrupts.
1
20 points
Assignment Description. Answer the following questions from the Chapter 1 reading from your text-
book. Be through and complete with your answers. You may work on these questions with a partner (no
more than two working together), but both students must submit the document individually on Beachboard
Dropbox along with both students’ names on each submission.
1. What are the two main functions of an operating system? An operating system must provide the users
with an extended machine, and it must manage the I/O devices and other system resources. To some
extent, these are different functions.
2. What is the difference between timesharing and multiprogramming systems? In a timesharing system,
multiple users can access and perform computations on a computing system simultaneously using their
own terminals. Multiprogramming systems allow a user to run multiple programs simultaneously.
All timesharing systems are multiprogramming systems but not all multiprogram- ming systems are
timesharing systems since a multiprogramming system may run on a PC with only one user.
3. The family-of-computers idea was introduced in the 1960s with the IBM System/360 mainframes. Is
this idea now dead as a doornail or does it live on? It is still alive. For example, Intel makes Core i3,
i5, and i7 CPUs with a variety of different properties including speed and power consumption. All of
these machines are architecturally compatible. They differ only in price and performance, which is the
essence of the family idea.
4. What is the difference between kernel and user mode? Explain how having two distinct modes aids in
designing an operating system. Most modern CPUs provide two modes of execution: kernel mode and
user mode. The CPU can execute every instruction in its instruction set and use every feature of the
hardware when executing in kernel mode. However, it can execute only a subset of instructions and
use only subset of features when executing in the user mode. Having two modes allows designers to
run user programs in user mode and thus deny them access to critical instructions.
5. On early computers, every byte of data read or written was handled by the CPU (i.e., there was no
DMA). What implications does this have for multiprogramming? The prime reason for multiprogram-
ming is to give the CPU something to do while waiting for I/O to complete. If there is no DMA, the
CPU is fully occupied doing I/O, so there is nothing to be gained (at least in terms of CPU utilization)
by multiprogramming. No matter how much I/O a program does, the CPU will be 100% busy. This
of course assumes the major delay is the wait while data are copied. A CPU could do other work if
the I/O were slow for other reasons (arriving on a serial line, for instance).
6. There are several design goals in building an operating system, for example, resource utilization,
timeliness, robustness, and so on. Give an example of two design goals that may contradict one another.
Consider fairness and real time. Fairness requires that each process be allo- cated its resources in a
fair way, with no process getting more than its fair share. On the other hand, real time requires that
resources be allocated based on the times when different processes must complete their execution. A
real-time process may get a disproportionate share of the resources.
7. Which of the following instructions should be allowed only in kernel mode?
(a) Disable all interrupts.
1