Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Introduction to

Operating System
Carmel Tejana

Let us start with our overview of this course:

1
Topics

• What is an Operating System?


• Functions of an OS?

Our lesson objectives are to know what an operating system is and its functions or
roles.

2
Control Unit Arithmetic and Logic Unit

Main Storage Unit

Data Flow
Control Flow
Input Unit Output Unit

Basic Block Diagram of a Computer System Hardware

The basic block diagram of the computer system hardware are as follows; input unit,
output unit, main storage/main memory, and the processor. The processor is
composed of the Control unit and the ALU. In the diagram, the gray arrows indicate
the flow of data while the black arrows indicate the flow of control signals. So, what
has the operating system got to do with these? Everything.
As the user inputs data, the data is stored in the main memory. The control unit
manages and controls the data going in and out of the CPU. Basically, the control unit
directs the operation of the CPU. Once instruction is executed, data is sent back to
the memory (that is, after the go signal from the control unit). Then, the data is sent
to an output device. So this how the system works….
But there are many events to be considered aside from this simple activity. Activities
like:
Saving data to the secondary storage area
Running many applications or programs at the same time
Applications and programs needing the same resource like printer or hard disk…..
A program is needed to manage all of these devices, from the point of data entry
(Input) to Output. Computer System operations before were quite simple since there
was no multitasking. At present, there are several aspects to be considered such as:
multitasking, multiprocessor systems, remote systems, and network systems.

3
Layout of a Computer System

Keyboard Monitor
Disk Disk
mouse printer

CPU Keyboard Video


Disk Controller USB Controller
Controller Controller

Memory Controller
System Bus

Memory

Let us now Identify the functions of the different parts in the layout of the computer
system. The oblong shaped objects represent the external devices. The other blocks
are the different resources such as the memory, memory controller, CPU, and device
controllers.
The first block from the bottom is the main memory.
Next is the memory controller. It is a circuitry that manages the flow going in and out
of the memory. This is sometimes called as MCU or Memory Control Unit.
Next is the system bus. The system bus is a circuitry that connects the CPU, memory
and IO devices. It basically connects the major components in the computer system.
(for a brief review on buses: It has three types namely: the address, data, and control.
The address bus transports address to where the data is to be sent. The data bus
transports the data while the control bus is used to communicate between devices.)
This is how the system bus works.
Then we have the CPU which is used to execute the instructions.
Lastly are the device controllers. The device controllers manage the data transfer
from a device through its corresponding device driver. In the layout, we have the disk
controller for the hard disk, keyboard controller for the keyboard, USB controller
(which enables us to connect various devices to the computer such as speakers,
mouse and printers). Then, the video controller used for our monitor connection.

4
These controllers use a common bus for communication. They also share the same
memory through the memory controller. The purpose of the memory controller is to
synchronize access from the hardware components to the memory.
So, how does the system work?: AT the time that we start up or boot up the
computer, the system runs the bootstrap program. A bootstrap program is a program
stored in ROM or Read Only Memory and it is the first program whose function is to
load the operating system into the memory to be executed. The OS executes the
“init” programs and waits for events to happen. Whenever there are events, the
system handles these through interrupts. There are hardware interrupts and software
interrupts.
When we say hardware interrupt, it is an interrupt issued by a hardware device which
could be from the keyboard or any device that is external to the processor. Example:
while copying a large file, we can simply press a key to cancel or to terminate the
process. That is hardware interrupt.
Software interrupts, on the other hand, are associated with an interrupt handler and
it sends a bit. This bit is used as a signal, either 1 or 0. It informs the operating
system of some events. For Example: upon saving a file , The user is prompted that
the file exceeds the maximum limit….
Now, we have mentioned Operating system. Form here, we know that it has a major
task once the computer is turned on. This is the time that the OS gets busy.

4
Storage Hierarchy
Small capacity, expensive, fast Registers

Cache

Main Memory

Electronic Disk

Magnetic Disk

Optical Disk

Large capacity, inexpensive, slow Magnetic Tapes

Now, lets go to the storage area. Storage devices are considered as resources.
As we refer to the layout in the previous slide, the main memory is the device that
the CPU communicates with. Since it is not possible to store data permanently here,
then we need a secondary storage device for this. When executed, these data are
loaded to the main memory.
In the pyramid structure, the registers, found at the highest level, are the most
expensive because they are part of the processor. It has small amount of storage but
can store address and data. They can also be part of an instruction.
Main memory, which is volatile, is internal to the system and it can store a large
amount of data, but not as large as secondary storage devices.
Other devices such as optical disk and magnetic disk are non-volatile and are external
devices. They are less expensive and has the largest storage capacity.
Again, when it comes to speed, the topmost level is the fastest. And since the lower
level storage devices are external to the processor, then they are pretty slower.

5
User User User

System and Application Software

Operating System

Hardware

Components of a Computer System

