Sie sind auf Seite 1von 2

Universität Stuttgart Winter Term 2010/2011

Institute of Parallel and Distributed Systems Boris Koldehofe


Distributed Systems Department Andreas Benzing

Operating Systems
Exercise Sheet 1
Uploaded: Friday, November 5, 2010
Due Date: Thursday, November 11, 2010, 10:00
Discussion: Friday, November 12 & 19, 2010, 11:30-13:00, Room 0.108

General remarks: The intent of the exercises is to help you get more familiar with fundamental
concepts of modern operating systems as presented in the lecture. Submission deadline for this sheet is
on Thursday, November 11, 10:00 am.
Work on the problems with your group and hand in a single solution which will be graded for all
members of the group. We will review your solution and return it to you in the group meeting. Everybody
has to present at least one question in the group meeting. If you hand in a solution but are not able to
present it, no points will be given for that question!
For additional reference, consult the text books cited in the lecture, and also explore the Web, where
you will find a plethora of information on operation systems and its related fields. You can find additional
information on lectures and exercises at the lecture homepage. If you have any questions, you may contact
us at faq-bs@ipvs.uni-stuttgart.de.

Questions
1. (5 points) Processor and Instruction Cycle
(a) In general terms, what are the four distinct actions that a machine instruction can specify?
(b) The MOS Technologies 6502 is an 8-bit microprocessor introduced in 1975 and it was a primary
player during the home computer revolution of the 1980s. Consider the instruction set of the
6502 microprocessor. From the available instructions, give three examples for each of the actions
in (a) as far as present in the 6502 instruction set. Also give the addressing mode used in your
example (e.g. absolute, implied, indirect). Give two examples for instructions that belong to
two different types of actions at the same time.
(c) The 6502 microprocessor does not have any instructions from one of the types of actions in
(a). However, in order for the 6502 to perform operations on I/O devices, some mechanism is
still required. Research how this is accomplished by the 6502, in contrast to using dedicated
I/O machine instructions. What role can the operating system play for applications that wish
to access I/O devices with respect to these alternatives of how to exchange data between the
processor and I/O devices on the instruction set level?
(d) Which registers are used by the processor to exchange data with main memory and I/O devices?
Explain briefly how these registers are used.
2. (5 points) Interrupts and DMA
(a) What is an interrupt and how are interrupts accommodated in the instruction cycle?
(b) Describe two approaches how multiple interrupts are dealt with.
(c) In virtually all systems that include DMA modules, DMA access to main memory is given higher
priority than processor access to main memory. Explain why!
(d) A DMA module is transferring characters to main memory from an external device transmitting
at 9600 bits per second (bps). The processor can fetch instructions at the rate of 1 million
instructions per second. By how much will the processor be slowed down due to the DMA
activity? Ignore data read/write operations and assume the processor only fetches instructions.
(e) During DMA, the bus is granted to the DMA module, which performs the transfer of data
between some I/O device and main memory. Assume that a cache between the CPU and main
memory is also present. What problems may possibly occur during a DMA transfer (in both
directions) in the presence of a cache? How can these problems be solved? You may research
the Web for information!
3. (2 points) Operating System Architecture
(a) Modern operating systems are one of the most complex pieces of software for computer systems.
Name two approaches for managing the complexity of operating systems.
(b) Operating systems can be classified according to having a microkernel or monolithic kernel
design. Further, some operating systems employ the technique of loadable kernel modules.
Associate the following operating systems with whether they use a microkernel or monolithic
kernel design, and whether they support loadable modules. Justify your answers.
- AmigaOS
- FreeBSD 6.2
- Linux 2.6
- Mach 3
- MINIX 3
- Sun Solaris 10
- Windows XP

4. (8 points) Processes and Threads


(a) Name the fields of the Process Control Block (PCB) and describe their purpose.
(b) Describe the roles of the six state process suspension model from the lecture. The states used
are: new, ready, running, exit, suspend, and blocked. What is the benefit of having states other
than running and blocked?
(c) What is the main optimization goal for a dispatcher? Which approaches do you know to achieve
this? What is the tradeoff?
(d) Briefly explain the difference between processes and threads. Why do most systems use a
combination of the two concepts?

Page 2

Das könnte Ihnen auch gefallen