Lec. 4 - Computer System Architecture
Lec. 4 - Computer System Architecture
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.
❖ Multiprocessors system
❖ Clustered system
❖ Multiprogramming system
[email protected] 2
❖ Time sharing (multitasking) system
[email protected] 1
6/25/2020
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
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
[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
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
[email protected] 6
6/25/2020
[email protected] 7
6/25/2020
[email protected] 8
6/25/2020
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>
[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