The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.

OPERATING SYSTEM introduces the design and implementation of operating systems. This course will cover briefly the evolution and major components of operating system. Particular emphasis will be given to three major OS subsystems; memory management, processes management, file systems and operating systems in mobile devices today that supporting distributed systems.

Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by rasmaliza.pkt, 2021-09-19 05:33:53

INTRODUCTION TO OPERATING SYSTEM

OPERATING SYSTEM introduces the design and implementation of operating systems. This course will cover briefly the evolution and major components of operating system. Particular emphasis will be given to three major OS subsystems; memory management, processes management, file systems and operating systems in mobile devices today that supporting distributed systems.

Cetakan Pertama 2021
©Politeknik Kuala Terengganu

Tidak dibenarkan diterbitkan semula atau ditukar dalam apa jua
bentuk dengan cara apa jua sama ada elektronik, mekanikal,
fotokopi, rakaman dan sebagainya sebelum mendapat
kebenaran bertulis daripada Pengarah Politeknik Kuala
Terengganu.

Diterbitkan oleh:
Politeknik Kuala Terengganu

20200 Jalan Sultan Ismail
Kuala Terengganu, Terengganu.

Perpustakaan Negara Malaysia Cataloguing-in-Publication Data

Rasmaliza, 1979-
INTRODUCTION TO OPERATING SYSTEM / Rasmaliza & Wan Noor Aishah.
Mode of access: Internet
eISBN 978-967-2240-19-8

1. Operating systems (Computers).
2. File organization (Computer science).
3. File processing (Computer science).
4. Government publications--Malaysia.
5. Electronic books.
I. Wan Noor Aishah, 1980-. II. Title.
005.446

WRITTER

RASMALIZA BT RASHID
WAN NOOR AISHAH BINTI WAN CHEK

OPERATING SYSTEM introduces the design and

implementation of operating systems. This course will
cover briefly the evolution and major components of
operating system. Particular emphasis will be given to
three major OS subsystems; memory management,
processes management, file systems and operating
systems in mobile devices today that supporting
distributed systems.

INTRODUCTION TO OPERATING SYSTEM
MEMORY AND PROCESS MANAGEMENT
FILE MANAGEMENT
WINDOW OPERATING SYSTEM
MOBILE DEVICE OPERATING SYSTEM



CHAPTER 1

1

CHAPTER 1

This topic introduces the terms and basic concept of
operating system. The topic describes the various types
of operating system, terminologies related to operating
system and the interaction between applications and
operating systems. This topic describes the functions of
each layer of the operating system. This topic also
covers summarization on the variety designs of user
interface for today operating system. The input output
system and boot process are briefly discussed.
Lesson Learning Outcome :
At the end of this chapter, students should be able to:
• Explain the operating system environment

2

1.1 Operating System
Environment

3

Operating System Components of
Environment Operating System

Basic function of Interfaces of
Operating System Operating System

Architecture of Relationship between
Operating System system
calls and Application
Programming Interface
(API)

4

1.1 Operating System Environment

Definition of Operating System

A set of program Interface

A large and It acts as an
complex software intermediary
component that between a user
manages all of the and the computer
hardware and all of system.
the software.

Control computer Provide a base
resources
The application
Controls programs can be
everything (files, written, installed
devices, users) and executed

55

1.1 Operating System Environment

Basic Functions of Operating System

1 Managing Resources

• OS will coordinate all the computer resources
(Hardware and Software)

2 Providing a user interface

• Users interact with application programs and hardware
through a user interface

3 Running Applications

• These programs load and run applications such as
word processors and spreadsheets

4 Support for built-in utility programs

• OS uses utility programs for maintenance and repairs

5 Control to the computer hardware

• OS sits between the programs and the Basic Input
Output System (BIOS)

66

1.1 Operating System Environment

Basic Functions of Operating System

Monitor Applications

Printer Hard Drive

Operating
System

Keyboard Mouse

77

