Class: Bsse Semester 4 Credit Hours (3+1)
Class: Bsse Semester 4 Credit Hours (3+1)
ASSIGNMENTS(4) 10
QUIZZES(4) 10
FINAL EXAM 50
08/25/20
3
1 INTODUCTION TO OS, 16 SCHEDULER ALGORITHM
12 THREADS 27
13 IMPLEMENTING THREADS 28
overview
BOOK:
Operating System Concepts
by Galvin , 8th Edition
08/25/20
5
What is OS
OS Organization
Different Definitions of OS
Computer hardware overview
OS brief History
Overview of:
OS Structure
Types of OS
Functions/Goals of OS
Services of OS
Computing environments
08/25/20
6
Act as intermediary between User, and
computer H/W
Kernel – the one program running at all times (all else being application
programs)
08/25/20
8
HARDWARE
• Input hardware (mouse, keyboard, CPU)
• Output hardware (Monitor, Printer)
SOFTWARE
• SYSTEM SOFTWARE(OS AND UTILITY S/W)
• USER/APPLICATION SOFTWARE
Assembler Paint
Linker Database
08/25/20
10
08/25/20
11
Assume we are using MS-Paint over Windows - when do
we need to access the OS?
Loading the application / terminating the application
Memory allocation / management
Access to IO devices – keyboard, mouse, printer, monitor
CPU allocation
Copy / Paste (inter-process communication)
08/25/20
12
08/25/20
13
User
programs
08/25/20
14
08/25/20
15
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
(through memory controller)
08/25/20
16
• I/O devices and the CPU can execute concurrently
08/25/20
17
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting
• Coordination between other software and users
• Efficient use of computer resources
08/25/20
18
• MEMORY:
Main memory is a large array of words
Has its own address
Fast storage, access directly by the CPU.
• Memory management activities
Keeps tracks of primary memory
Decides which process will get memory
when and
how much
Allocates the memory when the process requests
De-allocates the memory
08/25/20
19
OS decides which process gets the processor
when and how much time called
Process scheduling
Activities:
• Keeps tracks of processor
• Status of process
• Allocates the processor(CPU) to a process.
• De-allocates processor when processor is no longer required
08/25/20
20
OS manages device communication via drivers.
Operating
Activities for device management.
Keeps tracks of all devices. Program responsible for this task is known
as the I/O controller.
De-allocates devices
08/25/20
21
File system is organized into directories
Activities for file management
Keeps track of information,
location
uses
status etc.
Decides who gets the resources.
Allocates the resources.
De-allocates the resources.
08/25/20
22
Security – defense of the system against internal and external attacks
• Huge range, including denial-of-service, worms, viruses, identity theft,
theft of service
Systems generally first distinguish among users, to determine who can do
what
• User identities (user IDs, security IDs)
• User ID then associated with all files, processes of that user to
determine access control
• Group identifier (group ID) allows set of users to be defined and
controls managed,
• then also associated with each process, file
Protection
• Any mechanism for controlling access of processes or users to
resources defined by the OS
08/25/20
23
Control over system performance --
• Recording delays between request for a service and response from the
system.
Job accounting --
• Keeping track of time and resources used by various jobs and users.
Error detecting
• Production error messages and other debugging and error detecting
• Coordination between other software and users
• Coordination and assignment of compilers, interpreters, assemblers and
other software to the various users of the computer systems
Efficient use of computer resources
08/25/20
24
Program execution
I/O operations
File System manipulation
Communication
Error Detection
Resource Allocation
Protection
08/25/20
25
Batch processing:
08/25/20
26
Mainframe Systems:
Reduce setup time by batching similar jobs
Automatic job sequencing – automatically transfers
control from one job to another.
Resident monitor
• initial control in monitor
• control transfers to job
• when job completes control transfers pack to monitor
08/25/20
27
Multitasking:
08/25/20
28
Multi-programmed Batch Systems
• Several jobs are kept in main memory at the same time
08/25/20
29
Multiprogramming:
08/25/20
30
OS Features Needed for Multiprogramming:
• Allocation of devices
08/25/20
31
An operating system is a program that manages the computer
hardware. It also provides a basis for application programs and acts
as an intermediary between the computer user and the computer
hardware. An amazing aspect of operating systems is how varied
they are in accomplishing these tasks. Mainframe operating systems
are designed primarily to optimize utilization of hardware.
08/25/20
32
Operating system components:
• Hardware
• Operating system
• Applications programs
• Users
Computer system organization
• Applications
• User program
• Utilities
• Operating system
• hardware
Hardware Architecture
08/25/20
33
Goals or function of OS
• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software and users
• Efficient use of computer resources
• Memory management – the system must allocate the memory to several
jobs.
• CPU scheduling – the system must choose among several jobs ready to run.
08/25/20
34
https://www.youtube.com/watch?
v=nZRqPctQf8U&list=PLTZbNwgO5ebqnympIYe2GX
4hjjsS9Psdm
08/25/20
35