0% found this document useful (0 votes)
511 views11 pages

Module 2 - Computer System Structure

The document discusses the basic structure and startup process of a computer system. It describes the three main components of a computer system as the hardware, software, and liveware. The hardware includes physical parts like the CPU, memory, and input/output devices. The software is divided into system software and application software. The liveware refers to the computer users. It then explains the modern computer system structure and the roles of the central processing unit, input, output, storage, and communication devices. Finally, it covers the boot-up process, including the functions of the bootloader and the typical boot sequence followed by the BIOS to start the operating system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
511 views11 pages

Module 2 - Computer System Structure

The document discusses the basic structure and startup process of a computer system. It describes the three main components of a computer system as the hardware, software, and liveware. The hardware includes physical parts like the CPU, memory, and input/output devices. The software is divided into system software and application software. The liveware refers to the computer users. It then explains the modern computer system structure and the roles of the central processing unit, input, output, storage, and communication devices. Finally, it covers the boot-up process, including the functions of the bootloader and the typical boot sequence followed by the BIOS to start the operating system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Computer Communication Development Institute – Naga

College of Computer Studies

MODULE 2: COMPUTER SYSTEM STRUCTURE


Overview
This module will gives us an idea about the computer system structure before we proceed to the
details of computer system operation. We will discuss the basic functions of system startup, I/O,
and storage early in this module. We will also describe the basic computer architecture that makes
it possible to write a functional operating system.

Objectives
At the end of this module, the student can be able to:
• Discuss the basic functions of system startup.
• Distinguish potential threats to operating systems and the security features designed to
guard against them.
• Describe how computing resources are used by application software and managed by
system software.
• Discuss the advantages and disadvantages of using interrupt processing.
• Contras kernel and user mode in an operating system.

Lesson 1: The Computer System


What is a Computer System?
A computer system is composed of three (3) main components: the Hardware, the
Software, and the Liveware. These three will then work together to process, receive, manipulate,
display, and move data or information. The framework of this kind of system is ordinarily
incorporated by a PC, mouse, monitor, and other possible components.

These components can be coordinated and form a single device like laptops. Computer
Systems can work independently from anyone else it can also access devices that are associated
with other computer systems.

As stated above, there are three components:

1. The Hardware – These are the physical parts that play an integral role in computer
systems. It serves as the physical medium used by the clients to send, receive, and
store data. Basic examples are the motherboard, input and output devices (such as
keyboard, mouse), CPU, and storage devices.

Figure 2.2: Examples of hardware


2. The Software – Basically, these are just the programs and applications installed in
your computer. This component is divided into two, namely, the System Software and
the Application Software.

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 17


Computer Communication Development Institute – Naga
College of Computer Studies

• System Software – A software that provides platforms to other software. These


are low-level programs that runs in the background by the operating system at a
fundamental degree. Some examples are system servers, device drivers, and
utility software.
• Application Software – A software created or written to perform a variety of
specific tasks for the user. Some applications were already installed on the
computer, but still, the user can install other applications. Some examples are
Microsoft Office (Word, Excel, PowerPoint), Browsers (Google Chrome, Mozilla
Firefox), Media Player, Auto CAD, etc.

3. The Liveware – Also known as computer users. The user instructs the PC to execute
on guidelines. Basically, it9s just you using the computer.

Computer System Structure

Figure 2.3: The Modern Computer System Structure

The Modern Computer System Structure


A Computer System Structure consists of connected devices to a brain device that gives
entry to memory sharing. The modern general-purpose computer system is consists of one or
more CPU(s) and a number of device controllers connected through a common bus that provides
access to shared memory.

Figure 2.2 shows:

• That there is a specific device that is in charge of each device controller.


• One of the purposes of the memory controller is to guarantee efficient access to shared
memory by that, a memory controller is given whose capacity is to integrate memory
access.
• The CPU and the device controllers can execute concurrently, competing for memory
cycles.

There are five main hardware components that make up a computer system:

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 18


Computer Communication Development Institute – Naga
College of Computer Studies

1. Input Devices – used for entering data in the computer. Examples are:
a. Keyboard
b. Microphone
c. Gamepad Controllers
d. Scanner

2. Output Devices – any device that puts out the information or data to the user or to another
device. Examples are:
a. Monitor
b. Speakers
c. Headphones
d. Printer

3. Processing Devices – these are the core parts of the computer assigned to process data.
Examples are:
a. Central Processing Unit (CPU)
b. Graphics Processing Unit (GPU)