These are the components of a computer system: the hardware, software and users.
Based on this diagram, the OS is found between the User and the Hardware;
moreover, it also serves as the intermediary between the hardware and System and
Application Software. So that would mean that the OS program has something to do
between the hardware and application software.
If a user runs a compiler and watches a movie at the same time and uses an editor,
then the system would be needing to communicate with different resources. The
problem now, is how are these resources managed? What program manages these
resources? How would the system manage if more than two applications need to
save data to the hard disk? Take note, they are using the same memory. How would
the system know if the program is waiting for a user response? What device would
the user be feeding data into the system? How would the computer system know if a
process wants to use the hard disk for storing data?
These are only some of the tasks of the Operating System. The Operating System,
therefore, manages the whole functionality of the computer system. As the user
implements different types of application programs, the operating system manages
all of the system’s resources such that there won’t be any problems with regards to
the following:
data transfer to and from devices

6
processes of the different applications
use of hardware devices
To give a general view of the tasks of an OS, we have the following:
An os provides an environment where programs are executed
it Controls and coordinates the hardware devices used by the different application
programs.

let’s have different situations where we can identify the specific tasks of an OS.

6
Different Views of the Operating System

User’s View System’s View

Ease of use Resource Allocation

Performance Controls Resources and Devices

Ease in the Use of Executes user programs


resources

Let us try to see how a user and the system see the Operating system.
Ease of Use: For example: When a user plays games using his device, he just wants to
win (of course), he wants to be connected to the network, and be able to store files
and immediately interact with the other players. A user also wants to see his files
easily. Be able to copy, search and manage his files and folders conveniently. Be able
to run different programs easily. These are for the users’ point of view.
Given the different scenarios earlier, how does the system see all of these?
System’s View on Resource Allocation: For the system, it has to take into account
that if a user opens several applications and needs various resources, then he should
be able to get all of these without any problems like slow access or computer
freezing.
Performance: Every User wants to have fast computer performance. Performance
depends upon the kind of device being used but it also depends on how his operating
system manages the hardware. Hardware device and the OS should be compatible.
For the System’s View on Controlling Resources and Devices: The operating
system is concerned oh how to manage the resources such that they can be used
“simultaneously” by different applications without any problems.
For the user’s view on Resources: What users want is to be able to use whatever
hardware devices they need in their application. For example: use of gaming devices

7
(gamepads) or be able to easily connect their gadgets to their laptops/PCs. But they
do not have any idea how the computer system manages these tasks.
For the System’s View: The computer system sees to it that whatever application the
user would run, it will be executed. And that whatever device the user connects to it,
the device would work without any hitches.
In general: the operating system tries to make computer operation efficient.

7
Problem Solutions
The Code to manipulate external I/O devices is Build a subroutine library (device drivers) to
very complex, and is a major source of manage the interaction with the I/O devices.
programming difficulty.

At any given time, a process is actively using Allow the job to overlap computation and I/O.
either the CPU or an I/O device, and the rest of
the machine is idle and therefore unutilized.

When a user logs in and gets terrible response Prioritized scheduling.


time because the machine is overloaded.

In most cases (in software development or in our d .ily lives), whenever there are
problems, that would give us the venue for improvement or for innovations. Let us
refer to the different problems and the solutions pertaining to the enhancement in
the design of the Operating System.
Code to manipulate: Different software and applications use hardware devices (hard
disk for storage or keyboard for data entry). It would be quite inconvenient if
accessing of these devices will be part of software development.
A solution to this is the use of libraries. Every time an application needs to use
hardware devices, it simply calls on the libraries. That makes it more efficient. Such
that each application does not need to have its own implementation in using various
computer resources.
Present programs are not concerned with how to store data to secondary storage
devices and the like. Instead, they simply focus on the events/actions that users make
while using their applications.
For the second problem, At any given time, a process is actively using either the CPU
or an I/O device, and the rest of the machine is idle and therefore unutilized.
Example: If program waits for the user to input data, as much as possible, the cpu
must be able to do something else. Rather than, all processes wait for the user’s
action.

8
Solution: An idle process can release its resources to be used by other programs even
if it is not completed….
Then the third problem: When a user logs in and gets terrible response time
because the machine is overloaded. This could probable be because of some
processes that are still waiting to finish its execution and other processes are waiting
for its turn.
Solution: The system needs to have a priority scheduling or to have a schedule for
executing processes.

8
Roles of an OS
• “User friendliness”
• Efficient use of resources
• Consecutive Job processing
• Multiple Programming
• Reduction of the Response Time
• Improvement of reliability
• Extensibility

We have seen some of the user and system's view as well as the user problems and
system solutions , we can summarize the different roles of an Operating system. User
friendliness means that the computer operation could easily be used by different
types of users and shall give them good user experience.
Efficient use of resources: This is when any user can easily have access to the
different resources in the computer system.
Consecutive Job processing: this also pertains to the way jobs /processes are
scheduled for execution.
Multiple Programming makes it possible for several tasks or processes to be
executed at the same time.
Reduction of the Response Time and improvement of reliability– User needs fast
access and efficient performance.
Extensibility – the operating system must be designed to allow users to add
functionalities with ease

9
End of presentation

so this ends our introduction and maybe you are wondering Why are we looking back
at the hardware devices? It is because we need to have a thorough understanding
how data or instructions pass through from the point of data entry from our
computer systems to the output. This is what the operating system is about.

10

You might also like