1.1 Operating System Environment

Operating System Structure

01 Monolithic

4 Types of OS

Structures

02 Layered

03 Microkernel
Networked /

04 Distributed

88

1.1 Operating System Environment

Monolithic

• The Big Mess - no organize structure
• The earliest and most common OS
• Each component of the OS was contained within the

kernel
• Communicate directly with any other component
• Have unrestricted system access
• Operating system become very highly efficient

99

1.1 Operating System Environment

Monolithic

Disadvantages :
 kernels component groups together
 difficult to isolate the source of bugs & other
errors.
 kernels tend to damage by erroneous code
due to all codes executes with unrestricted
access to the system.

Advantage :
 Generally speaking a monolithic OS kernel is
faster due to small source and compiled code
size. Less code means also less bugs and
security issues.

10 10

1.1 Operating System Environment

Layered

• OS become larger and more complex
• Layered works by grouping kernel components that

perform similar functions into layers.
• Each layer only communicate to its immediate upper

and lower layer.
• More modular than monolithic OS
• The implementation of each layer can be modified

without requiring any modification to other layers.

11 11

1.1 Operating System Environment

Layered

Disadvantages :
 Negative impact on the performance : process request

may need to pass through many layers before it is
serviced.
 Need additional methods to pass data from one layer
to another, performance degrades compare to
monolithic, which require only a single call to service a
similar request.
 Tend to damage due to erroneous code because all
layers have unrestricted access to the system.
 The use of layers helps to control and encapsulate the
complexity of large applications, but adds complexity
to simple applications.

12 12

1.1 Operating System Environment

Microkernel

• Includes only a small number of services within the
kernel

• Reduce the kernel to only basic process
communication and IO control

• Other kernel services run in user space just like any
other normal processes.

• Most operating system components, such as process
management and device management, execute
outside the kernel with a lower level of system
access.

13 13

1.1 Operating System Environment

Microkernel

Disadvantages :
 Memory foot print is large
 Potential performance loss (more software
interfaces due to message passing)
 Message passing bugs are not easy to fix
 Process management is complex

Advantages :
 Service separation has the advantage that if
one service (called a server) fails others can still
work so reliability is the primary feature.
 Message passing allows independent
communication and allows extensibility
 The fact that there is no need to reboot the
kernel implies rapid test and development.
 Easy and faster integration with 3d party
modules.

14 14

1.1 Operating System Environment

Microkernel

• Includes only a small number of services within the
kernel

• Reduce the kernel to only basic process
communication and IO control

• Other kernel services run in user space just like any
other normal processes.

• Most operating system components, such as process
management and device management, execute
outside the kernel with a lower level of system
access.

15 15

1.1 Operating System Environment

Network

• Enables its process to access resources (e.g., files)
that reside on other independent computers on a
network.

• The structure of many networked & distributed OS
based on client/server model.

• Network File System (NFS) are an important
component of networked OS

• Allowing a user on a client computer to access files
over a network

• NOS examples : Microsoft Windows Server 2003 /
2008, UNIX, Linux, Mac OS X, Novell NetWare.

16 16

1.1 Operating System Environment

Operating System Architecture
3 Types of OS
Architecture

Single Processor Multi Processor

Cluster System

17 17

1.1 Operating System Environment

Single Processor

• Has only one actual processor (single processor)
• If system have more than one process, processor

will finish the current process and other process
need to wait

18 18

1.1 Operating System Environment

Multi Processor

• A computer system in which two or more CPUs
• System have long been used in systems that need a

lot of processing power
• All processors are considered peers and run

independently of one another
• Expensive and not needed by normal home or

office users.

19 19

1.1 Operating System Environment

Clustered System

• Multiple-CPU system
• Gather together multiple CPUs to accomplish

computational work.
• Composed of two or more individual system (single

processor @ multi processor system)

20 20

1.1 Operating System Environment

Products of Operating System

