BiD 10
BiD 10
BiD 10
Nizamettin AYDIN
naydin@yildiz.edu.tr
http://www.yildiz.edu.tr/~naydin
Bilgisayar Donanımı
System Software
2
Introduction
3
Operating Systems - Objectives and Functions
• Convenience
—An operating system makes a computer easier
to use
• Efficiency
—An operating system allows better use of
computer resources
4
Layers and Views of a Computer System
5
Operating System Services
• Program creation
• Program execution
• Access to I/O devices
• Controlled access to files
• System access
• Error detection and response
• Accounting
6
O/S as a Resource Manager
• A computer is a set of resources for the
movement, storage, and processing of
data and for the control of these functions
• The O/S is responsible for managing these
resources
• O/S is a program executed by the
processor
• The O/S frequently relinquishes control
and must depend on the processor to
allow it to regain control
7
Main Resources managed by the O/S
8
Types of Operating System
• Interactive
—User/programmer interacts directly with the
computer through a keyboard/display terminal
• Batch
—Opposite of interactive. Rare
• Single program (Uni-programming)
—Works only one program at atime
• Multi-programming (Multi-tasking)
—Processor works on more than one program at
a time
9
Early Systems
10
Simple Batch Systems
11
Memory Layout for Resident Monitor
12
Multi-programmed Batch Systems
13
Multi-programmed Batch Systems
14
Single Program
15
Multi-Programming with Two Programs
16
Multi-Programming with Three Programs
17
Example- benefits of mutiprogramming
• Consider a computer with 250 MBytes of memory,
a disk, a terminal, and a printer.
— Three programs, JOB1, JOB2, and JOB3, are submitted for
execution at the same time with the following attributes:
18
Utilization histograms
19
Effects of Multiprogramming on Resource Utilization
20
Operating Systems
21
Operating Systems
22
Operating Systems
23
Operating Systems
24
Operating Systems
25
Operating Systems
26
Operating Systems
27
Operating Systems
28
Operating Systems
29
Operating Systems
30
Scheduling
31
Long Term Scheduling
32
Medium Term Scheduling
33
Short Term Scheduler
35
Process Control Block
• Identifier
• State
• Priority
• Program counter
• Memory pointers
• Context data
• I/O status
• Accounting
information
36
Scheduling Example
37
Key Elements of O/S for Multiprogramming
38
Queuing Diagram Representation of
Process Scheduling
39
Operating Systems
40
Programming Tools
41
Programming Tools
42
Programming Tools
43
Programming Tools
45
Programming Tools
46
Programming Tools
47
Programming Tools
Keep in mind that the computer can understand only the 1GL!
48
Programming Tools
49
Programming Tools
50
Programming Tools
51
Programming Tools
52
Java: All of the Above
53
Java: All of the Above
54
Database Software
• Database systems
contain the most
valuable assets of
an enterprise.
They are the
foundation upon
which application
systems are built.
55
Database Software
57
Database Software
58
Database Software
59
Database Software
60
Transaction Managers
61
Transaction Managers
62
Conclusion
63
Conclusion
64
Conclusion
65
Memory Management
66
Memory Management
67
Swapping
68
What is Swapping?
69
Use of Swapping
70
Partitioning
71
Fixed Partitioning
72
Variable Sized Partitions (1)
73
Variable Sized Partitions (2)
74
Effect of Dynamic Partitioning
75
Relocation
76
Paging
77
Allocation of Free Frames
78
Logical and Physical Addresses - Paging
79
Virtual Memory
• Demand paging
—Do not require all pages of a process in
memory
—Bring in pages as required
• Page fault
—Required page is not in memory
—Operating System must swap in required page
—May need to swap out a page to make space
—Select page to throw out based on recent
history
80
Thrashing
• Solutions
—Good page replacement algorithms
—Reduce number of processes running
—Fit more memory
81
Bonus
82
Segmentation
83
Advantages of Segmentation
84
Pentium II
• Hardware for segmentation and paging
• Unsegmented unpaged
— virtual address = physical address
— Low complexity
— High performance
• Unsegmented paged
— Memory viewed as paged linear address space
— Protection and management via paging
— Berkeley UNIX
• Segmented unpaged
— Collection of local address spaces
— Protection to single byte level
— Translation table needed is on chip when segment is in memory
• Segmented paged
— Segmentation used to define logical memory partitions subject to
access control
— Paging manages allocation of memory within partitions
— Unix System V
85
Pentium II Address Translation Mechanism
86
Pentium II Segmentation
88
Pentium II Paging
89
PowerPC Memory Management Hardware
90
PowerPC 32-bit Memory Management Formats
91
PowerPC 32-bit Address Translation
92