Operating System 2-3
Operating System 2-3
Operating Systems
Lecture 2:
Introduction to Operating
System
Dr. Anjali
Assistant Professor
Chapter 1: Introduction
1
18-01-2025
2
18-01-2025
Four
Components
of a Computer
System
What
Operating
Users of dedicate systems such as workstations have
dedicated resources but frequently use shared
resources from servers
Systems Do
Handheld computers are resource poor, optimized for
Depends on the point of view usability and battery life
3
18-01-2025
4
18-01-2025
Computer Startup
Computer System
Organization
• Computer-system operation
• One or more CPUs, device
controllers connect through
common bus providing access to
shared memory
• Concurrent execution of CPUs and
devices competing for memory
cycles
10
5
18-01-2025
Computer-System Operation
11
Interrupt Timeline
12
6
18-01-2025
I/O Structure
13
The basic unit of computer storage is the bit. A bit can contain one of two
values, 0 and 1. All other storage in a computer is based on collections of bits.
Given enough bits, it is amazing how many things a computer can represent:
numbers, letters, images, movies, sounds, documents, and programs, to name
a few. A byte is 8 bits, and on most computers it is the smallest convenient
chunk of storage. For example, most computers don’t have an instruction to
move a bit but do have one to move a byte. A less common term is word,
which is a given computer architecture’s native unit of data. A word is made up
of one or more bytes. For example, a computer that has 64-bit registers and 64-
bit memory addressing typically has 64-bit (8-byte) words. A computer executes
many operations in its native word size rather than a byte at a time.
Computer manufacturers often round off these numbers and say that a
megabyte is 1 million bytes and a gigabyte is 1 billion bytes. Networking
measurements are an exception to this general rule; they are given in bits
(because networks move data a bit at a time).
14
7
18-01-2025
Storage Structure
• Main memory – only large storage media that the CPU can access directly
• Random access
• Typically volatile
• Secondary storage – extension of main memory that provides large nonvolatile
storage capacity
• Hard disks – rigid metal or glass platters covered with magnetic recording material
• Disk surface is logically divided into tracks, which are subdivided into sectors
• The disk controller determines the logical interaction between the device and
the computer
• Solid-state disks – faster than hard disks, nonvolatile
• Various technologies
• Becoming more popular
15
Storage Hierarchy
16
8
18-01-2025
Storage-
Device
Hierarchy
17
18
9
18-01-2025
19
How a
Modern
Computer
Works
20
10
18-01-2025
Computer-System Architecture
21
Symmetric
Multiprocessing
Architecture
22
11
18-01-2025
A Dual-Core Design
23
24
12
18-01-2025
Clustered Systems
25
26
13
18-01-2025
Memory Layout
for
Multiprogrammed
System
27
Operating-System Operations
28
14
18-01-2025
Operating-System Operations
(cont.)
• Dual-mode operation allows OS to protect itself and other
system components
• User mode and kernel mode
• Mode bit provided by hardware
• Provides ability to distinguish when system is running
user code or kernel code
• Some instructions designated as privileged, only
executable in kernel mode
• System call changes mode to kernel, return from call
resets it to user
• Increasingly CPUs support multi-mode operations
• i.e. virtual machine manager (VMM) mode for guest VMs
29
30
15
18-01-2025
Process Management
31
32
16
18-01-2025
Memory Management
• To execute a program all (or part) of the instructions must be in memory
• All (or part) of the data that is needed by the program must be in memory.
• Memory management determines what is in memory and when
• Optimizing CPU utilization and computer response to users
• Memory management activities
• Keeping track of which parts of memory are currently being used and by
whom
• Deciding which processes (or parts thereof) and data to move into and
out of memory
• Allocating and deallocating memory space as needed
33
Storage Management
34
17
18-01-2025
Mass-Storage Management
Usually disks used Proper Entire speed of OS activities Some storage need
to store data that management is of computer not be fast
does not fit in main central importance operation hinges on
memory or data disk subsystem and
that must be kept its algorithms
for a “long” period
of time Free-space management Tertiary storage includes
Storage allocation optical storage, magnetic
tape
Disk scheduling
Still must be managed –
by OS or applications
Varies between WORM
(write-once, read-many-
times) and RW (read-
write)
35
I/O Subsystem
36
18
18-01-2025
37
38
19