Cavite State University: Preliminaries
Cavite State University: Preliminaries
Philippines
CAVITE STATE UNIVERSITY
Bacoor City Campus
SHIV, Molino VI, City of Bacoor
(046) 476-5029
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
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.
Mode of Operation
Batch System – system that processes data in discrete groups of previously scheduled
operations rather than interactively or in real time.
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.
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.
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.
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.
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 - 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.
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.
ANALYSIS
Answer the following questions.
3. List some differences between personal computer and mainframe operating systems.