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

Cavite State University: Preliminaries

The document provides an overview of operating systems including their history, functions, types and components. It discusses how Charles Babbage and Ada Lovelace contributed to early computer development. Generations of computers are defined from vacuum tubes to modern systems. Key functions of an operating system are managing resources and presenting an abstract machine to users. Main types include mainframe, server, multiprocessor and personal computer OS. System components are process management, memory management and others.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Cavite State University: Preliminaries

The document provides an overview of operating systems including their history, functions, types and components. It discusses how Charles Babbage and Ada Lovelace contributed to early computer development. Generations of computers are defined from vacuum tubes to modern systems. Key functions of an operating system are managing resources and presenting an abstract machine to users. Main types include mainframe, server, multiprocessor and personal computer OS. System components are process management, memory management and others.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Republic of the

Philippines
CAVITE STATE UNIVERSITY
Bacoor City Campus
SHIV, Molino VI, City of Bacoor
 (046) 476-5029

Department of Computer Studies


DCIT 55/COSC 80 – Operating System
PRELIMINARIES

Learning Area Operating System


Quarter No: 1 Week No: 2 Duration 1 hour
Module Number 2
Topic/s II. Introduction of Operating System
Module 2: What is an Operating System?
Lesson 1: Historical Evolution
Lesson 2: Functions of an OS
Lesson 3: Types of OS
Lesson 4: Components of an OS
Resource/s: Textbook: Tanenbaum, Andrew S. (2015). “Modern Operating System” 4th Edition,
Pearson Education Inc., Upper Saddle
River, New Jersey

Silberschatz, Abraham, Galvin, Peter and Gagne, Greg


(2012). “Operating System Concepts(Essentials)”, 9th
Edition, John Wiley and Sons Inc. USA

Albano, Gisela May and Pestrana, Angelito (2009).


“Fundamentals of Operating System”, A & C Printers, A N
Domingo St. San Juan City, Philippines
Online Internet-based References Internet-based Video
Resources Content
Subject Teacher: Ms. Donnalyn B. Montallana, MIT

Checked by: Ms. Donnalyn B. Montallana, MIT

COMPETENCIES AND CORE VALUES


At the end of this module, the learners should be able to:

1. Explain the history and type of operating system. And be able to compute a given problem
in processor management.
2. Analyze the disk management and memory management algorithm facilitate computer
operation and able to compute for a given problem.
3. Analyze the virtual management, deadlocks and file management and how it affects the
computer system.

1
To enable students to broaden their knowledge about operating systems.

Students are expected to live by and stand for the following University tenets:

TRUTH is demonstrated by the student’s objectivity and honesty during examinations, class activities and
in the development of projects.

EXCELLENCE is exhibited by the students’ self-confidence, punctuality, diligence and commitment in the
assigned tasks, class performance and other course requirements.

SERVICE is manifested by the students’ respect, rapport, fairness and cooperation in dealing with their
peers and members of the community.
In addition, they should exhibit love and respect for nature and support for the cause of

humanity.INTRODUCTION

REVIEW

2
CONTENT
Operating System
⮚ The software responsible for controlling the allocation and usage of hardware resources such
as memory, central processing unit (CPU) time, disk space and peripheral devices. ⮚ The
foundation on which applications such as word processing and spread sheet programs, are built.
⮚ The interface between the hardware and the user

HISTORY OF OPERATING SYSTEMS


Highlights:
Charles Babbage (1792-1871)
∙ Father of Modern Computer
∙ An English Mathematician who designed the first true digital computer.
∙ Invented the Difference and Analytical Engine
Augusta Ada Lovelace Byron
∙ Daughter of the famed British poet Lord Byron that developed software for the analytical
engine.
∙ Known as the world’s first programmer.

GENERATION OF COMPUTERS
1. FIRST GENERATION (1945-1955) – VACUUM TUBES AND PLUGBOARDS
1940 – Calculating Engine was developed.
Early 1950s – Punched card was introduced.
Mode of Operation (tedious)

