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

Operating System - LESSON-1

This document provides an introduction and overview for an Operating Systems course at the Polytechnic University of the Philippines Maragondon Branch. It includes the course description, objectives, and expected outcomes. The course aims to help students understand fundamental operating system concepts like process management, memory management, and file systems. It will discuss topics like concurrency, scheduling algorithms, and how operating systems allocate resources and interact with hardware. Students will learn to analyze and evaluate different operating system techniques through assignments and simulations.

Uploaded by

Albert Tan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
290 views

Operating System - LESSON-1

This document provides an introduction and overview for an Operating Systems course at the Polytechnic University of the Philippines Maragondon Branch. It includes the course description, objectives, and expected outcomes. The course aims to help students understand fundamental operating system concepts like process management, memory management, and file systems. It will discuss topics like concurrency, scheduling algorithms, and how operating systems allocate resources and interact with hardware. Students will learn to analyze and evaluate different operating system techniques through assignments and simulations.

Uploaded by

Albert Tan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Republic of the Philippines

POLYTECHNIC UNIVERSITY OF THE PHILIPPINES


OFFICE OF THE VICE PRESIDENT FOR BRANCHES AND
EXTENSIONS
MARAGONDON BRANCH

INSTRUCTIONAL MATERIALS

IN

COMP 202833
OPERATING SYSTEM

Compiled by: Checked by:

Virgilio R. Cuajunco, Jr. Assoc. Prof. Ayreenlee E. Resus


Faculty Chairman
Committee on Writing Instructional
Materials

Date: _________________ Date: ___________________

Approved by:

Dr. Agnes Y. Gonzaga Assoc. Prof. Denise A. Abril


Head, Academic Programs Director

Date: _________________ Date: __________________


INTRODUCTION

Welcome to the Polytechnic University of the Philippines. This instructional materials will help you
become an effective learner and successfully meet the requirements of the course. You will
discover that you can learn in a very challenging way at your own pace. You can learn while
enjoying every activities in this course.
Happy learning!

THE POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

VISION

PUP: The National Polytechnic University

MISSION

Ensuring inclusive and equitable quality education and promoting lifelong learning
opportunities through a re-engineered polytechnic university by committing to:

 provide democratized access to educational opportunities for the holistic development of


individuals with global perspective

 offer industry-oriented curricula that produce highly-skilled professionals with managerial


and technical capabilities and a strong sense of public service for nation building

 embed a culture of research and innovation

 continuously develop faculty and employees with the highest level of professionalism

 engage public and private institutions and other stakeholders for the attainment of social
development goal

 establish a strong presence and impact in the international academic community

PHILOSOPHY

As a state university, the Polytechnic University of the Philippines believes that:

 Education is an instrument for the development of the citizenry and for the enhancement
of nation building; and

 That meaningful growth and transmission of the country are best achieved in an
atmosphere of brotherhood, peace, freedom, justice and nationalist-oriented education
imbued with the spirit of humanist internationalism.

2
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
TEN PILLARS

Pillar 1: Dynamic, Transformational, and Responsible Leadership


Pillar 2: Responsive and Innovative Curricula and Instruction
Pillar 3: Enabling and Productive Learning Environment
Pillar 4: Holistic Student Development and Engagement
Pillar 5: Empowered Faculty Members and Employees
Pillar 6: Vigorous Research Production and Utilization
Pillar 7: Global Academic Standards and Excellence
Pillar 8: Synergistic, Productive, Strategic Networks and Partnerships
Pillar 9: Active and Sustained Stakeholders’ Engagement
Pillar 10: Sustainable Social Development Programs and Projects

SHARED VALUES AND PRINCIPLES

 Integrity and Accountability


 Nationalism
 Spirituality
 Passion for Learning and Innovation
 Inclusivity
 Respect for Human Rights and The Environment
 Excellence
 Democracy

3
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
MARAGONDON BRANCH