Software in which the source Closed Source
code is not available;
although this type of software • Windows
might be distributed free of • Macintosh
charge, it is usually quite
costly

Software in which the Open Source
source code and software
can be obtained free of • Linux
charge and can be • Unix
modified

21 21

1.1 Operating System Environment

Concepts of Operating System

01 Mutitasking
02 Multiprogramming

03 Time Sharing
04 Buffering
05 Spooling
06 Caching

22 22

1.1 Operating System Environment
> Concepts in Operating System

Multitasking

• Running several programs at the same time.
• For example : running a number of other programs

in same time (in background) : virus checker, task
scheduler, or system resource monitor.
• Each running program (active program) “takes
turns” using the CPU.

23 23

1.1 Operating System Environment
> Concepts in Operating System

Multitasking

2 Types of Multitasking

Cooperative (also known as Emptive) – NO
INTERRUPT

Preemptive – INTERRUPT SESSION

24 24

1.1 Operating System Environment
> Concepts in Operating System

Multiprogramming

• A technique that allows a single processor to process
several programs residing simultaneously in main
memory.

• Only allows each program to use only a preset slice of
CPU time.

• Are designed to maximize the CPU usage at a time

OS without OS with
Multiprogramming Multiprogramming

OS OS

Program 1 Program 1

Unused Program 2
memory
Program 3
Only one program
can be executed by Used memory
a computer at a
time A number of
programs can be
executed
simultaneously by a
computer

25 25

1.1 Operating System Environment
> Concepts in Operating System

Time Sharing

• Sharing of a computing resource among many users by
means of multiprogramming and multi-tasking

• Allowing a large number of users to interact
concurrently with a single computer

• Benefits :
 lowered the cost of providing computing
capability
 use a computer without owning one
 promoted the interactive use of computers
 development of new interactive applications

User 3 CPU User 2

User 4 User 1

User 5

26 26

1.1 Operating System Environment
> Concepts in Operating System

Buffering

• Buffer - a region of memory used to temporarily hold
data while it is being moved from one devices to
another devices

• A temporary storage area (usually in RAM).
• Process held in buffer.
• The purpose of most buffers is:

 to act as a holding area
 enabling the CPU to manipulate data before

transferring it to a device

2 Types of Buffer

01 Pooled Buffer
multiple buffers, with the
buffer size being equal to the
size of one data record.

data data data

02 Circular Buffer
only a single buffer, large
space to hold a number of
data records

data data data

27 27

1.1 Operating System Environment
> Concepts in Operating System

Spooling

• Acronym for simultaneous peripheral operations on-line
• Refers putting jobs in a buffer, a special area in memory

or on a disk where a device can access them when it is
ready.
• Spooling is useful because devices access data at
different rates
• Common spooling application is print spooling

Printer 1 Printer 2

Print Request Print Request

Queue 1 Queue 2

28 28

1.1 Operating System Environment
> Concepts in Operating System

Caching

• (pronounced “cashing”) is the process of storing data in
a cache.

• A cache is a temporary storage area.
• For example, the files you automatically request by

looking at a Web page are stored on your hard disk in a
cache subdirectory under the directory for your
browser. When you return to a page you've recently
looked at, the browser can get those files from the
cache rather than the original server, saving you time
and saving the network the burden of additional traffic.

29 29

1.1 Operating System Environment

Operating System Components

01 Kernel
02 Shell
03 File system

30 30

1.1 Operating System Environment
> Operating System Components

Kernel

Definition

The part of the operating system that resides in
the main memory at all times and performs the
most essential tasks, such as managing
memory and handling disk input and output.

Function

 Talk to the hardware and software,
 Manage the system’s resources as best as

possible.

~Without a

kernel, you
can’t have an
operating
system that
actually works.

31 31

1.1 Operating System Environment
> Operating System Components

Kernel

Kernel Space vs. User Space
 Kernel space is strictly reserved for running a
privileged operating system kernel, kernel
extensions, and most device drivers.
 User space is the memory area
