Вы находитесь на странице: 1из 42

* TM 2033

Platform Technology

Introduction to Operating
System

Dr Nazatul Aini Abd Majid


nazatulaini@ukm.edu.my
*
*

Describe how the components and


functions of an operating system work
together to provide a computing
platform.
*

* Exercise Part 1
* Content
* Where is the location of OS in computer system?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* What are the main components of OS?
* What are the two dimensions of OS?
* Summary
* Exercise Part 2
* Reading materials:
1) Chapter 8: Operating system support, William Stallings, 2013. Computer Organization and
Architecture. Designing For Performance, 9th Edition, Pearson Education International, Inc.
2) Chapter 15: Operating system: An overview, 2. Irv Englander, 2014, The Architecture of Computer
Hardware, System Software and Networking, 5th Edition, John Wiley & Sons.
*
* 1) In this resource
monitor, you can view
processor, disk, network,
and memory utilization.
Which component in a
computer system that can
manage effectively these
resources?
a) Application program
b) Operating system
c) System program
d) System call
*
* 2) Kernel memory has
only 356 paged memory.
This memory is used by:
a) System program
b) Registers
c) Operating system kernel
d) Application program
*
* 3) The processor is
* 4) OS offers many
often idle when there is a
services. In order to use
program that needs to
these services, a user
wait for I/O. How to solve
must use:
this problem?
a) A set of system calls
a) Batch operating system
b) A set of signals
b) Multiprogramming
c) A set of data
c) Programmer interact
directly with the computer
hardware
*
* 5) In order to switch
* 6) What is shell in
from user mode to kernel
Linux?
mode, this instruction
must be executed: a) Device driver

a) Track instruction b) Register

b) Interrupt instruction c) Command interpreter

c) Trap instruction d) Something you can eat


*
* 7) Examples of system
* 8) Each program that
call for file system
needs to be executed by
management are
CPU must be copied from
a) getgid( ), setgid ( ), the secondary storage to
chmod ( name, mode) the main memory. This is
b) kill (pid, sig), pause ( ) the main function of:
c) mkdir (name, mode), a)Program management
chroot(dirname)
b)CPU management
c)Memory management
*
* 9) Every process in
* 10) A collection of
memory can be tracked
related information is
using:
called:
a) Scheduling
a)Block
b) Process control block
b)File
c) Process control table
c)Space
*

* Exercise Part 1
* Content
* Where is the location of OS in system computer?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* What are the main components of OS?
* What are the two dimensions of OS?
* Summary
* Exercise Part 2
*

* How to run hardware in


order to produce results
needed by a user?
* Acts as an intermediary
between the user and
user’s programs, and
the hardware of the
computer

Copyright 2013 John Wiley & Sons, Inc.


*

* Exercise Part 1
* Content
* Where is the location of OS in system computer?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* What are the main components of OS?
* What are the two dimensions of OS?
* Summary
* Exercise Part 2
*

* “A collection of computer
programs that integrate
the hardware resources
of the computer and make
those resources available
to a user and the user’s
programs, in a way that
allows the user access to
the computer in a
productive, timely, and
efficient manner.”
*

* Exercise Part 1
* Content
* Where is the location of OS in system computer?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* What are the main components of OS?
* What are the two dimensions of OS?
* Summary
* Exercise Part 2
*

*Efficiency
*Convenience
*

* Allows the computer


system resources to be
used in efficient manner
1) Allocate main memory
for program and data
from a user
2) Control access to files
and I/O devices
3) Determine how much
processor time is to be
devoted to the
execution of a
particular user
program.

http://technet.microsoft.com/en-us/magazine/ff382715.aspx
*

* Make a computer more convenient to use. OS


will provide a suitable interface for a user to do
any tasks related to a computer.
For example, a user that wants to develop a
program, first, OS provides: Utility and services
such as debugging and editor tools.
http://msdn.microsoft.com/en-
us/library/windows/hardware/ff551063(v=vs.85).
aspx
When the program has been developed, OS will
take some steps to execute the program:
1) Instructions and data must be loaded into
main memory
2) I/O devices and files must be initialized