4. Storage Devices – devices that store the data in computer and has to subcategories:
a. Primary Storage Devices – smaller in size and have the fastest data speed. One
example is the Random Access Memory (RAM).
b. Secondary Storage Devices – bigger in size but has slow data speed. Some
examples are Hard Disk Drive, Optical Disk Drive, and USB Flash Disks/Drives.

5. Communication Devices – hardware devices that are assigned to transmit analog or


digital signals/messages, and it can be wireless or hardwired. Examples are:
a. Bluetooth devices
b. LAN Card
c. Modulator Demodulator (or Modem)
d. Router

The Central Processing Unit (CPU)


The CPU (sometimes called as the heart or the
brain of a computer) is the electronic circuitry within a
computer that executes instructions that make up a
computer program. It does everything what the
software, the hardware, and the user do. The CPU
performs basic arithmetic, logic, controlling, and
input/output (I/O) operations specified by the
instructions in the program. Here is a block diagram of
how a CPU works (see Figure 3).

Figure 2.4: A diagram of how a CPU works

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 19


Computer Communication Development Institute – Naga
College of Computer Studies

Lesson 2: The Computer Boot-Up


Introduction to Computer Boot-Up
When we start our computer, then there is an operation which is performed automatically by
the computer which is called booting. In booting, the system will check all the hardware and software
that are installed or attached in the system, and will also load the files that are needed for running a
system.

Basically, there are two types of booting:

1. Warm Booting – This is the process of restarting a computer that is already powered on.
2. Cold Booting – This is the process of turning on a computer after it had been powered
off completely.

The Bootloader
Relevant data in the system software has to be loaded into the main memory as soon as
the device is started, and stays there as long as the computer is running. This is made possible
by a so-called bootloader, which comes permanently integrated as a standard in most modern
OS.

A bootloader, also known as a boot program or bootstrap loader, is a special operating


system software that loads into the working memory of a computer after start-up. For this purpose,
immediately after a device starts, a bootloader is generally launched by a bootable medium like
a hard drive, a CD/DVD or a USB stick. The boot medium receives information from the
computer9s firmware (e.g. BIOS) about where the bootloader is. The whole process is also
described as <booting=.

The Boot Sequence


A boot sequence (also called as boot order) is the order in which a computer searched for
nonvolatile data storage devices containing program code to load the operating system (OS).
Typically, a Basic Input/Output System (BIOS) is used to start the boot sequence. Once the
instructions are found, the CPU takes control and loads the operating system into system
memory. The devices that are usually listed as boot order options in the BIOS settings are hard
disks, optical drives, flash drives, etc. The user is able to change the boot sequence through the
CMOS setup.

Prior to boot sequence is the power-on self-test (POST), which is the initial diagnostic test
performed by a computer when it is switched on. When POST is finished, the boot sequence
begins. If there are problems during POST, the user is alerted by beep codes, POST codes or
on-screen POST error messages.

Unless programmed otherwise, the BIOS looks for the OS on Drive A first, then looks for
the Drive C. It is possible to modify the boot sequence from BIOS settings. Different BIOS models
have different key combination and onscreen instructions to enter the BIOS and change the boot
sequence. Normally, after the POST, BIOS will try to boot using the first device assigned in the
BIOS boot order. If that device is not suitable for booting, then the BIOS will try to boot from the

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 20


Computer Communication Development Institute – Naga
College of Computer Studies

second device listed, and this process continues till the BIOS finds the boot code from the devices
listed.

If the boot device is not found, an error message is displayed and the system crashes or
freezes. Errors can be caused by an unavailable boot device, boot sector viruses or an inactive
boot partition.

Figure 2.5: Normal PC Boot-up Process

Lesson 3: Traps and Interrupts


Traps and Interrupts

Traps and Interrupts are events that breaks a normal sequence of orders or instructions
that is being process or executed by the CPU. In short, it is an interruption to the CPU‟s sequence
of events.

Traps or known as a fault or an exception, are synchronous interrupts that are sensed by
the CPU as an abnormal condition that means an error has happened. This will happen when
actions from programs causes the hardware devices to transfer command from the user mode.
Traps will usually switch the operating system to kernel mode, where the operating system will
not go back to its originating process until it performs various actions. Keep in mind that a trap in
a kernel mode is more fatal than a trap in a user mode. The errors can be in the form of:

Invalid memory access.


