11 System Mgmt - web.fsktm.um.edu.myweb.fsktm.um.edu.my/~mazliza/kuliah/OS/11-system-mgmt.pdf ·...

18
29/5/2019 1 SYSTEM MANAGEMENT WIA2004 (11) 1 INTRODUCTION How system components work together. Trade-offs to improve the system’s overall efficiency. How the designer improve the performance of a component. Cost of improvement. How it affect performance of the remainder system. WIA2004 (11) 2

Transcript of 11 System Mgmt - web.fsktm.um.edu.myweb.fsktm.um.edu.my/~mazliza/kuliah/OS/11-system-mgmt.pdf ·...

29/5/2019

1

SYSTEM MANAGEMENTWIA2004 (11)

1

INTRODUCTION

• How system components work together.• Trade-offs to improve the system’s overall efficiency.

• How the designer improve the performance of a component.

• Cost of improvement.• How it affect performance of the remainder system.

WIA2004 (11) 2

29/5/2019

2

EVALUATING AN OS

• To evaluate an OS, you need to understand:• Its design goal,• How it communicates with users,• How its resources are managed, • What trade-offs are made to achieve its goals.

WIA2004 (11) 3

COOPERATION AMONG COMPONENTS

• The performance of a resource depends on the performance of other resources.• E.g., memory mgmt. is linked with device mgmt. when

memory is used to buffer data between a very fast processor and slower secondary storage.

• System improvement can only be made after extensive analysis of the needs of system resources, requirements, managers and users.

WIA2004 (11) 4

29/5/2019

3

COOPERATION AMONG COMPONENTS: ROLE OF MEMORY MANAGEMENT

• When considering increasing memory or changing to another memory allocation scheme, you must consider the operating environment.

• A trade-off between memory use and CPU overhead.• E.g., if the system runs student programs exclusively and

the average job is only 3 pages long, increasing the size of virtual memory won’t speed up throughput because most jobs are too small to use virtual memory effectively.

WIA2004 (11) 5

COOPERATION AMONG COMPONENTS: ROLE OF PROCESSOR MANAGEMENT

• Let’s say you want to implement a multiprogramming system to increase your processor’s utilization.• Multiprogramming requires synchronization between the

Memory Mgr, Processor Mgr and I/O devices.• The trade-off: better use of CPU vs. increased overhead,

lower response time and decreased throughput.

WIA2004 (11) 6

29/5/2019

4

COOPERATION AMONG COMPONENTS: ROLE OF PROCESSOR MANAGEMENT

• Potential problems to monitor:• A system can reach saturation point if the CPU is fully utilized,

but is allowed to accept additional jobs – higher overhead and less time to run programs.

• Under heavy loads, the CPU time required to manage I/O queues can dramatically increase the time required to run jobs.

• With a I/O-heavy mix, long queues can form at the channels, control units and I/O devices, leaving the CPU idle while it waits for processes to finish their tasks.

• Increasing the number of processors increases the overhead required to manage multiple jobs among multiple processors.

WIA2004 (11) 7

COOPERATION AMONG COMPONENTS: ROLE OF DEVICE MANAGEMENT

• Ways to improve I/O device utilization:• Buffering, • Blocking,• Rescheduling I/O requests to optimize access times.

WIA2004 (11) 8

29/5/2019

5

COOPERATION AMONG COMPONENTS: ROLE OF DEVICE MANAGEMENT

WIA2004 (11) 9

COOPERATION AMONG COMPONENTS: ROLE OF DEVICE MANAGEMENT

WIA2004 (11) 10

29/5/2019

6

COOPERATION AMONG COMPONENTS: ROLE OF DEVICE MANAGEMENT

WIA2004 (11) 11

COOPERATION AMONG COMPONENTS: ROLE OF FILE MANAGEMENT

• File organisation is an important performance consideration.

• If a file is stored non-contiguously with several sections stored in separated cylinders, accessing its records sequentially is time consuming.

• Files should be compacted / defragmented so that each section of a file reside near the others.

• Defragmentation takes CPU time and files are unavailable during defragmentation.

WIA2004 (11) 12

29/5/2019

7

COOPERATION AMONG COMPONENTS: ROLE OF FILE MANAGEMENT

• The location of a volume’s directory could affect retrieval time.

• Some systems read the directory into main memory and hold it until the user terminates the session.

• Referring to the previous example:• When the system retrieves the directory from Drive A and

