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

Lec. 4 - Computer System Architecture

This document summarizes a lecture on computer system architecture. It discusses single processor systems, multiprocessor systems including symmetric and asymmetric multiprocessing, and clustered systems. Multiprocessor systems have two or more CPUs that work together, sharing resources to increase throughput and reliability compared to single processor systems. Clustered systems couple two or more individual systems together to provide high availability.

Uploaded by

toris
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Lec. 4 - Computer System Architecture

This document summarizes a lecture on computer system architecture. It discusses single processor systems, multiprocessor systems including symmetric and asymmetric multiprocessing, and clustered systems. Multiprocessor systems have two or more CPUs that work together, sharing resources to increase throughput and reliability compared to single processor systems. Clustered systems couple two or more individual systems together to provide high availability.

Uploaded by

toris
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

6/25/2020

CIT 107: Operating Systems 1

Lecture 4. Computer System Architecture

Instructor: George Kinyata (BSc, MSc)


Email: [email protected]
Mobile: +255 68 9696 135

[email protected] 1

Introduction
❑ In the previous lecture we have covered the basics of computer
operating system i.e.
❖ basic structure of computer system

❖ storage structure

❖ I/O operations.

❑ In this lecture we focus on computer system architecture based on


the number of general purpose processor that a computer might
have.
❑ In doing so we are going to study how we can categorise computer
systems based on the number of general processors
❑ In doing soe we re going to cover the following types of computer
systems based on the following architectures.
❖ Single processor system

❖ Multiprocessors system

❖ Clustered system

❖ Multiprogramming system
[email protected] 2
❖ Time sharing (multitasking) system

[email protected] 1
6/25/2020

Single processor system


❑ These systems have a single processor (CPU) capable of executing
general purpose instruction set, including instructions from user
processes.
❑ However they also have other special purpose processors used for
performing device specific tasks for example disk, keyboard, printer,
graphics controller and other I/O devices.
❑ Take for example when you press a key on the computer keyboard,
the key stroke has to be converted to some kind of code (i.e. binary
code) so that the computer can understand what key you have
pressed.
❑ Thus in order to understand the keyboard strokes, the computer
has a special purpose microprocessor which is used in converting
the key stroke into the relevant binary code.
❑ However it is vital to note, that these special-purpose processors
run a limited instruction set and do not run user processes.
❑ Sometimes they are managed by the operating system, in that the
operating system sends them information about their next task and
3
monitors their status.

Multiprocessor Systems
❑ These systems have two or more general purpose processors in
close communication, sharing the computer bus and sometimes the
clock, memory, and peripheral devices.
❑ In doing so they work together in performing different tasks
❑ Multiprocessor systems are also known as parallel or tightly coupled
systems. Below are some of the advantages of multiprocessor
systems as compared to single processor systems
❖ Increased throughput, throughput is used for measuring the
performance of the system, multiprocessor system have increase
performance because they have more than on CPU used for task
execution.
❖ Economy of scale, they are more economic because the processors
share the computer resources while carrying out the tasks or a task can
be carried out by more than one CPU.
❖ Increased reliability, the system is more reliable because we have
more than one processor for task execution. Take for instance if we
have ten processors and one fails, then each of the remaining nine
processors can pick up a share of the work of the failed processor.
Thus, the entire system runs only 10 percent slower, rather than failing
4
altogether.

[email protected] 2
6/25/2020

Types of multiprocessor system


❑ There are two types of multiprocessor systems i.e.
symmetric multiprocessing and asymmetric multiprocessing
Then the operating system starts the device drivers.
❑ In symmetric multiprocessing all the CPU's are
involved in processing the available tasks, for example
tasks P1, P2, & P3.
❑ Likewise the CPU’s are similar in nature, thus all the CPU’s
participate in carrying out the various tasks.

Asymmetric multiprocessing
❑ In asymmetric multiprocessing we have a master slave approach,
where by one CPU acts as a master while other CPU’s are slaves.
❑ In doing so the master CPU, monitors slave CPU’s in task execution.
❑ Likewise the master CPU assigns processes to slave CPU’s.
❑ For example in the diagram below, slave 1, is assigned process P1;
slave 2 is assigned process 2, etc.
❑ It is vital to note that slave CPU’s
do not share processes, each slave
CPU has its own process
❑ Likewise in case of slave CPU
failure, the master CPU will decide
how to allocate the process to
other slave CPU
❑ This is unlike symmetric
multiprocessing where there is no
master slave approach because
each CPU participates in carrying
6
out task execution. [email protected]