Division by zero.
Undefined code execution.
Non-existing peripheral devices access.
Breakpoint.
Restricted memory location access.

The transfer of command to the trap handler is like a call to a periodic procedure, except
that it results from some outstanding situation induced by the program and identified by the
hardware, not from an explicit procedure call in the application program.

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 21


Computer Communication Development Institute – Naga
College of Computer Studies

Interrupts are asynchronous which are generated or signals made by the hardware
(devices like graphics card, I/O ports, hard disk, etc.). It is in the form of request or a message
that an I/O is required. An example for this is when a key is pressed on the keyboard or when a
mouse is moved and clicked, this type of interrupts are hardware interrupts. On the other hand, a
program requiring disk input or output will generate a software interrupt.

Note: We can consider traps as <software interrupts=, and interrupts as <hardware interrupts=.

In traps and interrupts occurrence, the CPU responds by temporarily stopping the process
of a current program. It preserved and saves all the values that are related to the stopped program
such as registers, memory location of the last line of a code that was executed, etc. after saving,
the CPU transfers command to an interrupt service routine or an interrupt handler that will settle
with the appropriate action that is needed to be taken in return to the interrupt. The CPU will
resume the temporarily stopped or interrupted process after the interrupt service routine finishes
its task. The register values, etc. are restored with the use of the previously saved values that will
assure the program9s execution will continue from where it was left off.

A good analogy from this is when you will to pause the movie that you are watching
(process) to obey your mother and buy (process) outside. After you brought the thing that is
needed by your mother, you can resume the movie that you are watching. You can still be
interrupted by other means of events like an emergency phone call or an accident happen and
you had to pause it again to help.

When an interrupt is already being executed, other interrupts are disabled for the first
interrupt to be done. As the interrupt is completed its task, the interrupt mechanism is now enabled
again. This implementation scheme for the interrupt are made to avoid overlapping interrupts
when there is an ongoing interrupt.

Lesson 4: I/O Structure


Introduction to I/O Structure
The management of different devices that are connected to a computing device is a major
concern of operating-system developers. This is because I/O devices differs so widely in their
functionality and performance, and different techniques or ways are required for controlling them.
These methods build the I/O sub-system of the kernel of OS that splits the rest of the kernel from
the complexity of processing I/O devices.

Device Drivers
Device drivers are software components that can be augmented into an OS to handle a
specific device. Some of the common devices are keyboards, printers, scanners, digital cameras
and external storage devices. The operating system manages from device drivers to handle all
I/O devices. A device driver is the one responsible for managing the data between the peripheral
devices and it alters its local buffer storage. A device executes processes with the operating
system for a computer by transferring signals over cable or even in wireless. These devices

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 22


Computer Communication Development Institute – Naga
College of Computer Studies

communicate with computing device through a connection point which are called ports. Other
devices use a set of wires or cables, those connecting cables which are called bus. A bus is a
series of wires that is set as a pathway to manage transport of data and also a firmly defined
protocol which specifies a set of messages that can be sent on the wires. The following are the
tasks that a device driver performs:

• Manage requests from the device independent software by accepting the appropriate
tasks.
• Execute required error handling and interact to give and take I/O with the device controller.
• See to it that all processes are completed and the request is executed successfully.

I/O Operation

• To begin an I/O operation, the device driver starts by loading the registers within the device
controller.
• The device controller examines the files and processes the registers to determine the
appropriate tasks or action to execute.
• The controller begins to manage the transfer of data from the device to its local buffer.
• Once the transfer of data has been successfully completed, the device controller signals
the device driver via interrupt that has finished its task.
• Then the device driver returns control to the operating system.

There are also two (2) methods in I/O:

1. Synchronous I/O – CPU process waits while I/O proceeds.


2. Asynchronous I/O – I/O executes simultaneously with the processes of CPU.

Polling
The process of regularly checking status of the device to see if it is time for the next I/O
operation, is called polling. Also called as the polling operation, polling actively examines the
status of an external device by a client program as a synchronous activity. Polling is most
frequently utilized in terms of I/O and additionally referred as the polled I/O or software package
driven I/O. polled operation or polling is the simplest method for an I/O device to interact with the
processor. The I/O device simply puts the data in a status register, and the processor must come
and get the data. Most of the time, devices will not require attention and when one does, it will
have to wait until it is next interrogated by the polling program.