The programmer sign up for a block of time on the signup sheet on the wall, then come down
to the machine room, insert his or her plug board into the computer, and spend the next few hours
hoping that none of the 20,000 or so vacuum tubes would burn out during the run.

2. SECOND GENERATION (1955-1965) – TRANSISTORS AND BATCH SYSTEMS


Mid 1950s – Transistors was introduced.
Mainframes – machines that are locked away in specially air conditioned computer rooms,
with staffs of professional operators to run them.

Mode of Operation
Batch System – system that processes data in discrete groups of previously scheduled
operations rather than interactively or in real time.

3. THIRD GENERATION (1965-1980) – ICs and MULTIPROGRAMMING


Mode of Operation
Multiprogramming

4. FOURTH GENERATION (1980-2010) - PERSONAL COMPUTERS


5. FIFTH GENERATION (2010-PRESENT) - ARTIFICIAL INTELLIGENCE

OPERATING SYSTEM FUNCTIONS


1. The Operating System as an Extended Machine – Operating System presents to the user
the equivalent of an extended machine that is easier to program than the underlying hardware.
One of the major tasks of the operating system is to hide the hardware and present programs
(and their programmers) with nice, clean, elegant, consistent, abstractions to work with instead.
Operating systems turn the ugly into the beautiful, as shown in Fig. 1-2.

2. The Operating System as a Resource Manager – The primary task of an operating system is
to keep track of who is using which resource, to grant resource requests, to account for usage,
and to mediate conflicting request from different programs and users; assigns/ allocates the task
for every hardware.
Resource Management includes Multiplexing (sharing) resources in two
ways: ∙ In time
∙ In space
Kinds of Multiplexing
∙ Time Multiplexing – different programs or users takes turns using it
Example: With only one CPU and multiple programs that wants to run on it. ∙ Space
Multiplexing – instead of the customers taking turns, each one gets part of the resource
Example: Holding several programs in memory at once rather than give one of them all of it.

TYPES OF OPERATING SYSTEM


1. MAINFRAME OS
Three Kinds of Services Offered by Operating System for Mainframes:
∙ Batch System – one that processes routine jobs without any interactive user present. ∙
Transaction Processing System – handle large numbers of small requests (ex. ATM,
Barcode Scanner)
∙ Timesharing Systems – allow multiple remote users to run jobs on the computer at once,
such as querying a big database. (ex. ATM)
2. SERVER OS
- They run on servers, which are very large personal computers, workstations or even
mainframes
- They can provide print service, file service or web service
3. MULTIPROCESSOR OS
- Connection of multiple CPUs into a single system to get major league computer power. -
Special operating system for multiprocessors with special features for communication and
connectivity.
4. PERSONAL COMPUTER OS
- Their job is to provide a good interface to a single user.
5. REAL-TIME OS
- These systems are characterized by time as a key parameter.
Kinds of Real-time System
1. Hard real-time system – if the action must occur at a certain moment (or within a range)
2. Soft real-time system – in which missing air occasional deadline is acceptable. 6.
EMBEDDED OS
PDA (Personal Digital Assistant) or Palmtop Computer – a small computer that fits in a shirt
pocket and performs a small number of functions such as an electronic address book and
memo pad.
7. SMART CARD OS
- Smallest operating systems run on smart cards, which are credit card-sized devices
containing a CPU chip.

4
SYSTEM COMPONENTS

Even though not all systems have the same structure, many modern operating systems
share the same goal of supporting the following types of system components.

1. Process Management
- The operating system manages many kinds of activities ranging from user programs to
system programs like printer spooler, name servers, file server etc. Each of these activities is
encapsulated in a process.
- A process includes the complete execution context (code, data, PC, registers, OS resources
in use etc.)
- It is important to note that a process is not a program. A process is only ONE instant of a
program in execution. The five major activities of an operating system in regard to process
management are:
∙ Creation and deletion of user and system processes.
∙ Suspension and resumption of processes.
∙ A mechanism for process synchronization.
∙ A mechanism for process communication.
∙ A mechanism for deadlock handling.