GOALS

 Quality and excellent graduates


 Empowered faculty members
 Relevant curricula
 Efficient administration
 Development – oriented researches
 State-of-the-art physical facilities and laboratories
 Profitable income – generating programs
 Innovative instruction
 ICT – driven library
 Strong local and international linkages

PROGRAM OBJECTIVES

The College of Technology aims to achieve the following goals:

1. To offer career-focused programs of study with a well-chosen general education


component to enable students to cope with global standards for a meaningful and fruitful
life.

2. To inculcate in the students good moral values and work ethics.

3. To ensure teaching learning efficiency and effectiveness by means of highly qualified and
committed faculty members.

4. To encourage faculty members to produce appropriate, affordable, user-friendly


instructional materials that conform to national and global standards.

5. To promote a growing output-oriented consciousness in research, production, extension,


and community service.

6. To establish national and international linkages for student on-the-job training


requirements and funding and/or faculty-improvement assistance.

4
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
COMP 20283
OPERATING SYSTEM

COURSE DESCRIPTION

COURSE TITLE : OPERATING SYSTEM


COURSE CODE : COMP 20283
COURSE CREDIT : 3(2 lecture/1 laboratory) units
PRE-REQUISITE : COMP 20023

This course provides an introduction to the concepts, theories and components that serve as the
basis for the design of classical and modern operating systems. Topics include disk
management, process and memory management, file management, deadlocks and system
security and protection. This course discusses and simulates the basic functions of Operating
System.

COURSE OBJECTIVES

By the end of this course the student will be able to:


1. Recognize the importance of the operating systems.
2. Recognize how the applications interact with the operating system as the later working as
intermediary program between the machine and the application.
3. Know how the operating systems transport the application requests to the hardware.
4. Understand how operating systems managing resources such as processors, memory
and I/O.
5. Realize the efficiency or the deficiency of the different techniques used by some operating
systems.

Institutional learning Program outcomes Course outcomes


outcomes
1.Creative and Apply knowledge of computing, science, and Explain the more general systems principles
Critical Thinking mathematics appropritate to the discipline. that are used in the design of all computer
Analyze complex problems, and identify and system.
define the computing requirements Describe the basic concepts of operating
appropriate to its solution. systems, including development and
Identify and analyze user needs and take achievements, functionalities and objectives,
them into account in the selection, creation, structure and components.
evaluation and administration of computer Explain concepts covered in concurrency
based systems. control using deadlock and starvation.
Design, implement, and evaluate computer Explain how memory, I/O Devices, files,
based systems, processes, components, or processes and threads are managed, and
programs to meet desired needs and evaluate the performance of various
requirements under various constraints. scheduling algorithms.
Integrate IT-based solutions into the user Analyze, solve, simulate and assess how
environment effectively. Operating system use different algorithms to
Assist in the creation of an effective IT project perform a function.
plan. Compare and contrast the algorithms used for

5
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
2.Adeptness in the Apply knowledge through the use of current processor scheduling, disk scheduling and the
Responsible Use of techniques, skills, tools and practices different ways of allocating memory to tasks.
Technology necessary for the IT profession Design and develop a program using concrete
3.Community Understand best practices and standards and function of the operating system such as
Engagement their applications. process scheduling, dik scheduling or memory
4.High Level of Function effectively as a member or leader of management.
Leadership and a development team recognizing the different Analyze the tradeoffs inherent in OS Design.
Organizational roles within a team to accomplish a common Demystify the interactions between the
Skills. goal. programs written and the hardware.
5.Strong Service Develop the role of operating systems in a
Orientation wider context, e.g. extending OS Services via
6.Effective Communicate effectively with the computing system calls.
Communication community and with society at large about Familiarize students with the issues and new
complex computing activities through logical trends involved in the design and
writing, presentations, and clear instructions. implementation of modern operating system.
7.Sense of Nationalism Analyze the local and global impact of Analyze the relationship between the operating
and Global computing information technology on system and the hardware environment in
Responsiveness. individuals, organizations, and society. which it runs.
8.Sense of Personal Understand professional, ethical, legal,
and Professional security and social issues and responsibilities
Ethics in the utilization of information technology.
9.Passion to Life- Recognize the need for and engage in
Long Learning planning self-l;earning and imprroving
performance as a foundation for continuing
professional development.

