Vous êtes sur la page 1sur 24

Chapter 8

System Software
Chapter 8 Objectives

• Become familiar with the functions provided by operating


systems, programming tools, database software and
transaction managers.
• Understand the role played by each software component in
maintaining the integrity of a computer system and its data.

2 Chapter 8_System Software


8.2 Operating Systems – BIOS
• The main function of the BIOS (Basic Input Output System) is to boot up
an operating system on a PC.
• It does this by first identifying and testing all hardware components
(including the hard disk and floppy drives), and then by locating a valid
operating system to which it can transfer control.

3 Chapter 8_System Software


Four Components of a Computer System

4 Chapter 8_System Software


Components of a Computer System
Q1: What is the Difference between system software and
application software?
• Application software
– are programs that enable the end-user to perform specific,
productive tasks, such as word processing or image
manipulation.
• System software :
– Is any computer software which manages and controls
computer hardware so that application software can perform
a task ; e.g. Operating System.
– Operating systems, such as Microsoft Windows, Mac OS X
or Linux, are prominent examples of system software.
– System software performs tasks like transferring data from
memory to disk, or rendering text onto a display device.
– Specific kinds of system software include loading programs,
operating systems, device drivers, programming tools,
compilers, assemblers, linkers, and utility software.
5 Chapter 8_System Software
8.3 Operating System Design – OS Layers

• The operating System design consists of two parts:


– The kernel space (Privileged Mode)
– The user space (Unprivileged Mode).

6 Chapter 8_System Software


8.3 Operating System Design – OS Layers - Kernel

• The kernel is:


– The core of the OS
– Used by processed manager, the scheduler, the resource manager, and the
I/O manager.
– Responsible for scheduling, synchronization, protection/Security, memory
management, and dealing with interrupts.

7 Chapter 8_System Software


8.3 Operating System Design – OS Layers – Kernel Types

• There are different concepts of kernels:


– Monolithic Kernel
– Micro Kernel

8 Chapter 8_System Software


8.3 Operating System Design – OS Layers – Monolithic Kernel

• Monolithic Kernel is the older approach of which Unix, MS-DOS and


early Mac OS are typical represents of.
• Monolithic systems:
– provide most of their services within a single operating system
program; most of their services are in kernel space.
– give faster execution speed, but are difficult to port from one
architecture to another.

9 Chapter 8_System Software


8.3 Operating System Design – OS Layers - Microkernel

• Microkernel is the approach of which Windows 2000, Mach, and QNX.


• Microkernel systems:
– provide minimal functionality, with most services carried out by
external programs; most of their services are in user space.
– provide better security, easier maintenance, and portability at
the expense of execution speed.

10 Chapter 8_System Software


8.4 Operating System – Device Driver

• Device Driver is:


– is a computer program that operates or controls a particular type of
device that is attached to a computer.
– Special interface that allow the computer to interact with
peripheral devices.
• Many problem on a computer are caused by outdated device drivers.
• OS comes with the ability to connect with default drivers for keyboard
and screen.
• Devices such as printers, scanner and camera you need to install device
drivers.

11 Chapter 8_System Software


Operating Systems - Multiprograming, Multiprocessing, Multithreading

Q4: What is the difference between multiprogramming and multiprocessing?


Multiprogramming and multithreading?

Multiprogramming means having multiple programs (processes/tasks/jobs)


running on one processor (CPU), whereas Multiprocessing means having two
or more processors (CPUs) within a single computer system.

Multiprogramming typically refers to multiple programs (processes/tasks/jobs)


from multiple users, whereas Multithreading generally refers to multiple
threads from one user program (processes/tasks/jobs).

12 Chapter 8_System Software


8.6 Operating System Services

• All operating systems perform four basic functions:


1. Provide a user interface
2. Manage resources; Resources are CPU, main memory, I/O
devices.
3. Manage processes; Programs, tasks, jobs
4. Provide security

13 Chapter 8_System Software


8.6 Operating System Services - Provide A User Interface

• User interface is a program provides system access