[email protected] 3
6/25/2020

Clustered Systems
❑ This consists of two or more systems clustered (i.e. coupled or
grouped) together in order to perform a specific task.
❑ Just like multiprocessor systems, clustered systems have multiple
CPU’s used in processing.
❑ However they differ from multiprocessor systems, because they are
composed of two or more individual systems coupled together.
❑ These kind of system provide high availability, because the system
has more than one system, with each system having
multiprocessors.
❑ However it is vital to note that in clustered system, the CPU
structure can be symmetric or asymmetric.
❑ In symmetric mode all systems run the applications and they
monitor each other
❑ While asymmetric mode, one system is in hot stand by mode i.e.
acts master system by monitoring and allocating processes to other
slave computers.
[email protected] 7
❑ So which one is better??

Clustered Systems

❑ Like multiprocessor systems,


here we have multiple system
working together
❑ For example sharing storage via
a storage-area network
(SAN)

❑ Clustered systems, provides a high-availability service which


survives failures
❖ Asymmetric clustering has one machine in hot-standby

mode (master/slave relationship)


❖ Symmetric clustering has multiple nodes running
applications, monitoring each other
❑ Some clusters are for high-performance computing (HPC)
 Applications must be written to use parallelization
❑ Some have distributed lock manager (DLM) to avoid conflicting operations

[email protected] 4
6/25/2020

Multiprogramming
❑ A single user, program or I/O device cannot keep the CPU
busy at all times.
❑ Thus the operating system provides the environment within
which multiprogram can be executed.
❑ Thus multiprogramming refers to the ability of the CPU to
execute various jobs at the same time.
❑ In doing so multiprogramming increases CPU utilization by
organizing jobs so that the CPU always has a job to execute.
❖ Recall the concept of job (this was discussed in batch

OS)
❖ A Job is a task that needs to be executed, job contains
input data, program, plus control instructions.
❑ See diagram below for more details.
9

❑In the above example we have a job pool that consists 7 jobs that need to be processed
❑Shown is also the memory layout for multiprogramming system.
❑Given limited memory, OS cannot load all the jobs into memory, for this example we
have job 1 to job 4 loaded.
❑Thus at any point in time CPU will be busy executing a given job but when not executing
lets say Job 1, because job 1 is busy with I/O operations, then the CPU will execute
another job, lets say job 2
❑If the same thing is repeated with job 2, then CPU will execute job 3.
❑In doing so, CPU will never remain ideal and thus will be fully utilized all the time.10

[email protected] 5
6/25/2020

Multiprogramming

[email protected] 11

Multiprogramming
❑ Therefore without multiprogramming, jobs cannot be loaded into
memory layout, but most vital jobs cannot access CPU till a given
task is completed, thus leaving CPU idol when a job in execution
temporarily releasees CPU in order to access required operation.
❑ Therefore multiprogramming is vital for CPU utilization and
efficiency because;
◼ Single user cannot keep CPU and I/O devices busy at all times

◼ Multiprogramming organizes jobs so CPU always has job to


execute, because when CPU is idol, other job can access CPU.
◼ A subset of total jobs in system is loaded into memory

◼ One job selected and run via job scheduling

◼ When it has to wait (for I/O for example), OS switches to


another job
❑ However despite effective efficiency and utilization of computer
resources, multiprogramming does not provide user interactions
with the computer system. 12

[email protected] 6
6/25/2020

Time sharing systems


❑ Multitasking (also referred to as Time sharing) is a logical
extension of multiprogramming.
❑ In time-sharing systems, the CPU executes multiple jobs by
switching among them, this is almost the same as
multiprogramming…….
❑ But in time sharing the switching occur so frequently that the
users can interact with each program while it is running.
❑ So this is different from multiprogramming because in
multiprogramming the user has no interaction with the system.
❑ However, time sharing the user interacts (or hands-on) with
the computer system, which provides direct communication
between the user and the system.
❑ In doing so a time-shared operating system allows many users to
share the computer simultaneously.
❑ A time-shared operating system uses CPU scheduling and
multiprogramming to provide each user with a small portion of a
13
time-shared computer.

Time sharing system