COURSE REQUIREMENTS

The course requirements are as follows:

1. Students are encouraged to attend the class sessions (online students) and complete all
the requirements (online and offline students).
2. The course is expected to have a minimum of four (4) quizzes and two (2) major
examination (Midterm and Final Examination).
3. Other requirements such as written outputs, exercises, assignments and the likes will be
given throughout the sessions. These shall be submitted on the due dates set by the
teacher.

Note: Some activities will be rated using the Rubrics.

GRADING SYSTEM

The grading system will determine if the student passed or failed the course. There will be two
grading periods: Midterm and Final Period. Each period has components of: 70% Class Standing
+ 30% Major Examination. Final Grade will be the average of the two periodical grades.

Midterm Finals
Class Standing 70% Class Standing 70%

6
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
 Quizzes  Quizzes
 Activities  Activities
 Asignments  Project
Mid-term Examination 30%  Assignments
Final Examination 30%
FINAL GRADE = (Midterm + Finals) /2
RUBRICS:
Outstanding Very Good Average Poor
5.0-4.5 4.0-3.0 2.5-1.5 1.0
Completeness Complete in all Complete in some Incomplete in many Incomplete and does
aspects and includes aspects and includes aspects and includes not include
all requirements most of the few requirements requirements
requirements
Analysis and Use Presents an insightful Presents an insightful Presents shallow Presents incomplete
of the and in-depth analysis and analysis of most analysis of data; and analysis of data; and
Entrepreneurial of all data; uses many of the data; uses uses limited fails to use
Concepts and entrepreneurial some entrepreneurial entrepreneurial entrepreneurial
Business Tools concepts and concepts and concepts and concepts and
business tools business tools business tools business tools
learned in the subject learned in the subject learned in the subject learned in the subject
Setting of Presents complete, Presents specific, Presents some Presents limited,
Recommendation realistic, and realistic, and applicable unrealistic
for future action applicable applicable recommendations recommendation from
plans recommendations recommendations from the data the data gathered,
from, and shows how from the data gathered, and shows and failed to show
to use it in their future gathered, and shows how to use it in their how to use it in their
action plans how to use it in their future action plans. future action plans.
future action plans.
Over-all The paper has The paper has clarity, The paper lacks The paper is not clear
cohesiveness sophisticated clarity, conciseness, and clarity, conciseness, and contains serious
(writing and conciseness, and correctness. Includes and correctness. errors. Failed to
presentation) correctness. Includes some needed Includes limited include relevant data
all needed relevant relevant data and relevant data and and analysis.
data and analysis. analysis. analysis.

COURSE GUIDE

First semester Class (18 weeks)


Week Topic Learning Outcomes Methodology Resources Assessment
Orientation and
Discussion.
Understand the mission,
Review of the
vision, goals and objectives
Orientation of syllabus,
of the University.
University’s explanation of
Understand all the policies
vision, mission, learning activities
and in-house classroom PUP Student Handbook
1 goals and and assessment. None
management of the Course Syllabus
objectives. Explanation of
professor.
course
Acquire the relation of the
requirements and
subject to their course and
methods of
ultimately
evaluating student
performance
2 1. Introduction to  Summarize the Lecture LCD Projector Recitation
7
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
Operating Systems objectives and functions Listening Team Laptop Computer Homework
 Definition, of modern operating Question Period Video Tutorials Written Exam
Functions and systems Library Research
Goals of the  Determine the functions
Operating of a contemporary
System operating system with
 History of the respect to convenience,
Operating efficiency and the ability
System to evolve.
 Types of  Compare and contrast
Operating networked, client-server,
Systems distributed operating
 Components of systems and single user