where application software and some drivers
execute.

32 32

1.1 Operating System Environment
> Operating System Components

Kernel

It’s COMPLICATED:
a. To make sure that there is enough memory available

for an application to run
b. To place an application in the right location

in memory.
c. To optimize the usage of the processor so that it

can complete tasks as quickly as possible.
d. To avoid deadlocks, which are problems that

completely halt the system when one application
needs a resource that another application is using.

33 33

1.1 Operating System Environment
> Operating System Components

Kernel

Kernel Structures vs. Kernel Application

Examples of one part of File Management Kernel
It is abridge between application and
the actual data processing done at
the hardware level

34 34

1.1 Operating System Environment
> Operating System Components

Shell

• A piece of software that provides an interface for
users of an operating system which provides
access to the services of a kernel

• The SHELL could be a :
 Command line interface (MSDOS, Terminal,
Console)
 Graphical User Interface (GUI : Mac OS X,
Windows or perhaps Gnome on Linux)

35 35

1.1 Operating System Environment
> Operating System Components

File System

• Exclusively used in storage devices
• Means to organize data - providing procedures to

store, retrieve and update data,
• Manage the available space on the storage device:

Flash memory

Hard Disk drives

Optical Disk

Floppy disks

• Example of file system:
 Windows – FAT, FAT12, FAT16, FAT32, NTFS
 LINUX – ext, ext2, ext3, ext4, ReiserFS, XFS
 Unix – UFS, UFS2, NFS
 Macintosh – HFS, MFS

36 36

1.1 Operating System Environment

Interaction: Application Program with OS

• Application programs have to be designed to work
with a specific operating system.

• The AS tells the OS what it would like to do and
the OS takes the command and makes things
happen on the actual screen and drives the
physical computer

37 37

1.1 Operating System Environment

Interface in Operating System

4 Types of OS Interfaces

Command line • A user interface that is
01 interface navigated by typing
commands at
prompts/terminal, instead
of using the mouse.

• A command line only uses
a keyboard to navigate by
entering commands and
does not utilize
a mouse for navigating

• Allows the use of icons or Graphical user
other visual indicators to 02 interface
interact with electronic
devices, rather than using
only text via the command
line. (pointer, pointing
device, menus, icons,
windows)

• For example, all versions of
Microsoft Windows utilize a
GUI, whereas MS-DOS does
not.

38 38

1.1 Operating System Environment

Interface in Operating System

Voice actuated • Also known as voice user
03 interface interfaces, which accept
input and provide output
by generating voice
prompts.

• The user input is made by
pressing keys or buttons,
or responding verbally to
the interface

• Web-based user Web form
interface
interfaces or web user 04

interfaces (WUI) accept

input and provide output

by generating web pages

which are transmitted via

the Internet and viewed

by the user using a web

browser program

• A web browser (Mozilla

Firefox, IE, Safari, Google

Chrome, Opera and many

more) is a software

application for retrieving,

presenting, and traversing

information resources on

the World Wide Web

39 39

1.1 Operating System Environment

System Call vs Application Programming
Interface

Application Program

System Call

Kernel

Process Memory

File Device

a A system call is a MECHANISM used by application 40

programs (user) to request service from the
operating system

b Application Program is not given direct access to

the hardware. Apps Program contact the OS to
request service (KERNEL) to use the hardware.

This service was done by kernel and keep the

c system safe and secure from user programs

This request is made by using an

d appropriate system call. Typically

written in a high-level language (C
or C++)

40

1.1 Operating System Environment

System Call vs Application Programming
Interface

Example of System Calls

41 41

1.1 Operating System Environment

System Call vs Application Programming
Interface

Application Programming Interface (API)
 A particular set of rules (code/programming) that
application programs can follow to communicate
with each other application programs
 It serves as an interface between different
application programs and facilitates their
interaction
 An API can be created for applications, libraries,
operating systems, etc

42 42


Click to View FlipBook Version