❑ In this example we have various
users accessing the time sharing
system
❑ The switching between the jobs
of the user takes place very fast,
without the user noticing any
delays.
❑ thus the users do not even
realize that they are sharing the
system
❑ In doing so each user accessing
the time shared system thinks
that the entire system belongs to
them
❑ This is possible job execution takes place in CPU speed which is very fast but user
response take place in human speed which is very slow compared to CPU speed.
❑ Therefore there is a time gap between CPU speed (i.e. used for job execution) and user
speed (i.e. used for giving response to the computer)
❑ Given the time gap before user gives response to the time shared system, the CPU can
be used by another user to execute jobs.
❑ Thus given the time gap as result of CPU speed and user speed, this makes it possible
for multiple users to access the system and makes each user feel that the entire system
belongs to him/her, because the switching between jobs is very fast and simultaneous.
14

[email protected] 7
6/25/2020

User operating system interface


❑ Recall that one of the main services provided by the OS is to
provide user interface between the application programs and
the computer resources.
❑ There are two fundamental approaches for user to interface
with the operating system.
1. Command line interface (CLI) also referred to as command
interpreter, this interface allows the user to directly enter
commands that are to be performed by the OS i.e. the
command has to be entered into the CLI in order to
interact with the OS.
2. Graphical user interface (GUI), this allows the user to
interface with the OS via the use of icons and menu. In
this case the user can use the mouse and keyboard by
clicking on the icons, menu etc. in order to interact with
the OS. 15

More about command line interface


❑ Some OS include the command interpreter in OS kernel, note
that the kernel is the central part of the OS, responsible for all
the key functions of the OS.
❑ While other OS such as windows and UNIX treat the command
interpreter as a special program.
❑ Systems with multiple command interpreter to choose from are
called shells, for example we have; Bourne shell, C shell,
Bourne-Again shell (BASH), Korn shell, etc.
❑ So how does command interpreter preform the tasks that you
enter using the command.
❑ There are two ways in how the command interpreter executes
the task
❑ In first approach the code for performing a task is included in
the command interpreter and executed thus creating the
required file, for example code for creating a file, copying a file,
renaming a file, deleting a file, etc. 16

[email protected] 8
6/25/2020

More about command line interface


❑ In the second approach, the command interpreter does not
execute the codes but the codes are executed by calling upon
a specific programs
❑ In this case the command interpreter will simply call on the
required program based on the code/command that user has
entered.
❑ Lets say you enter the command for creating a file, in this case
the command interpreter will not execute the code for itself,
but will simply call upon the required program which is
responsible for executing the code, i.e. creating the file.
❑ In summary the first approach the code is executed by the CLI,
while in the second approach the code is executed by calling
upon the required program.
❑ Below are various examples of using command interpreter in
two different OS, i.e. Windows and Linux
17

Windows OS
1. Go to start menu and type in cmd, this will bring up the command
prompt for windows
❖ Now you will be in C:\users\kinyata>
2. In order to go to the desktop, type in cd desktop, i.e.
C:\users\kinyata> cd desktop (cd means change directorate)
❑ Now you are in desktop i.e. C:\users\kinyata\desktop>

3. In order to create the directorate, use mk dir command


❖ C:\users\kinyata\desktop>mk dir Michelle, this will create
Michelle folder on the desktop.
4. If you want to see the contents of the desktop, type in dir
❖ i.e. C:\users\kinyata\desktop>dir
5. If want to delete a file, use rmdir command followed by the name
of the file e.g.
❖ C:\users\kinyata\desktop>rmdir Michelle
❑ For more windows commands checkout this websites 18
❖ https://ss64.com/nt/
❖ https://www.thomas-krenn.com/en/wiki/Cmd_commands_under_Windows

[email protected] 9
6/25/2020

Linux OS
1. Open the terminal by clicking the following letter Ctrl +Alt + T
2. This will bring up the terminal command line interface for example
taking you to kinyata@flower$
3. Enter pwd command (i.e. pin working directorate), this will locate your
current directorate i.e. location within the computer i.e. /home/kinyata
4. In order to go to the desktop type in cd desktop command (cd means
change director) kinyata@flower~$cd desktop
5. You will now see that your current location is desktop, you can
confirm this by typing in pwd command i.e.
6. kinyata@flower~$cd desktop$pwd, now this will take you to
kinyata@flower~/desktop$
7. To create directorate (i.e. folder) use the mk dir command (this stands
for make directorate) kinyata@flower~/desktop$mk dir Michelle
8. Now the folder Michelle will be created, to prove that file has been
created use ls command (this stands for list)
kinyata@flower~/desktop$ls
19
9. Now to delete the file, use rm command (this stands for remove)
10. kinyata@flower~/desktop$rm-fr Michelle

[email protected] 10

You might also like