Operating operating systems.
System  Deduce the tradeoffs
inherent in operating
system design.
3-4 2. Computer System  Distinguish potential Lecture LCD Projector Recitation
Structure threats to operating Group Discussion Laptop Computer Homework
 The Computer systems and the security TextbookAssignm Video Tutorials Written Exam
System features designed to ent
 Computer Boot- guard against them.
Up  Explain the concept of
 Traps and logical layer.
Interrupts  Summarize the benefits
 I/O Structure of building abstact layers
 Storage in hierarchical fashion.
Structure  Describe how computing
 Hardware resources are used by
Protection application software and
managed by system
software
 Discuss the advantages
and disadvantages of
using interrupt
processing
 Explain the use of a
device list and driver I/O
queues
 Contrast kernel and user
mode in an operating
system
 Describe the value of
middleware
5–6 3. Process  Discover the different Lecture LCD Projector Seatwork
Management states that a task may Simulation Laptop Computer Homework
 Process Concept pass through and the Problem Solving Video Tutorials Written exam
 Process States data structures needed to Group Calculator Project
 Process Creation support the management Assignment CPU Scheduling Apps Application
and Termination of many tasks. Individual
 Process Threads  Visualize reasons for Asssignment
 Process using interrupts,
Schedulers dispatching, and context
 Process switching.
Scheduling  Classify the types of
Concepts processor scheduling
such as short term,
8
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
 Processor medium term longterm,
Scheduling and I/O.
Algorithms  Discuss the need for
preemption and deadline
scheduling.
 Compare and contrast
the common algorityms
used for both preemptive
and non-preemtive
scheduling of tasks in
operating systems, such
as priority, performance
cvomparison, and fair
share schemes.
 Detect the difference
between processes and
threads.
 Compare and contrast
static and dynamic
approaches to process
scheduling.
 Illustrate ways that the
logic embodied in
scheduling algorithms
are applicable to other
domains, sucha s disk
I/O, network scheduling,
project scheduling, and
problems beyond
computing.
 Measure the
performance of the
processor using different
scheduling algorithms.

7–8 4. Storage  Explain buffering and Library Research LCD Projector Recitation
Management describe strategies for Lecture Laptop Computer Seatwork
 Disk Scheduling implementing it. Group Discussion Video Tutorials Homework
Concepts  Identify the requirements Student’s Self Calculator Written exam
 Disk Scheduling for failure recovery. Assessment Disk Scheduling Apps
Algorithms  Identify the relationship Problem Solving
between the physical
hardware and the virtual
devices maintained by
the operating system.
 Differentiate the
mechanisms used in
interfacing a range of
devices (including
handheld devices,
networks, multimedia) to
a computer and explain
the implications of these
for the design of an
operating system.
 Describe the advantages
and disadvantages of

9
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
direct memory access
and discuss the
circumstances in which
its use is warranted.
 Implement a simple
device driver for a range
of possible devices.
 Assess the disk
scheduling algorithms
used to calculate the total
head movement and
seek time.
9 Midterm Examination
10 – 11 5. Memory  Explain memory Library Research LCD Projector Recitation
Management hierarchy and cost- Individual Laptop Computer Seatwork
 Memory performance trade-offs. Assignment Video Tutorials Reserch Work
Management  Summarize the principles Simulation Calculator Homework
Concepts of virtual memory as Problem Solving Written exam
 Swapping, applied to caching and Lecture
Overlays and paging. Demonstration
Compaction  Describe the reason for
 Multiprogramming and use of cache
with Fixed and memory.
Variable Partitions  Discuss the concept of
 Buddy System thrashing, both in terms
of the reasons it occurs
and the techniques used
to recognize and manage
the problem.
 Implement the different
memory management
schemes.
 Validate the trade-offs in
terms of memory size
and processor speed.
 Formulate how the
different memory
management schemes
behave.
 Defend the different ways