When the program has error during execution, the


OS will detect the error (e.g.: device error) and
make response.

In the end, the OS can also act as an accountant,


collect usage statistics for various resources and
monitor performance
*
*

* Exercise Part 1
* Content
* Where is the location of OS in system computer?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* What are the main components of OS?
* What are the two dimensions of OS?
* Summary
* Exercise Part 2
*

Software
Computer
system

Hardware
*

User space

Software
Computer
system

Kernel space

Hardware
*

Application
program
User space
System
program
Software
Computer
system

Kernel space

Hardware
*

Application
program
User space
System
program
Software
Computer
Operating Process management system
system
I/O management
services
Kernel space
File system management
Memory management

Hardware
*

Copyright 2013 John Wiley & Sons, Inc.


*

* Exercise Part 1
* Content
* Where is the location of OS in system computer?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* System call
* What are the main components of OS?
* What are the two dimensions of OS?
* Summary
* Exercise Part 2
*
* How to access services provided by OS?
Application
program
User space
System
program

System call Software


Operating Process management
system
I/O management
services
Kernel space
File system management
Memory management

Hardware
*

* Programming interface to the services provided by the OS


* Typically written in a high-level language (C or C++)
* Example: system call date ( )
* Steps:
* Open terminal for shell (command interpreter) in Linux
* Type command date in the terminal
*

User
date( )
Sistem program
- Commands
- Utilities
(1) User requests command
User space date ( )
date( )
(2) Trap instruction will be
System call executed to switch the
control from user mode to
kernel mode.
Kernel space (3) Based on the number of
system call, i, system call
handler will execute the
. date( ) command
. (4) After completed, the
Implementasi control will be returned
. back to the user.
-- Untuk date ( )
--i .
. return
.
*

Process Management

Tanenbaum & Woodhull, Operating


Systems: Design and Implementation,
*

Signals
*
Dir. & File System Mgmt.

Tanenbaum & Woodhull, Operating


Systems: Design and Implementation,
(c) 2006 Prentice-Hall, Inc. All rights
reserved. 0-13-142938-8
*

* Exercise Part 1
* Content
* Where is the location of OS in system computer?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* System call
* What are the main components of OS?
* What are the two dimensions of OS?
* Summary
* Exercise Part 2
*

* Process management
* When a program is in execution phase, this program is called a process. Process
management tracks all the processes using process control block.
* Memory management
* Every program and data that need to be executed by a processor, need to be loaded in main
memory. Memory management must ensure that the program and data have been loaded
from their permanent location (secondary storage) to main memory.
* File system management
* File is a collection of related information. The structure, name, protection and
implementation of the files are managed by file system.
* I/O management
* Input/output devices are part of a computer system that need to be managed properly. I/O
management provides I/O device driver program for every device that has been installed in
the computer system.
*

* Exercise Part 1
* Content
* Where is the location of OS in system computer?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* System call
* What are the main components of OS?
* What are the two dimensions of OS?
* Summary
* Exercise Part 2
*

* 1) Interactive or Batch
* 2) Multiprogramming or uni-programming
*

* 1) Interactive
User interact directly with the computer, usually through
keyboard, to request an execution of a job (a program).
*

* 1) Batch
OS will manage programs from various users to be executed by
the computer in batch.
*

* 2) Multiprogramming
* Having a processor work on more than one program at a time.
Several programs are loaded into memory, and the processor
switches rapidly among them.
* or uni-programming
* Works only one program at time.
*

* Exercise Part 1
* Content
* Where is the location of OS in system computer?
* What is the definition of OS?
* What are the main functions of OS?
* How is the structure of OS?
* System call
* What are the main components of OS?
* What are the two dimensions of OS?
Summary
* Summary
* Exercise Part 2 and compare your answers
*

* What are causes for this error?


* THANK YOU

Dr Nazatul Aini Abd Majid


nazatulaini@ukm.edu.my

Вам также может понравиться