loads it into memory, the first retrieval takes 35 ms • Subsequent access is performed at the CPU’s faster

speed without the need to access the disk.

WIA2004 (11) 13

COOPERATION AMONG COMPONENTS: ROLE OF FILE MANAGEMENT

Disk Drive Access Speed for First Retrieval (ms)

Subsequent Retrievals (ms)

A 35 1.2B 10 1.2C 5 1.2D 50 1.2

WIA2004 (11) 14

Assuming CPU speed is 1.2 ms.

29/5/2019

8

COOPERATION AMONG COMPONENTS: ROLE OF FILE MANAGEMENT

• If there is a sudden power loss and modifications have not been saved to secondary storage, the I/O time that was saved by not accessing secondary storage each time the user retrieves the directory is negated by not having current information in the user’s directory.

• The location of a directory on the disk makes a significant difference in access time.• If directories are stored on the outermost or innermost tracks,

the disk drive arm has to travel farther to access them.• File mgmt. is closely related to the device where the files are

stored.WIA2004 (11) 15

COOPERATION AMONG COMPONENTS: ROLE OF NETWORK MANAGEMENT

• The Network Mgr synchronizes load among remote processors, determines message priorities and selects the most efficient communication paths over multiple data communication lines.

• It allows a network admin to monitor the use of individual computers and shared hardware.

• Simplifies the process of updating data files and programs on networked computers by coordinating changes through a communications server instead of making changes on individual computers.

WIA2004 (11) 16

29/5/2019

9

MEASURING SYSTEM PERFORMANCE

• System performance is the efficiency that a computer system meets its goal, i.e., how well it serves its users.

• Not easily measured.• Affected by 3 components:

• User programs,• OS programs,• Hardware.

• Can be subjective and difficult to quantify, e.g., how do we gauge ease of use?

WIA2004 (11) 17

MEASURING SYSTEM PERFORMANCE:MEASUREMENT TOOLS

• Throughput is a composite measure that indicates the productivity of the system as a whole.• Usually measured under steady-state condition and

reflects quantities.• E.g., number of jobs processed per day, number of online

transactions handled per hour.• Can also be a measure of the volume of work handled

by one unit of the system.

WIA2004 (11) 18

29/5/2019

10

MEASURING SYSTEM PERFORMANCE:MEASUREMENT TOOLS

• Capacity is the maximum throughput level of a resource.• Bottlenecks develop when resources reach their

capacity – the resource become saturated and the processes aren’t passed along.

• E.g., thrashing is caused by a saturated disk .• Bottlenecks can be detected by monitoring the queues

forming at each resource.

WIA2004 (11) 19

MEASURING SYSTEM PERFORMANCE:MEASUREMENT TOOLS

• Response time is the interval required to process user’s request.• Measured from when the user presses the key to send the

message until the system indicates receipt of the message.• For batch jobs, it is known as turnaround time, i.e., the time it

takes from the submission of a job to the return of output.• RT depends on the workload being handled by the system at

the time of request and the type of job/request being submitted.

• Measurement of RT and turnaround time should include their average values and variance.

WIA2004 (11) 20

29/5/2019

11

MEASURING SYSTEM PERFORMANCE:MEASUREMENT TOOLS

• Resource utilization is a measure of how much each unit contributes to the overall operation. • Usually given as a percentage of time that a resource is

in use.• E.g., CPU is busy 90% of time.• Helps an analyst determine whether there is balance

among the units of a system or whether a system is I/O-bound or CPU-bound.

WIA2004 (11) 21

MEASURING SYSTEM PERFORMANCE:MEASUREMENT TOOLS

• Availability is the likelihood that a resource will be ready when a user needs it.• A unit is operational and not out of service when a user

needs it.• E.g., the probability that a printer is ready when a user

needs it.• Measure using mean time between failures (MTBF) and

mean time to repair (MTTR). • 𝐴𝑣𝑎𝑖𝑙𝑎𝑏𝑖𝑙𝑖𝑡𝑦

WIA2004 (11) 22

29/5/2019

12

MEASURING SYSTEM PERFORMANCE:FEEDBACK LOOPS

• To prevent the processor from spending more time doing overhead than executing jobs, the OS continuously monitors the system and send info to the Job Scheduler.

• Job Scheduler decides whether to allow more jobs to enter the system or prevent new jobs from entering until the congestion is relieved.

• A feedback loop can be negative or positive.