of allocating memory to
tasks, citing the relative
merits of each.
12 – 13 6. Virtual Memory  Calculate the physical Lecture LCD Projector Seatwork
Management and logical addresses Simulation Laptop Computer Homework
 Virtual Memory used. Problem Solving Video Tutorials Written Exam
Concepts  Evaluate the different task Calculator
 Paging, memory management Individual
Segmentation, schemes that can be Assignment
and used. Open Textbook
Segmentation  Experiment on the Study
with Paging different algorithms used
 Page for page replacement
Replacement  Simulate the behavior of
Algorithms page allocation
 Page Allocation strategies.
14 – 15 7. Deadlocks  Describe how deadlocks Group Report LCD Projector Recitation
10
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
 Deadlock can arise in a system, Reading Laptop Computer Seatwork
Concept and explain the solutions Assignment Video Tutorials Homework
 Conditions for available. Class Discussion Written Exam
Deadlock  Compare and Contrast Problem Solving
 Approaches in the different ways of Simulation
Handling handling deadlock.
Deadlock  Simulate and justify if
 Deadlock deadlock will or will not
Prevention and occur.
Avoidance
 Deadlock
Detection and
Recovery
16 – 17 8. File Management  Describe the choices to Reading LCD Projector Research Work
 File Concepts be made in designing the Assignment Laptop Computer
and Naming file systems. Library Research Video Tutorials
 Logical and  Summarize how Open Textbook
Physical View of hardware developments Study
Files have led to changes in
the priorities for the
 File Organization
design and the
and Access
management of file
 File Attributes systems.
and Operations  Compare and contrast
 Directories different approaches to
file organization,
recognizing the strengths
and weaknesses of each.
18 Final Examination

REFERENCES

 OPERATING SYSTEM CONCEPTS, 7th edition


By ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, GREG GAGNE

 OPERATING SYSTEM CONCEPTS, 3rd edition


By ABRAHAM SILBERSCHATZ, PETER BAER GALVIN

 OPERATING SYSTEMS Notes and Lectures

 MODERN OPERATING SYSTEMS 4th edition


By ANDREW S. TANENBAUM and HERBERT BOS

11
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
TABLE OF CONTENTS

Topic Page

Introduction
Orientation

Lesson 1 Operating System 1


Unit 1 Fundamentals 1
Unit 2 Computer Architecture 6

Lesson 2 Function 10
Unit 1 Processes 10
Unit 2 Process Synchronization 14
Unit 3 Deadlocks 16

Lesson 3 Management 20
Unit 1 Main Memory Management 20
Unit 2 File Management 24
Unit 3 I/O Management 26

12
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
Lesson 1 Operating System

Unit 1 Fundamentals

Overview:

The operating system is considered as the most important of all system software. This unit
introduces operating systems and their role in the over-all performance of computer systems. An
operating system is software that manages a computer’s hardware. It also provides a basis for
application programs and acts as an intermediary between the computer user and the computer
hardware. An amazing aspect of operating systems is how they vary in accomplishing these
tasks in a wide variety of computing environments. Operating systems are everywhere, from cars
and home appliances that include “Internet of Things” devices, to smart phones, personal
computers, enterprise computers, and cloud computing environments.

Learning Objectives:

After completion, you should be able to:

1. Describe the general organization of a computer system and the role of interrupts.
2. Describe the components in a modern multiprocessor computer system.
3. Illustrate the transition from user mode to kernel mode.
4. Discuss how operating systems are used in various computing environments.
5. Provide examples of free and open-source operating systems.

Course Materials:

What Operating Systems Do

We begin our discussion by looking at the operating system’s role in the overall computer
system. Acomputer system can be divided roughly into four components: the hardware, the
operating system, the application programs, and a user (Figure 1.1).

The hardware—the central processing unit (CPU), the memory, and the input/output (I/O)
devices—provides the basic computing resources for the system. The application
programs—such as word processors, spreadsheets, compilers, and web browsers—define the
ways in which these resources are used to solve users’ computing problems. The operating
system controls the hardware and coordinates its use among the various application programs
for the various users.

