Computer System Overview: Operating System - CE122 Weeks - 01

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 31

Operating System – CE122

Computer System Overview


Weeks – 01
eddypn@gmail.com
Peraturan
• Kehadiran 80%
• Maksimal keterlambatan 30 Menit
• Quiz dilaksanakan sewaktu-waktu

2
Penilaian
– UTS (10-40%)
– UAS (20-40%)
– Quiz (5-10%)
– Tugas (10-40%)
– Pre -Test (0-10%)
– Post-Test (0-10%)

3
Referensi
[Stallings2001] William Stallings. Hak Cipta ©
2001. Operating Systems.
Prentice Hall.

[Tanenbaum1992] Andrew S. Tanenbaum. Hak


Cipta © 1992.
Modern Operating Systems. Prentice-Hall Inc..

[Silberschatz2000] Avi Silberschatz, Peter Galvin,


dan Grag Gagne. Hak Cipta © 2000.
Operating Systems CONCEPTS
4
Visi Politeknik Telkom

“Menjadi politeknik
unggulan di asia
tenggara”
5
Operating System
• Definition:
– System:
• “A group of interacting, interrelated, or
interdependent elements or parts that function
together as a whole to accomplish a goal.”

– Operating System
• “program that manages a computer’s resources,
especially the allocation of those resources among
other programs. Typical resources include the central
processing unit (CPU), computer memory, file
storage, input/output (I/O) devices, and network
connections. Management tasks include scheduling
resource use to avoid conflicts and interference
between programs. Unlike most programs, which
complete a task and terminate, an operating system
runs indefinitely and terminates only when the
computer is turned off.” 6
Computer
• Basic element’s :
– Processor : Managing computer
operation and data processing
function
– Main Memory : Retain digital data used
for data computing for some interval
time.
– I/O Module : Interaction devices between
user and system.
– Component interconnection : structure
7
Computer - Processor
• Components:
– CU (Control unit) : Controlling operation.
– ALU (Arithmetic logic unit) : Controlling
arithmetic and logic operation.
– Register : Highspeed memory used for
saving the operands from operation.

8
Top-Level Components
Processor Registers
• User-visible registers
– Enable programmer to minimize main-
memory references by optimizing
register use
• Control and status registers
– Used by processor to control operating
of the processor
– Used by operating-system routines to
control the execution of programs
User-Visible Registers
• May be referenced by machine
language
• Available to all programs -
application programs and system
programs
• Types of registers
– Data
– Address
• Index
• Segment pointer
• Stack pointer
User-Visible Registers
• Address Registers
– Index
• involves adding an index to a base value to
get an address
– Segment pointer
• when memory is divided into segments,
memory is referenced by a segment and an
offset
– Stack pointer
• points to top of stack
Control and Status Registers
• Program Counter (PC)
– Contains the address of an instruction to be
fetched
• Instruction Register (IR)
– Contains the instruction most recently fetched
• Program Status Word (PSW)
– condition codes
– Interrupt enable/disable
– Supervisor/user mode
Control and Status Registers
• Condition Codes or Flags
– Bits set by the processor hardware as a
result of operations
– Can be accessed by a program but not
altered
– Examples
• positive result
• negative result
• zero
• Overflow
Computer - Main Memory

Register
Cache Memory
Main Memory Smaller,
Disk Cache Faster,
More
Magnetic Disk
Frequently,
Magnetic Tape
More Expensive

15
Going Down the Hierarchy
• Decreasing cost per bit
• Increasing capacity
• Increasing access time
• Decreasing frequency of access of
the memory by the processor
– locality of reference
Computer - Main Memory
• Two Implemented concept.
– Cache memory :
• High speed.
• Limited capacity.
• Expensive.
• Located between main memory and
processing register.
– Buffering :
• Retain data that transferred from or to
secondary storage.

17
Cache Design
• Write policy
– When the memory write operation takes
place
– Can occur every time block is updated
– Can occur only when block is replaced
• Minimizes memory operations
• Leaves memory in an obsolete state
Disk Cache
• A portion of main memory used as a
buffer to temporarily to hold data for
the disk
• Disk writes are clustered
• Some data written out may be
referenced again. The data are
retrieved rapidly from the software
cache instead of slowly from disk
Cache Memory
• Invisible to operating system
• Increase the speed of memory
• Processor speed is faster than
memory speed
Cache Memory
Cache Memory
• Contains a portion of main memory
• Processor first checks cache
• If not found in cache, the block of
memory containing the needed
information is moved to the cache
Cache/Main Memory System
Cache Design
• Cache size
– small caches have a significant
impact on performance
• Block size
– the unit of data exchanged between
cache and main memory
– hit means the information was found
in the cache
– larger block size more hits until
probability of using newly fetched
data becomes less than the
probability of reusing data that has
been moved out of cache
Computer - I/O Module (1)
• Classification based on data stream.
– Block Oriented Device
• Information saved as fixed sized block.
• Write using Direct access method.
• Example : disk, optical disk, tape, etc.
– Character Stream Oriented Device
• Information saved using character stream.
• Example : terminal, printer line, network
interface.

25
Computer - I/O Module (2)
• Three techniques I/O devices
connection:
– Programmed I/O
– Interrupt Driven I/O
– Direct Memory Access

26
Programmed I/O
• I/O module performs the
action, not the processor
• Sets appropriate bits in the
I/O status register
• No interrupts occur
• Processor checks status
until operation is complete
Interrupt-Driven I/O
• Processor is interrupted when
I/O module ready to exchange
data
• Processor is free to do other
work
• No needless waiting
• Consumes a lot of processor
time because every word read
or written passes through the
processor
Direct Memory Access
• Transfers a block of
data directly to or from
memory
• An interrupt is sent
when the task is
complete
• The processor is only
involved at the
beginning and end of
the transfer
Computer - Component
Interconnection
• Component interconnection called bus.
• Connects all the internal computer
components to the CPU and main memory.
• Three types of Bus:
– Address Bus : bus that used to send memory
address location or port will be read/write.
– Data Bus : Bidirectional transfer, can read and
write to/from memory or port.
– Control Bus : Bus that used by CPU by sending
signal to commanding memory or I/O port.

30
Any Question?

31

You might also like