0% found this document useful (0 votes)
5 views

Lecture Week 04

Uploaded by

Red Magic
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lecture Week 04

Uploaded by

Red Magic
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

CS0001A

Introduction to Computing
Lecture 4: Operating Systems

Dr Malcolm Clarke

1.0
Lecture Outline
• The history of operating systems
• Operating system architecture
• coordinating the machine’s
activities
• handling competition among
processes
• Security
0-2 2
Learning Outcomes
After this lecture you will be able to
• understand the concepts of
– Operating systems
– Activity coordination
– Competition among processes
• have an idea how an operating system
works

0-3 3
Definition and functions of
operating systems
Definition:
– An operating system is the software that
controls the overall operation of a
computer system.
Functions:
– Oversee operation of computer
– Store and retrieve files
– Schedule programs for execution
– Coordinate the execution of programs
0-4 4
Evolution of shared computing

• Batch processing
• Interactive processing
– Requires real-time processing
• Time-sharing/Multitasking
– Implemented by multiprogramming
• Multiprocessor machines

0-5 5
Batch processing

0-6 6
Interactive processing

0-7 7
Types of software
• Application software
– Performs specific tasks for users
• System software
– Provides infrastructure for application
software
– Consists of operating system and utility
software

0-8 8
Software classification

0-9 9
Operating system components
• User Interface: Communicates with users
– Text based (Shell)
– Graphical user interface (GUI)
• Kernel: Performs basic required functions
– File manager
– Device drivers
– Memory manager
– Scheduler and dispatcher

0-10 10
The user interface act as an
intermediary between users and the
operating system kernel

0-11 11
File Manager
• Directory (or Folder): A user-created
bundle of files and other directories
(subdirectories)
• Directory Path: A sequence of
directories within directories

0-12 12
Memory Manager
• Allocates space in main memory
• May create the illusion that the
machine has more memory than it
actually does (virtual memory) by
playing a “shell game” in which blocks
of data (pages) are shifted back and
forth between main memory and mass
storage

0-13 13
Getting it started (Bootstrapping)

• Boot loader: Program in ROM


(example of firmware)
– Run by the CPU when power is turned on
– Transfers operating system from mass
storage to main memory
– Executes jump to operating system

0-14 14
The booting process

0-15 15
Processes
• Process: The activity of executing a
program
• Process State: Current status of the
activity
– Program counter
– General purpose registers
– Related portion of main memory

0-16 16
Process administration
• Scheduler: Adds new processes to the
process table and removes completed
processes from the process table
• Dispatcher: Controls the allocation of
time slices to the processes in the
process table
– The end of a time slice is signaled by an
interrupt.

0-17 17
Time-sharing between
process A and process B

0-18 18
Handling competition for resources

• Semaphore: A “control flag”


• Critical Region: A group of
instructions that should be executed
by only one process at a time
• Mutual exclusion: Requirement for
proper implementation of a critical
region

0-19 19
A deadlock resulting from competition for
nonshareable railroad intersections

0-20 20
Deadlock
• Processes block each other from
continuing
• Conditions required for deadlock
– Competition for non-sharable
resources
– Resources requested on a partial basis
– An allocated resource cannot be
forcibly retrieved

0-21 21
Security
• Attacks from outside • Attacks from within
– Problems – Problem: Unruly
• Insecure processes
passwords – Counter measures:
• Sniffing Control process
software activities via
– Counter measures privileged modes
• Auditing and privileged
software instructions

0-22 22
Next Lecture

• Next lecture: Networking and


Internet – I

0-23 23

You might also like