We can also view a computer system as consisting of hardware, software, and data. The
operating system provides the means for proper use of these resources in the operation of the
computer system. An operating system is similar to a government. Like a government, it performs

13
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
no useful function by itself. It simply provides an environment within which other programs can
do useful work.

To understand more fully the operating system’s role, we next explore operating systems from
two viewpoints: that of the user and that of the system.

User View

The user’s view of the computer varies according to the interface being used. Many computer
users sit with a laptop or in front of a PC consisting of a monitor, keyboard, and mouse. Such a
system is designed for one user to monopolize its resources. The goal is to maximize the work
(or play) that the user is performing. In this case, the operating system is designed mostly for
ease of use, with some attention paid to performance and security and none paid to resource
utilization—how various hardware and software resources are shared.

Figure 1.1 Abstract view of the components of a computer system.

System View

From the computer’s point of view, the operating system is the program most intimately involved
with the hardware. In this context, we can view an operating system as a resource allocator. A
computer system has many resources that may be required to solve a problem: CPU time,
memory space, storage space, I/O devices, and so on. The operating system acts as the
manager of these resources. Facing numerous and possibly conflicting requests for resources,
the operating system must decide how to allocate them to specific programs and users so that it
can operate the computer system efficiently and fairly.

A slightly different view of an operating system emphasizes the need to control the various I/O
devices and user programs. An operating system is acontrol program. A control program
manages the execution of user programs to prevent errors and improper use of the computer. It
is especially concerned with the operation and control of I/O devices.

14
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
Defining Operating Systems

By now, you can probably see that the term operating system covers many roles and functions.
That is the case, at least in part, because of the myriad designs and uses of computers.
Computers are present within toasters, cars, ships, spacecraft, homes, and businesses. They are
the basis for game machines, cable TV tuners, and industrial control systems.

To explain this diversity, we can turn to the history of computers. Although computers have a
relatively short history, they have evolved rapidly. Computing started as an experiment to
determine what could be done and quickly moved to fixed-purpose systems for military uses,
such as code breaking and trajectory plotting, and governmental uses, such as census
calculation. Those early computers evolved into general-purpose, multifunction mainframes, and
that’s when operating systems were born. In the 1960s, Moore’s Law predicted that the number
of transistors on an integrated circuit would double every 18 months, and that prediction has held
true. Computers gained in functionality and shrank in size, leading to a vast number of uses and
a vast number and variety of operating systems.

• An operating system is software that manages the computer hardware, as well as


providing an environment for application programs to run.

• Interrupts are a key way in which hardware interacts with the operating system. A
hardware device triggers an interrupt by sending a signal to the CPU to alert the CPU
that some event requires attention. The interrupt is managed by the interrupt handler.

• For a computer to do its job of executing programs, the programs must be in main
memory, which is the only large storage area that the processor can access directly.

• The main memory is usually a volatile storage device that loses its contents when power
is turned off or lost.

• Nonvolatile storage is an extension of main memory and is capable of holding large


quantities of data permanently.

• The most common nonvolatile storage device is a hard disk, which can provide storage
of both programs and data.

• The wide variety of storage systems in a computer system can be organized in a


hierarchy according to speed and cost. The higher levels are expensive, but they are
fast. As we move down the hierarchy, the cost per bit generally decreases, whereas the
access time generally increases.

• Modern computer architectures are multiprocessor systems in which each CPU contains
several computing cores.

15
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
• To best utilize the CPU, modern operating systems employ multiprogramming, which
allows several jobs to be in memory at the same time, thus ensuring that the CPU
always has a job to execute.

• Multitasking is an extension of multiprogramming wherein CPU scheduling algorithms


rapidly switch between processes, providing users with a fast response time.

• To prevent user programs from interfering with the proper operation of the system, the
system hardware has two modes: user mode and kernel mode.

• Various instructions are privileged and can be executed only in kernel mode. Examples
include the instruction to switch to kernel mode, I/O control, timer management, and
interrupt management.