The distinction of polling to interrupt is that it9s not a hardware mechanism, whereas the
interrupt is a hardware mechanism, polling is a protocol in which the processor steadily checks
whether the device needs attention. Wherever device tells process unit that it desires hardware
processing, in polling method, process unit keeps asking the I/O device whether or not it desires
CPU processing. The CPU continuously check every and each device hooked up thereto for
sleuthing whether or not any device desires hardware attention.

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 23


Computer Communication Development Institute – Naga
College of Computer Studies

Lesson 5: Storage Structure


Introduction to Storage Structure

Computer storage contains a lot of different computer components and modules that are
used to store, alter, and edit data. Storage is a process through which digital or non-physical data
is managed and saved within a data storage device by the usage of computing technology. It is
a mechanism that gives access to a computer to retain data, either permanently or temporarily.

Storage is one of the primary and at the very least, an essential component of a computer
system because most of the processes that are being executed in a computer is using memory.
There are two natures of memory: the non-volatile type and volatile type.

Non-volatile memory is a type or computer memory that has the capability to hold saved
data even if the computer power is turned off. The data is permanent and is used commonly for
secondary storage or consistent storage. While volatile memory is a type of computer memory
that only manages and saves data while the device is currently used or turned on. These data
are only temporary and will be automatically removed when the device is turned off.

Memory is a fundamental component of the computer that is categorized into primary and
secondary memory.

Primary Storage

Primary storage, also as the main memory, is the area in a computer which stores data
and information for fast access.

Semiconductor chips are the principle technology used for primary memory. It9s a memory
which is used to store frequently used programs which can be directly accessed by the processing
unit for further processing. Some of the primary storage devices are the following:

• Random Access Memory (RAM) – also called as the read-write memory, this type of
primary storage is volatile type of memory because the data will be removed once the
power is turned off. RAM is the major device of primary memory as it is fast but is also
quite expensive.
• Read Only Memory (ROM) – this is a primary non-volatile type of memory. This memory
cannot be altered and can only be read when required or prompted. Since it is an
unchangeable memory, it used programs and processes inside of the device that are
frequently required like the system boot program.
• Cache Memory – it is used to store data and processes that are often required by the
CPU so it does not have to search and manage them in the main memory. This is a small
memory and fast memory, but more expensive than RAM.

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 24


Computer Communication Development Institute – Naga
College of Computer Studies

Secondary Storage

Secondary storage is another memory device for a computer that can hold, store and
manage data and information that can be permanently saved. These devices do not use power
and can store data permanently but the data from secondary storage needs to be brought into
the primary storage before the CPU can use it as the CPU usually cannot directly access the data
inside secondary storage devices. Some of the secondary devices are:

• Hard Disk Drives – commonly used as secondary storage devices. They are flat, round
pieces of metal covered with magnetic disk or platter that can rotate at fast speed. It is a
non-volatile storage device in which you can store data permanently. This is also a type
of magnetic disk device.
• Floppy Disks – Also known as floppies and diskettes. These secondary storage devices
were very common from mid-19709s to 19909s and were the most commonly used storage
devices at that time. It can store megabytes of data at most. Also a type of magnetic disk
device.
• Memory Cards – these are card-shaped and small storage devices. They can be easily
plugged in a certain device due to its size, and is commonly used in smaller gadgets like
phones and cameras. It is available in different storage sizes such as 8 megabytes to 32
gigabytes and higher, depending on the brand.
• Flash Drives – also called as pen drives, these are a type of portable storage device. It
is a compact and small memory storage device that can store permanent data that varies
from different sizes.
• CD-ROM – CD-ROMs or Compact Disks are a disk-like optical storage device that usually
has silver color. It can store data and usually have a storage capacity of MB to GB worth
of storage.

All of these storage devices are essential to a computer and have different speed,
availability, and performance that affect processes that is being executed in a computing device.
To understand further, we can look at the figure below:

Lesson 6: Hardware Protection


Hardware Protection and Types of Hardware Protection

Hardware structure refers to the identification of a system9s physical components and


their interrelationships. This description allows hardware designers to understand how their
components fit into a system architecture and provides to software components designers
important information needed for software development and integration. Clear definition of
hardware architecture allows the various traditional engineering disciplines (e.g. electrical and
mechanical engineering) to work more effectively together to develop and manufacture new
machines, devices and components.

Hardware protection is one of the major areas of concern in computer-system structures.

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 25


Computer Communication Development Institute – Naga
College of Computer Studies

