0% found this document useful (0 votes)
9 views20 pages

Lecture 4 Chapter 1

Uploaded by

waqas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views20 pages

Lecture 4 Chapter 1

Uploaded by

waqas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

discover yourself

inspire posterity

Lecture 4

Computer System & Operating System


Overview
10/07/2024 1
discover yourself
inspire posterity

Time-Sharing System
1. Time sharing, or multitasking, is a logical extension of
multiprogramming.
2. Multiple jobs are executed by switching the CPU between
them.
3. In this, the CPU time is shared by different processes, so it is
called as “Time sharing Systems”.
4. Time slice is defined by the OS, for sharing CPU time
between processes.
Examples: Multics, Unix, etc.

10/07/2024 2
discover yourself
inspire posterity

Spooling
Simultaneous Peripheral
Operation On Line

When a running job finished the OS


load a new job from the disk into the
empty partition and run it.

10/07/2024 3
discover yourself
inspire posterity

Instruction Fetch and Execute Cycle

Two steps
1- Processor reads instructions from memory
• Fetches
2- Decoding-Encoding
3- Processor executes each instruction
• Execution

10/07/2024 4
discover yourself
inspire posterity

10/07/2024 5
discover yourself
inspire posterity

Control Registers

• Program Counter (PC)


– Contains the address of an instruction to be fetched NEXT
• Instruction Register (IR)
– Contains the instruction most recently fetched

10/07/2024 6
discover yourself
inspire posterity

10/07/2024 7
discover yourself
inspire posterity

10/07/2024 8
discover yourself
inspire posterity

Instruction Cycle

10/07/2024 9
discover yourself
inspire posterity

Instruction Fetch and Execute

• The processor fetches the instruction from memory.


• Program counter (PC) holds address of the instruction
to be fetched next.
• Program counter is incremented after each fetch.

10/07/2024 10
discover yourself
inspire posterity

PROCESSOR “brain” of computer


it fetches instructions from memory and execute them
• Contains registers, hold temporary results
• Pipeline design
– Separate into 3 units, fetch , decode and execute. While it was executing
instruction “n” it could also be decoding instructions “n+1”and fetching
instructions “n+2”
– Example a
• Super scalar design
– Present of multiple execution units
– Example b

10/07/2024 11
discover yourself
inspire posterity

Ideal memory requirement


– Extremely fast, abundantly large and cheap
Typical memory hierarchy
– Register, internal memory in CPU
– Cache memory, mainly controlled by hardware
– Main memory, often called RAM (Random Accessed Memory)
– Magnetic disk, 2nd storage
– Magnetic tape, 2nd storage

10/07/2024 12
discover yourself
inspire posterity

Structure of a Disk Drive


-Track is
divided into
sectors, 512
bytes per sector
-Outer cylinder
contains more
sectors than the
inner one.
-Moving arm
takes 1msec.

10/07/2024 13
discover yourself
inspire posterity

• Buses, handle the data transfer between CPU and devices


• Structure of a large Pentium system

10/07/2024 14
discover yourself
inspire posterity

ISA (Industry Standard Architecture)


-Invented by IBM
-Runs at 8.33 MHz
-Transfer 2 bytes

PCI (Peripheral Component Interconnect)


-Invented by INTL
-Runs at 66 MHZ
-Transfer 8 bytes

10/07/2024 15
discover yourself
inspire posterity

USB (Universal Serial Bus)


-Used for slow I/O devices
-Share a single USB device driver
-Can be attached without rebooting

SCSI (Small Computer System Interface)


-High performance for fast disks
-Runs at 160MB/see

10/07/2024 16
discover yourself
inspire posterity

Operating System Concepts


1. Processes
2. Deadlocks
3. Memory management
4. I/O
5. Files
6. Security

10/07/2024 17
discover yourself
inspire posterity

Process
• Process in execution & has address space
• Time sharing concept
• All information about each process is stored in
process table of the OS.
Key process management operations
• Process creation and termination
• A process can create one or more other
processes, referred to as child processes
– Process tree
• A created two child processes, B and C
• B created three child processes, D, E,
and F
10/07/2024 18
discover yourself
inspire posterity

Following are some reasons for creation of a process

1. User logs on.


2. User starts a program.
3. Operating systems creates process to provide service,
e.g., to manage printer.
4. Some program starts another process, e.g., Netscape
calls to display a picture.

10/07/2024 19
discover yourself
inspire posterity

The new process terminates the existing process, usually due to


following reasons:

Normal Exist Most processes terminates because they have done


their job.
Error Exist When process discovers a fatal error. For example, a
user tries to compile a program that does not exist.
Fatal Error An error caused by process due to a bug in program
for example dividing by zero.
Killed by another Process A process executes a system call
telling the Operating Systems to terminate some other process. In
UNIX, this call is kill.

10/07/2024 20

You might also like