• A process is the fundamental unit of work in an operating system. Process management


includes creating and deleting processes and providing mechanisms for processes to
communicate and synchronize with each other.

• An operating system manages memory by keeping track of what parts of memory are
being used and by whom. It is also responsible for dynamically allocating and freeing
memory space.

• Storage space is managed by the operating system; this includes providing file systems
for representing files and directories and managing space on mass-storage devices.

• Operating systems provide mechanisms for protecting and securing the operating
system and users. Protection measures control the access of processes or users to the
resources made available by the computer system.

• Virtualization involves abstracting a computer’s hardware into several different execution


environments.

• Data structures that are used in an operating system include lists, stacks, queues, trees,
and maps.

• Computing takes place in a variety of environments, including traditional computing,


mobile computing, client–server systems, peer-to-peer systems, cloud computing, and
real-time embedded systems.

• Free and open-source operating systems are available in source-code format. Free
software is licensed to allow no-cost use, redistribution, and modification. GNU/Linux,
FreeBSD, and Solaris are examples of popular open-source systems.

16
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
Inserted is a powerpoint presentation

OPERATING SYSTEM
FUNDAMENTAL.pptx
Activities/Assessments:

References:

 OPERATING SYSTEM CONCEPTS, 7th edition


By ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, GREG GAGNE

 OPERATING SYSTEM CONCEPTS, 3rd edition


By ABRAHAM SILBERSCHATZ, PETER BAER GALVIN

 OPERATING SYSTEMS Notes and Lectures

 MODERN OPERATING SYSTEMS 4th edition


By ANDREW S. TANENBAUM and HERBERT BOS

17
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
Unit 2 Computer Architecture

Overview:

An operating system provides the environment within which programs are executed. Internally,
operating systems vary greatly in their makeup, since they are organized along many different
lines. The design of a new operating system is a major task. It is important that the goals of the
system be well defined before the design begins. These goals form the basis for choices among
various algorithms and strategies.

We can view an operating system from several vantage points. One view focuses on the services
that the system provides; another, on the interface that it makes available to users and
programmers; a third, on its components and their interconnections. In this chapter, we explore
all three aspects of operating systems, showing the viewpoints of users, programmers, and
operating system designers. We consider what services an operating system provides, how they
are provided, how they are debugged, and what the various methodologies are for designing
such systems. Finally, we describe how operating systems are created and how a computer
starts its operating system.

Learning Objectives:

After completion, you should be able to:

1. Identify services provided by an operating system.


2. Illustrate how system calls are used to provide operating system services.
3. Compare and contrast monolithic, layered, microkernel, modular, and hybrid
strategies for designing operating systems.
4. Illustrate the process for booting an operating system.
5. Apply tools for monitoring operating system performance.
6. Design and implement kernel modules for interacting with a Linux kernel.

Course Materials:

Operating systems provide a number of services. At the lowest level, system calls allow a
running program to make requests from the operating system directly. At a higher level, the
command interpreter or shell provides a mechanism for a user to issue a request without writing
a program. Commands may come from files during batch-mode execution or directly from a
terminal when in an interactive or time-shared mode. System programs are provided to satisfy
many common user requests.

The types of requests vary according to level. The system-call level must provide the basic
functions, such as process control and file and device manipulation. Higher-level requests,
satisfied by the command interpreter or system programs, are translated into a sequence of
system calls. System services can be classified into several categories: program control, status
requests, and I/0 requests. Program errors can be considered implicit requests for service.

18
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
Once the system services are defined, the structure of the operating system can be developed.
Various tables are needed to record the information that defines the state of the computer system
and the status of the system's jobs.

The design of a new operating system is a major task. It is important that the goals of the system
be well defined before the design begins. The type of system desired is the foundation for
choices among various algorithms and strategies that will be needed.

Since an operating system is large, modularity is important. Designing a system as a sequence