From a very simple architecture, the computer has evolved into a highly dynamic, interactive, and
complex machine. Computers which were previously standalone have also been asked to
communicate with one another through networking. This added another level of intricacy in the
design and operation of the computer which has a profound effect on its security.

Dual-mode operation forms the basis of I/O protection, memory protection, and CPU
protection. In dual-mode operation, there are two separate modes: monitor mode (also called as
<system mode= or <kernel mode=) and user mode. In monitor mode, the CPU can use all
instructions and access all areas of memory. While in user mode, the CPU is restricted to
unprivileged instructions and a specified area of memory. User code should always be executed
in user mode and the OS design ensures that it is. When responding to system calls,
traps/exceptions, and interrupts, OS code is run. The CPU automatically switches to monitor
mode.

Basically, hardware protection is divided into three (3) categories: CPU protection,
Memory protection, and I/O protection, which are explained below:

1. CPU Protection – CPU protection prevents the user program getting stuck in an
infinite loop, and neve returning control to OS. CPU usage is protected by using the
timer device, the associated timer interrupts, and OS code called the scheduler. While
running in user mode, the CPU cannot change the timer value or turn off the timer
interrupt, because these required privileged operations. Before passing the CPU to a
user process, the scheduler ensures that the timer is initialized and interrupts are
enabled. When a timer interrupt occurs, the timer interrupt handler (OS code) can run
the scheduler (more OS code), which decides whether or not to remove the current
process from the CPU.
2. Memory Protection – Memory is protected by partitioning the memory into pieces.
While running in user mode, the CPU can only access some of these pieces. The
boundaries for these pieces are controlled by the base register and the limit register
(specifying bottom bound and number or locations, respectively). These registers can
only be set via privileged instructions.
3. I/O Protection – The I/O is protected by making all input/output instructions privileged.
While running in user mode, the CPU cannot execute them, thus, user code, which
runs in user mode, cannot execute them. User code requests I/O by making
appropriate system calls. After checking the request, the OS code, which is running in
monitor mode, can actually perform the I/O using the privileged instructions.

Reading Assignment
• https://www.tutorialspoint.com/Computer-System-
Architecture#:~:text=A%20computer%20system%20is%20basically,Logic%20Unit%2C
%20Control%20Unit%20etc
• http://www.cs.kent.edu/~farrell/osf03/lectures/ch2-2up.pdf
• https://www.studytonight.com/computer-architecture/architecture-of-computer-system

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 26


Computer Communication Development Institute – Naga
College of Computer Studies

• https://openbookproject.net/courses/intro2ict/hardware/booting.html#:~:text=Booting%20
is%20a%20startup%20sequence,computer%20has%20a%20boot%20sequence.
• https://study.com/academy/lesson/booting-a-computer-definition-process.html

References / Sources / Bibliography


• Nutt, G. (2009), Operating Systems: A Modern Perspective, 3rd Edition, Pearson Addison-
Wesley Inc, Boston , Massachusetts.

• Silberschatz, A., Galvin, P., and Gagne, G.(2018). <Operating 8System Concepts=, 10th
ed. John Wiley and <Sons Inc.

• Stallings, Wiliam. (2018). <Operating Systems: Internals and Design Principles= 9th ed.
Pearson Education Inc.

• Harris, J. Archer., <Schaum9s Outline of Theory and Problems of Operating Systems.


McGraw Hill Companies Inc., 2002

• https://ssmengg.edu.in/weos/weos/upload/EStudyMaterial/Cse/6th%20sem/Operating%
20system/operating%20system.pdf

• https://www.geeksforgeeks.org/types-computer-memory-ram-rom/

• https://www.tutorialspoint.com/operating_system/operating_system_tutorial.pdf

• https://www.youtube.com/watch?v=tn45bY-EA8Y

• http://iips.icci.edu.iq/images/exam/Abraham-Silberschatz-Operating-System-Concepts---
9th2012.12.pdf

• https://blog.codinghorror.com/understanding-user-and-kernel-mode/

• https://www.ionos.com/digitalguide/server/configuration/what-is-a-
bootloader/#:~:text=A%20bootloader%2C%20also%20known%20as,DVD%20or%20a%
20USB%20stick.

• https://www.techopedia.com/definition/3326/boot-
sequence#:~:text=Boot%20sequence%20is%20the%20order,to%20start%20the%20boo
t%20sequence.

• http://www2.cs.uregina.ca/~hamilton/courses/330/notes/introduction/introduction.html

2.0 COMPUTER SYSTEM STRUCTURE PAGE | 27

You might also like