2. Main-Memory Management
Primary-Memory or Main-Memory - is a large array of words or bytes
- Each word or byte has its own address
- provides storage that can be accessed directly by the CPU
- That is to say for a program to be executed, it must be in the main
memory. Major activities of an operating in regard to memory-management
are:
∙ Keep track of which part of memory are currently being used and by whom. ∙ Decide
which processes are loaded into memory when memory space becomes available.
∙ Allocate and de-allocate memory space as needed.

3. File Management
File - is a collection of related information defined by its creator
- Computer can store files on the disk (secondary storage), which provide long term storage
e.g. magnetic tape, magnetic disk and optical disk
- Each of these media has its own properties like speed, capacity, data transfer rate and
access methods.
- A file system is normally organized into directories to ease their use. These directories may
contain files and other directions.
The five main major activities of an operating system in regard to file management
are 1. The creation and deletion of files.
2. The creation and deletion of directions.
3. The support of primitives for manipulating files and directions.
4. The mapping of files onto secondary storage.
5. The backing up of files on stable storage media.

4. I/O System Management


I/O subsystem - hides the peculiarities of specific hardware devices from the user - Only
the device driver knows the peculiarities of the specific device to whom it is assigned

5. Secondary-Storage Management
Generally speaking, systems have several levels of storage, including primary storage,
secondary storage and cache storage. Instructions and data must be placed in primary
storage or cache to be referenced by a running program. Because main memory is too small
to accommodate all data and programs, and its data are lost when power is lost, the
computer system must provide secondary storage to back up main memory. Secondary

5
storage consists of tapes, disks, and other media designed to hold information that will
eventually be accessed in primary storage (primary, secondary, cache) is ordinarily divided into
bytes or words consisting of a fixed number of bytes. Each location in storage has an address;
the set of all addresses available to a program is called an address space.
The three major activities of an operating system in regard to secondary storage management
are:
1. Managing the free space available on the secondary-storage device.
2. Allocation of storage space when new files have to be written.
3. Scheduling the requests for memory access.

6. Networking
Distributed systems - is a collection of processors that do not share memory, peripheral
devices, or a clock
Network - processors communicate with one another through communication lines - the
communication-network design must consider routing and connection strategies, and the
problems of contention and security.

7. Protection System
Protection - refers to mechanism for controlling the access of programs, processes, or users
to the resources defined by a computer systems
- If a computer system has multiple users and allows the concurrent execution of multiple
processes, then the various processes must be protected from one another's activities.
8. Command Interpreter System
Command Interpreter - is an interface of the operating system with the
user - Main Function: to get and execute the next user specified command
- is usually not part of the kernel, since multiple command interpreters (shell, in UNIX
terminology) may be supported by an operating system, and they do not really need to run in
kernel mode.
- Two Main Advantages to separate the command interpreter from the kernel. 1. If we want to
change the way the command interpreter looks, i.e., I want to change the interface of
command interpreter, I am able to do that if the command interpreter is separate from
the kernel. I cannot change the code of the kernel so I cannot modify the interface.
2. If the command interpreter is a part of the kernel it is possible for a malicious process
to gain access to certain part of the kernel that it showed not have to avoid this ugly
scenario it is advantageous to have the command interpreter separate from kernel.

Operating Systems Services


Following are the five services provided by operating systems to the convenience of the
users. 1. Program Execution
Purpose of a computer system: to allow the user to execute programs
So the operating system provides an environment where the user can conveniently run
programs. The user does not have to worry about the memory allocation or multitasking or
anything. These things are taken care of by the operating systems.
Running a program involves the allocating and deallocating memory, CPU scheduling in
case of multiprocess. These functions cannot be given to the user-level programs. So user
level programs cannot help the user to run programs independently without the help from
operating systems.