WIA2004 (11) 23

MEASURING SYSTEM PERFORMANCE:FEEDBACK LOOPS

WIA2004 (11) 24

29/5/2019

13

MEASURING SYSTEM PERFORMANCE:FEEDBACK LOOPS

WIA2004 (11) 25

PATCH MANAGEMENT• Is a systematic update of the OS and other system software.• A patch is a piece of programming code that

replaces/changes some of the code that makes up the software.

• Why patches are needed:• For vigilant security precautions against constantly changing

system thread,• To assure system compliance with government regulation and

other policies regarding privacy and financial accountability,• To keep the system running at peak efficiency.

• Patching computer system correctly is challenging because of the complexity of each piece of software and interconnections between them.

WIA2004 (11) 26

29/5/2019

14

PATCH MANAGEMENT:PATCHING FUNDAMENTALS

• Steps before patching:• Identify the required patch.• Verify the patch’s source and integrity,• Test the patch in a safe testing environment.• Deploy the patch throughout the system.• Audit the system to gauge the success of the patch

deployment.

WIA2004 (11) 27

PATCH MANAGEMENT:PATCHING FUNDAMENTALS

• Patch identification• When a patch notification is received, identify criticality

of patch.• If critical, apply it as soon as possible.• With every patch announcement, attackers are also

armed with critical info they can use to compromise your system.

• Because software patches have authority to write over existing programming code, they be damaging if not valid.

• Before apply a patch, validate the digital signature of the vendor.

WIA2004 (11) 28

29/5/2019

15

PATCH MANAGEMENT:PATCHING FUNDAMENTALS

• Patch testing• Test the patch on a sample system or an isolated

machine.• If non-networked machine is not available, test on a

development system instead of the working system.• Test to see if the system restarts after patch installation.• Check if the patched software performs its assigned

tasks.• Have a plan for if something goes wrong during

installation – test the contingency plans to uninstall the patch and recover the old software if necessary.

WIA2004 (11) 29

PATCH MANAGEMENT:PATCHING FUNDAMENTALS

• Patch deployment• Patch deployment can be complex for a multiplatform

system with hundreds / thousands of users.• The system admin should maintain a ongoing inventory of

all hardware and software on all computers that need the patch.

• Patch deployment can be launched in stages.• If during the patching, it will be impossible to use the

system, schedule it during low usage time.

WIA2004 (11) 30

29/5/2019

16

PATCH MANAGEMENT:PATCHING FUNDAMENTALS

• Auditing the finished system• Verify that:

• All computers are patched correctly and perform fundamental tasks as expected.

• No users had unexpected or unauthorised versions of software that may not accept the patch.

• No users are left out of the deployment.• Document changes made to the system, and the

success / failure.• Keep a log of all changes for future reference.• Get feedback from the users to verify deployment’s

success.

WIA2004 (11) 31

PATCH MANAGEMENT:SOFTWARE TO MANAGE DEPLOYMENT

• Patches can be installed manually or using a software that automate the task.

• The software can be developed in-house or buy ready-made software.

• 2 types:• Agent-based software requires an agent running on the

target system,• Agentless software.

WIA2004 (11) 32

29/5/2019

17

PATCH MANAGEMENT:TIMING THE PATCH CYCLE

• Non-critical patches can be scheduled as convenient based on:• Calendar events, e.g., monthly or quarterly,• Vendor events, e.g., timed to coincide with a vendor's

service pack release.• Advantage of routine cycle is it allows for thorough

review of the patch and testing cycles before deployment.

WIA2004 (11) 33

SYSTEM MONITORING

• Measuring performance can be implemented using hardware or software.

• Hardware monitor, e.g., hard-wired counters, clocks.• Expensive.• Because it is outside the system and attached

electronically, it has minimum impact on the system• Software monitor

• Relatively inexpensive.• It is part of the system and might distort the results of

analysis.

WIA2004 (11) 34

29/5/2019

18

SYSTEM MONITORING

• Measurements can be done using production programs that are used extensively by users.• Run with different CPUs, OSs and other components.• The results are called benchmark and used to compare

systems that have gone through extensive changes.• Benchmark results are highly dependent on system’s

workload, design and implementation, and specific application requirements.

• Performance data is usually obtained in a rigorously controlled environment, so results might differ in real-life operation.

• Simulation is used when it’s not possible to experiment with the system itself.

WIA2004 (11) 35