• The user interface views the directory structure and requests services
from the operating system that will acquire data from input hardware
devices, such as a keyboard, mouse, or credit card reader, and requests
operating system services to display prompt, status messages and such on
output hardware devices, such as a video monitor or printer.

14 Chapter 8_System Software


8.6 Operating System Services – Process Management
• Process Management is an integral part of any modern day OS. It lies at the heart of
operating system services. The operating system:
– allocate resources (CPU, Memory, and I/O Devices) to processes (jobs/tasks), enable
processes to share and exchange information, protect the resources of each process from
other processes and enable synchronisation among processes.
• OS as manage the CPU as the following:
– The user write a program in HLL
– The program has to be compiled to executable program (executable code), which is stored
in hard disk
– The executable code should be transferred from disk to memory to be accessed by CPU.
– The CPU then can access to this code and execute it to get results.
• Process Management includes the following:
– New State: when the user initiate program/job/task/process for execution, it will be a new
state. This program should wait till get a space in memory.
– Ready state: The loader will load the program to the memory, it will be ready state. This
program should be read by CPU to be executed by it.
– Active State: CPU Scheduler will take one of the programs for execution, it will be active
state.
– Halted Sate: when the execution of the program is finished, it will be in halted state

15
8.6 Operating System Services - Process Management–
Multitasking Process - Time slicing.

• Time slicing is an OS time management method


– Allocate small segment of CPU time; CPU Burst, to each process that are
running one after another
– Illusion of simultaneous execution
– Attributable to the different speeds of devices
– CPU executes billions of instructions per second
– Memory, keyboard, monitor, and network adapter slower by many orders
of magnitude
– CPU multitasks while waiting

16 Chapter 8_System Software


8.6 Operating System Services - Process Management–
Scheduling Algorithms

• Four approaches to CPU scheduling are:


– First-come, first-served (FCFS), where jobs are serviced in arrival
sequence and run to completion if they have all of the resources they
need.
– Shortest job first (SJF), where the smallest jobs get scheduled first.
(The trouble is in knowing which jobs are shortest!)
– Round robin (RR) scheduling where each job is allotted a certain
amount of CPU time. A context switch occurs when the time expires.
– Priority scheduling preempts a job with a lower priority when a higher-
priority job needs the CPU.

17 Chapter 8_System Software


8.6 Operating System Services - Manage Processes –
Scheduling Algorithms – FCFS Example

18 Chapter 8_System Software


8.6 Operating System Services - Manage Processes –
Scheduling Algorithms - RR Example

19 Chapter 8_System Software


8.9 Operating System – Memory Management

• Memory management is the function of a computer OS responsible


for managing the computer's Primary Memory.
• The memory management function keeps track of the status of each
memory location, either allocated or free.
• It determines how memory is allocated among competing processes,
deciding who gets memory, when they receive it, and how much they
are allowed.

20 Chapter 8_System Software


8.4 Programming Tools

• Programming tools carry out the mechanics of software creation


within the confines of the operating system and hardware
environment.
• Assembly language is considered a “second generation”
programming language (2GL).
• Compiled programming languages, such as C, C++, Pascal, and
COBOL, are “third generation” languages (3GLs).
• Each language generation presents problem solving tools that are
closer to how people think and farther away from how the machine
implements the solution.

21 Chapter 8_System Software


8.4 Programming Tools

Keep in mind that the computer can understand only the 1GL!

22 Chapter 8_System Software


8.4 Programming Tools – Compiler and Interpreter

• There are two ways to run programs written in a high-level language:


– The most common is to compile the program.
– The other method is to pass the program through an interpreter.

• A compiler translates all of the statements from a program and


converts them into a computer language (machine language)

• An interpreter translates program statements one by one into a


language the computer understand, and that why the interpreter is
slower than compiler.

23 Chapter 8_System Software


8.4 Programming Tools – Compiler Stages (Compilation Process)

Compiler Phases are:

24 Chapter 8_System
Software

Vous aimerez peut-être aussi