2. I/O Operations
Each program requires an input and produces output. The operating systems hides the
user the details of underlying hardware for the I/O. All the user sees is that the I/O has been
performed without any details. So the operating system makes it convenient by providing I/O
for the users to run programs.

6
For efficiency and protection, users cannot control I/O so this service cannot be provided
by user-level programs.

3. File System Manipulation


The output of a program may need to be written into new files or input taken from some
files. The operating system provides this service. The user does not have to worry about
secondary storage management. User gives a command for reading or writing to a file and
sees his/her task accomplished. Thus operating system makes it easier for user programs to
accomplish their task.
This service involves secondary storage management. The speed of I/O that depends on
secondary storage management is critical to the speed of many programs and hence it is
best relegated to the operating systems to manage it than giving individual users the control
of it. It is not difficult for the user-level programs to provide these services but for above
mentioned reasons it is best if this service is left with operating system.

4. Communications
There are instances where processes need to communicate with each other to exchange
information. It may be between processes running on the same computer or running on the
different computers. By providing this service the operating system relieves the user of the
worry of passing messages between processes. In case where the messages need to be
passed to processes on the other computers through a network it can be done by the user
programs. The user program may be customized to the specifics of the hardware through
which the message transmits and provides the service interface to the operating system.

5. Error Detection
An error is one part of the system that may cause malfunctioning of the complete system.
To avoid such situation, the operating system constantly monitors the system for detecting
the errors. This relieves the user of the worry of errors propagating to various part of the
system and causing malfunctioning.
This service cannot be allowed to be handled by user programs because it involves
monitoring and in cases altering area of memory or deallocation of memory for a faulty
process or may be relinquishing the CPU of a process that goes into an infinite loop. These
tasks are too critical to be handed over to the user programs. A user program if given these
privileges can interfere with the correct (normal) operation of the operating systems.

System Calls and System Programs

System calls - provide an interface between the process and the operating system - allow
user-level processes to request some services from the operating system which process
itself is not allowed to do
- In handling the trap, the operating system will enter in the kernel mode, where it has access
to privileged instructions, and can perform the desired service on the behalf of user-level
process. It is because of the critical nature of operations that the operating system itself does
them every time they are needed.
- For example, for I/O a process involves a system call telling the operating system to read or
write particular area and this request is satisfied by the operating system.

System programs - provide basic functioning to users so that they do not need to write their
own environment for program development (editors, compilers) and program execution
(shells). In some sense, they are bundles of useful system calls.

Layered Approach Design

In this case the system is easier to debug and modify, because changes affect only
limited portions of the code, and programmer does not have to know the details of the other
layers.

7
Information is also kept only where it is needed and is accessible only in certain ways, so
bugs affecting that data are limited to a specific module or layer.

Mechanisms and Policies

Policies – specifies what is to be done


Mechanism - specifies how it is to be done
For instance, the timer construct for ensuring CPU protection is mechanism. On the
other hand, the decision of how long the timer is set for a particular user is a policy decision.
The separation of mechanism and policy is important to provide flexibility to a system. If the
interface between mechanism and policy is well defined, the change of policy may affect only
a few parameters. On the other hand, if interface between these two is vague or not well
defined, it might involve much deeper change to the system.
Once the policy has been decided it gives the programmer the choice of using his/her
own implementation. Also, the underlying implementation may be changed for a more
efficient one without much trouble if the mechanism and policy are well defined. Specifically,
separating these two provides flexibility in a variety of ways. First, the same mechanism can
be used to implement a variety of policies, so changing the policy might not require the
development of a new mechanism, but just a change in parameters for that mechanism from
a library of mechanisms. Second, the mechanism can be changed for example, to increase
its efficiency or to move to a new platform, without changing the overall policy.
8
ACTIVITY # 1

ANALYSIS
Answer the following questions.

1. What is an Operating System?

2. Why do we need Operating Systems?

3. List some differences between personal computer and mainframe operating systems.

4. What is the purpose of a system call in an operating system?


9

You might also like