You are on page 1of 5


1. Explain what is meant by the term “Operating Systems”? Give examples of them.
OS, an operating system is a powerful, and usually large, program that controls and
manages the hardware and other software on a computer and computer-like devices. Some
examples include versions of Microsoft Windows (like Windows 10, Windows 8, Windows
7, Windows Vista, and Windows XP), Apple's macOS, iOS, Chrome OS, BlackBerry Tablet OS, and
Linux OS.

2. Why is OS important to be studied? What do you expect to learn in this subject?

Operating systems are key components in many systems. It is important to gain a deep
understanding of systems. My expectation in this subject is to learn more about operating system
structure whhich are structures, processes, threads, and system calls.

Chapter 1
3. What is the difference between a multiprocessor and a multicore system? Explain them in
details and discuss the impact of the multicore/multiprocessor on the performance of the
computer system.
A multiprocessor system contains more than one such CPU, allowing them to work in
parallel. A Multi-core processor is a single computing component that has two or more independent
cores or processing units. The only similarities they have are their intentions of speeding up your
computing processes. A multicore uses a single CPU while a multiprocessor uses multiple CPU’s. That
being said, a multiprocessor system will cost more and will require a certain system that supports
multiprocessors. In regards to their speed, if both systems have the same clock speed, number of
CPU’s and cores and RAM, the multicore system will run more efficiently on a single program. This is
because the cores can execute multiple instructions at the same time, but not multiple programs.
This is because of its shared caches. This is where your multiprocessor comes in handy. With each
CPU having their own cache, they can execute programs simultaneously but will take longer than
your multicore.

4. Consider a hypothetical 32-bit microprocessor having 32-bit instructions composed of two

fields. The first two bytes contains the opcode and the reminder an immediate operand or an
operand address.
a. What is the maximum directly addressable memory capacity (in byte)?
2^(32-8) = 2^24 = 16,777,216 bytes = 16 MB

b. Discuss the impact on the system speed if the microprocessor bus has
i. A 32-bit local address bus and a 16-bit local data bus.
Instruction and data transfers would take three bus cycles each, one for the address and
two for the data. Since If the address bus is 32 bits, the whole address can be transferred to
memory at once and decoded there; however, since the data bus is only 16 bits, it will require 2
bus cycles (accesses to memory) to fetch the 32-bit instruction or operand

ii. A 16-bit local address bus and a 16-bit local data bus.
Instruction and data transfers would take four bus cycles each, two for the address and two for
the data. Therefore, that will have the processor perform two transmissions in order to send to
memory the whole 32-bit address; this will require more complex memory interface control to
latch the two halves of the address before it performs an access to it. In addition to this two-step
address issue, since the data bus is also 16 bits, the microprocessor will need 2 bus cycles to
fetch the 32-bit instruction or operand.

c. How many bits are needed for the program counter and the instruction register?
The program counter needs 24 bits addresses and for the instruction register needs 32
bits addresses.

5. Consider a hypothetical microprocessor generating a 16-bit address (e.g., assume that the
program counter and the address registers are 162 bits wide) and having a 16-bit data bus.
a. What is the maximum memory address space that the processor can access directly if it is
connected to a “16-bit memory”?
The maximum memory address space = 2^16 = 64 Kbytes

b. What is the maximum memory address space that the processor can access directly if it is
connected to an “8-bit memory”?
The maximum memory address space = 2^16 = 64 Kbytes.
Chapter 2
6. List and briefly define the OS design considerations for multiprocessor and multicore.

Multiprocessor OS Considerations:

1. Simultaneous concurrent processes or threads:

Kernel routines need to be reentrant to allow several processors to execute the same kernel code
simultaneously. With multiple processors executing the same or different parts of the kernel, kernel
tables and management structures must be managed properly to avoid data corruption or invalid

2. Scheduling:

Any processor may perform scheduling, which complicates the task of enforcing a scheduling policy
and assuring that corruption of the scheduler data structures is avoided. If kernel-level
multithreading is used, then the opportunity exists to schedule multiple threads from the same
process simultaneously on multiple processors.

3. Synchronization:

With multiple active processes having potential access to

shared address spaces or shared I/O resources, care must be taken to provide
effective synchronization. Synchronization is a facility that enforces mutual
exclusion and event ordering.

4. Memory management:

Memory management on a multiprocessor must deal with all of the issues found on uniprocessor
computers and is discussed in point three. In addition, the OS needs to exploit the available
hardware parallelism to achieve the best performance. The paging mechanisms on different
processors must be coordinated to enforce consistency when several processors share a page or
segment and to decide on page replacement. The reuse of physical pages is the biggest problem of
concern. That is, it must be guaranteed that a physical page can no longer be accessed with its old
contents before the page is put to a new use.

5. Reliability and fault tolerance:

The OS should provide graceful degradation in the face of processor failure. The scheduler and
other portions of the OS must recognize the loss of a processor and restructure management tables

Multicore OS Considerations:

1. Parallelism within applications:

Most applications can, in principle, be subdivided into multiple tasks that can execute in parallel,
with these tasks then being implemented as multiple processes, perhaps each with multiple threads.
The difficulty is that the developer must decide how to split up the application work into
independently executable tasks. That is, the developer must decide what pieces can or should be
executed asynchronously or in parallel. It is primarily the compiler and the programming language
features that support the parallel programming design process. But, the OS can support this design
process, at minimum, by efficiently allocating resources among parallel tasks as defined by the

2. Virtual machine approach:

An alternative approach is to recognize that with the ever-increasing number of cores on a chip, the
attempt to multi-program individual cores to support multiple applications may be a misplaced use
of resources. If instead, we allow one or more cores to be dedicated to a particular process and then
leave the processor alone to devote its efforts to that process, we avoid much of the overhead of
task switching and scheduling decisions. The multicore OS could then act as a hypervisor that makes
a high-level decision to allocate cores to applications but does little in the way of resource allocation
beyond that.

7. Suppose a computer has 500 Mbytes memory for user programs, three jobs are submitted at
the same time with the attributes listed below:
Job1 Job2 Job3
Type of job Heavy Heavy I/O Heavy I/O
Duration 14 min 30 min 25 min
Memory 180 M 290 M 170 M
Need disk No Yes No
Need printer No No Yes

Compute the Throughput per hour and per day and the Elapsed time if the jobs run under a
uniprogramming and under a multiprogramming system?

Elapsed time= 14 min + 30 min + 25 min
= 69 min
Throughput= 3 jobs/ hour

Elapsed time= (14 min + 30 min + 25 min)/2
= (69 min)/2
= 34 min 30 sec
Throughput= 6 jobs/ hour

8. In a batch operating system, three jobs J1, J2 and J3 are submitted for execution. Each job
involves an I/O activity, a CPU time, and another I/O activity. Job 1 requires a total time of 30
ms, with 5 ms CPU time. J2 requires a total time of 25 ms with 6 ms CPU time. J3 requires a total
time of 18 ms with 8 ms CPU time. What will be the CPU utilization for a uniprogramming and a
multiprogramming environment?

The total time required for completion of the jobs = 30 + 25 + 18 = 73 ms

Total execution time in CPU = 5 + 6 + 8 = 19 ms
CPU utilization = 19/73 = 0.2603 = 26.03%
In multi programming, when one job is waiting for I/O, another job may execute its I/O.
I/O time for first job, J1 = (Total time – processor time)/2 = (30 – 5)/2 = 12.5 ms
I/O time for second job, J2 = (Total time – processor time)/2 = (25 – 6)/2 = 9.5 ms
I/O time for third job, J3 = (Total time – processor time)/2 = (18 – 8)/2 = 5 ms

End of the Questions for Assignment 1