of layers or using a microkernel is considered a good technique. The virtual-machine concept
takes the layered approach and treats both the kernel of the operating system and the hardware
as though they were hardware. Even other operating systems may be loaded on top of this virtual
machine.

Throughout the entire operating-system design cycle, we must be careful to separate policy
decisions from implementation details (mechanisms). This separation allows maximum flexibility
if policy decisions are to be changed later.

Operating systems are now almost always written in a systems implementation language or in a
higher-level language. This feature improves their implementation, maintenance, and portability.
To create an operating system for a particular machine configuration, we must perform system
generation.

For a computer system to begin running, the CPU must initialize and start executing the
bootstrap program in firmware. The bootstrap can execute the operating system directly if the
operating system is also in the firmware, or it can complete a sequence in which it loads
progressively smarter programs

• An operating system provides an environment for the execution of programs by


providing services to users and programs.

• The three primary approaches for interacting with an operating system are (1) command
interpreters, (2) graphical user interfaces, and (3) touchscreen interfaces.

• System calls provide an interface to the services made available by an operating


system. Programmers use a system call’s application programming interface (API) for
accessing system-call services.

• System calls can be divided into six major categories: (1) process control, (2) file
management, (3) device management, (4) information maintenance, (5)
communications, and (6) protection.

• The standard C library provides the system-call interface for UNIX and Linux systems.

• Operating systems also include a collection of system programs that provide utilities to
users.

19
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
• A linker combines several relocatable object modules into a single binary executable file.
A loader loads the executable file into memory, where it becomes eligible to run on an
available CPU.

• There are several reasons why applications are operating-system specific. These
include different binary formats for program executables, different instruction sets for
different CPUs, and system calls that vary from one operating system to another.

• An operating system is designed with specific goals in mind. These goals ultimately
determine the operating system’s policies. An operating system implements these
policies through specific mechanisms.

• A monolithic operating system has no structure; all functionality is provided in a single,


static binary file that runs in a single address space. Although such systems are difficult
to modify, their primary benefit is efficiency.

• A layered operating system is divided into a number of discrete layers, where the bottom
layer is the hardware interface and the highest layer is the user interface. Although
layered software systems have had some success, this approach is generally not ideal
for designing operating systems due to performance problems.

• The microkernel approach for designing operating systems uses a minimal kernel; most
services run as user-level applications. Communication takes place via message
passing.

• A modular approach for designing operating systems provides operating system


services through modules that can be loaded and removed during run time. Many
contemporary operating systems are constructed as hybrid systems using a
combination of a monolithic kernel and modules.

• A boot loader loads an operating system into memory, performs initialization, and begins
system execution.

• The performance of an operating system can be monitored using either counters or


tracing. Counters are a collection of system-wide or preprocess statistics, while tracing
follows the execution of a program through the operating system.

Inserted is a powerpoint presentation

COMPUTER
ARCHITECTURE.pptx

20
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
Activities/Assessments:

Answer the following:

References:

 OPERATING SYSTEM CONCEPTS, 7th edition


By ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, GREG GAGNE

 OPERATING SYSTEM CONCEPTS, 3rd edition


By ABRAHAM SILBERSCHATZ, PETER BAER GALVIN

 OPERATING SYSTEMS Notes and Lectures

 MODERN OPERATING SYSTEMS 4th edition


By ANDREW S. TANENBAUM and HERBERT BOS

21
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM
References:

 OPERATING SYSTEM CONCEPTS, 7th edition


By ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, GREG GAGNE

 OPERATING SYSTEM CONCEPTS, 10th edition


By ABRAHAM SILBERSCHATZ, PETER BAER GALVIN

 OPERATING SYSTEMS Notes and Lectures

 MODERN OPERATING SYSTEMS 4th edition


By ANDREW S. TANENBAUM and HERBERT BOS

For further readings:

22
SUBJECT: COMP 202833 – OPERATING SYSTEM
PREPARED BY: VIRGILIO R. CUAJUNCO, JR., MEM

You might also like