0% found this document useful (0 votes)
12 views

Attachment 1

The document lists homework problems from chapters 1 and 2 of an operating systems textbook. It includes problems about the functions of an operating system, multiprogramming, privileged instructions, design goals, kernel vs user mode, traps vs interrupts, system calls, block vs character special files, virtual machine downsides, process states and transitions, CPU utilization, thread usage in web browsers, thread yielding, advantages and disadvantages of user-level threads, and race conditions.

Uploaded by

mountwriters
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Attachment 1

The document lists homework problems from chapters 1 and 2 of an operating systems textbook. It includes problems about the functions of an operating system, multiprogramming, privileged instructions, design goals, kernel vs user mode, traps vs interrupts, system calls, block vs character special files, virtual machine downsides, process states and transitions, CPU utilization, thread usage in web browsers, thread yielding, advantages and disadvantages of user-level threads, and race conditions.

Uploaded by

mountwriters
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Do the following homework problems at the end of Chapter 1 (Introduction) in the textbook.

Chapter 1:1,2,8,10,11,18,20,27*,34*

1)-What are the two main functions of an operating system?


2)-What is multiprogramming?
8)-Instructions related to accessing I/O devices are typically privileged instructions, that is, they can
be executed in kernel mode but not in user mode. Give a reason these instructions are privileged.
10)-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.

11)-What is the difference between kernel and user mode? Explain how two distinct modes aids
having in designing an operating system.
.

18)- What is the key difference between a trap and an interrupt?


A trap instruction switches the execution mode of a CPU from the user mode to the kernel mode. This
instruction allows a user program to invoke functions in the operating system kernel.

20)- What is the purpose of a system call in an operating system?


27)-What is the essential difference between a block special file and a character special file?

34)_ Virtual machines have become very popular for a variety of reasons. Nevertheless, they have some
downsides. Name one.

Do the following homework problems at the end of Chapter 2 (Processes and Threads) in the textbook.
Chapter 2: 1,5,9,15,17,27,28*

1)- In Fig. 2-2, three process states are shown. In theory, with three states, there could be six
transitions, two out of each state. However, only four transitions are shown. Are there any
circumstances in which either or both missing transitions might occur?

5)- A computer system has enough room to hold four programs in its main memory. These programs are idle
waiting for I/O half the time. What fraction of the CPU time is wasted?

9)- Explain how a Web browser can utilize the concept of threads to improve performance.

15)- Why would a thread ever voluntarily give up the CPU by calling thread yield? After all, since
there is no periodic clock interrupt, it may never get the CPU back.

17)- What is the biggest advantage of implementing threads in user space? What is the biggest
disadvantage?

27)- What is a race condition?


28)- When a computer is being developed, it is usually first simulated by a program that runs one
instruction at a time. Even multiprocessors are simulated strictly sequentially like this. Is it possible
for a race condition to occur when there are no simultaneous events? Explain.

You might also like