CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
unit1 part1.ppt
1. Chapter 1: Introduction
• What is an Operating System?
• Mainframe Systems
• Desktop Systems
• Multiprocessor Systems
• Distributed Systems
• Real -Time Systems
• Handheld Systems
Operating System Concepts
2. • Computer System = Hardware + Software
• Software = Application Software + System Software(OS)
• An Operating System is a system Software that acts as an
intermediary/interface between a user of a computer and the
computer hardware.
• Operating system goals:
Execute user programs and make solving user problems
easier
Make the computer system convenient to use
Use the computer hardware in an efficient manner
Operating System Concepts
3. What is an Operating System?
• Computer System = Hardware + Software
• Software = Application Software + System Software(OS)
• An Operating System is a system Software that acts as an
intermediary/interface between a user of a computer and the
computer hardware.
• Operating system goals:
Execute user programs and make solving user problems
easier
Make the computer system convenient to use
Use the computer hardware in an efficient manner
4. Computer System Components
1.Hardware – provides basic computing resources
(CPU, memory, I/O devices).
2.Operating system – controls and coordinates the
use of the hardware among the various
application programs for the various users.
3.Applications programs – define the ways in which
the system resources are used to solve the
computing problems of the users (compilers,
database systems, video games, business
programs).
4.Users (people, machines, other computers).
Operating System Concepts
6. Operating System Definitions
• Resource allocator – manages and
allocates resources.
• Control program – controls the
execution of user programs and
operations of I/O devices .
• User view and System view
• Kernel – the one program running at all
times (all else being application
programs).
Operating System Concepts
8. 1. Process Management
• A process is a program in execution. A process needs certain
resources, including CPU time, memory, files, and I/O devices,
to accomplish its task.
• The operating system is responsible for the following activities
in connection with process management.
• Process creation and deletion.
• process suspension and resumption.
• Provision of mechanisms for:
i. process synchronization
ii. process communication
• Based on priority, it is important to allow more important
processes to execute first than others.
9. 2. Memory management
• Memory is a large array of words or bytes, each with its own address.
• It is a repository of quickly accessible data shared by the CPU and I/O devices.
• Main memory is a volatile storage device. When the computer made turn off
everything stored in RAM will be erased automatically.
• In addition to the physical RAM installed in your computer, most modern
operating systems allow your computer to use a virtual memory system.
Virtual memory allows your computer to use part of a permanent storage
device (such as a hard disk) as extra memory.
• The operating system is responsible for the following activities in connections
with memory management:
Keep track of which parts of memory are currently being used and by
whom.
Decide which processes to load when memory space becomes available.
Allocate and de-allocate memory space as needed.
10. 3. File Management
• A file is a collection of related information defined by its creator.
• File systems provide the conventions for the encoding, storage and
management of data on a storage device such as a hard disk.
FAT12 (floppy disks)
FAT16 (DOS and older versions of Windows)
FAT32 (older versions of Windows)
NTFS (newer versions of Windows)
EXT3 (Unix/Linux)
HFS+ (Max OS X)
• The operating system is responsible for the following activities in connections with file
management:
✦ File creation and deletion.
✦ Directory creation and deletion.
✦ Support of primitives for manipulating files and directories.
✦ Mapping files onto secondary storage.
✦ File backup on stable (nonvolatile) storage media.
11. 4. Device Management or I/O Management
• Device controllers are components on the motherboard (or on expansion cards) that act as an
interface between the CPU and the actual device.
• Device drivers, which are the operating system software components that interact with the
devices controllers.
• A special device (inside CPU) called the Interrupt Controller handles the task of receiving
interrupt requests and prioritizes them to be forwarded to the processor.
• Deadlocks can occur when two (or more) processes have control of different I/O resources
that are needed by the other processes, and they are unwilling to give up control of the
device.
• It performs the following activities for device management.
Keeps tracks of all devices connected to system.
Designates a program responsible for every device known as Input/output controller.
Decides which process gets access to a certain device and for how long.
Allocates devices in an effective and efficient way.
Deallocates devices when they are no longer required.
12. 5. Security & Protection
• The operating system uses password
protection to protect user data and similar
other techniques.
• It also prevents unauthorized access to
programs and user data by assigning access
right permission to files and directories.
• The owners of information stored in a
multiuser or networked computer system may
want to control use of that information,
concurrent processes should not interfere
with each other.
13. 6. User Interface Mechanism
• A user interface (UI) controls how you enter
data and instructions and how information is
displayed on the screen
• There are two types of user interfaces
1. Command Line Interface
2. Graphical user Interface
14. 1. Command-line interface
• In a command-line interface, a user types
commands represented by short keywords or
abbreviations or presses special keys on the
keyboard to enter data and instructions
15. 2. Graphical User Interface
• With a graphical user interface (GUI), you
interact with menus and visual images
16. History of Operating System
The First Generation (1940's to early 1950's)
No Operating System
All programming was done in absolute machine language, often by wiring up plug-
boards to control the machine’s basic functions.
The Second Generation (1955-1965)
First operating system was introduced in the early 1950's.It was called GMOS
Created by General Motors for IBM's machine the 701.
Single-stream batch processing systems
The Third Generation (1965-1980)
Introduction of multiprogramming
Development of Minicomputer
The Fourth Generation (1980-Present Day)
Development of PCs
Birth of Windows/MaC OS
17. Mainframe Systems
• These were the first computers used to tackle
many commercial and scientific applications
• Simple batch systems
• Multiprogrammed systems
• Time sharing systems
Operating System Concepts
18. Simple Batch Systems
• Early computers were physically enormous
machines run from a console
• The common input devices were card readers and
tape drives
• The output devices were line printers, tape drives
and card punches.
• The user did not directly interact with the system
• The user prepared a job which includes program,
data and control information about the nature of
the job (control cards) and submitted it to the
computer operator.
Operating System Concepts
19. Simple Batch Systems
• The job was usually in the form of punch
cards.
• at some later time the output appeared
• Output consisted of the result of the program
as well as a dump of the final memory and
register contents for debugging
• The OS in these early computers was fairly
simple
• It’s major task was to transfer control
automatically from one job to the next.
Operating System Concepts
20. Batch Operating System
• The OS was always resident in memory
• This type of OS accepts more than one jobs and these
jobs are batched/ grouped together according to their
similar requirements.
• This is done by computer operator.
• Whenever the computer becomes available, the
batched jobs are sent for execution and gradually the
output is sent back to the user.
• It allowed only one program at a time.
• This OS is responsible for scheduling the jobs according
to priority and the resource required.
Operating System Concepts
22. Simple Batch Systems
• Reduce setup time by batching similar
jobs
• Automatic job sequencing –
automatically transfers control from
one job to another.
• First rudimentary operating system.
Operating System Concepts
23. 2. Multiprogramming Operating
System:
• This type of OS is used to execute more than one jobs
simultaneously by a single processor.
• A single user cannot ,keep the CPU or the I/O devices busy
at all times.
• Multiprogramming increases CPU utilization by organizing
jobs so that the CPU always has one job to execute.
• The concept of multiprogramming is described as follows:
* All the jobs that enter the system are stored in the job
pool( in disc).
*The operating system picks and begins to execute one of
the jobs in the main memory and begins to execute.
Operating System Concepts
24. 2. Multiprogramming Operating
System:
*During execution, the job may have to wait for some
task, such as an I/O operation, to complete.
* In a multiprogramming system, the operating system
simply switches to ,and executes another job . When
that job needs to wait, the CPU is switched to another
job, and so on.
• When the first job finishes waiting and it gets the CPU
back.
• As long as at least one job needs to execute, the CPU is
never idle.
• Multiprogramming operating systems use the
mechanism of job scheduling and CPU scheduling.
Operating System Concepts
26. OS Features Needed for Multiprogramming
• I/O routine supplied by the system.
• Memory management – the system
must allocate the memory to several
jobs.
• CPU scheduling – the system must
choose among several jobs ready to
run.
• Allocation of devices.
Operating System Concepts
27. Advantages of Batch Operating System:
Processors of the batch systems know how long the job would
be when it is in queue
Multiple users can share the batch systems
The idle time for the batch system is very less
It is easy to manage large work repeatedly in batch systems
Disadvantages of Batch Operating System:
The computer operators should be well known with batch
systems
Batch systems are hard to debug
It is sometimes costly
The other jobs will have to wait for an unknown time if any job
fails
Examples of Batch based Operating System: IBM's MVS
Operating System Concepts
28. Time sharing (or multitasking) OS
Time sharing (or multitasking) OS is a logical extension
of multiprogramming.
It provides extra facilities such as:
• Faster switching between multiple jobs to make
processing faster.
• Allows multiple users to share computer system
simultaneously.
• The users can interact with each job while it is running.
• The user gives instructions to the OS using keyboard or
mouse and waits for immediate results and the
response time should be short.
Operating System Concepts
29. Time sharing (or multitasking) OS
• These systems uses the concept of virtual
memory for effective utilization of memory
space.
• Hence, in this OS, no jobs are discarded.
• Each one is executed using virtual memory
concept.
• It uses CPU scheduling, memory management,
disc management and security management.
• Examples: CTSS, MULTICS, CAL, UNIX,windows
etc.
Operating System Concepts
30. Time sharing (or multitasking) OS
• Allows multiple users to share computer
system simultaneously.
• As the system switches from one user to the
next ,each user is given the impression that
the entire system is dedicated to his/her use,
even though it is being shared among many
users.
Operating System Concepts
31. Time-Sharing Systems–Interactive Computing
• A time shared operating system uses CPU
scheduling and multi-programming to provide
each user with a small portion of a shared
computer at once.
• Each user has at least one separate program in
memory.
• A program loaded into memory and executes, it
performs a short period of time either before
completion or to complete I/O.
• This short period of time during which user gets
attention of CPU is known as time slice, time slot
or quantum.
Operating System Concepts
32. Time sharing (or multitasking) OS
• Time shared operating systems are more complex
than multiprogrammed operating systems.
• In both, multiple jobs must be kept in memory
simultaneously, so the system must have memory
management and security.
• To achieve a good response time, jobs may have to
swap in and out of disk from main memory which
now serves as a backing store for main memory.
• A common method to achieve this goal is virtual
memory, a technique that allows the execution of a
job that may not be completely in memory.
Oper
ating System Concepts
34. Time-Sharing Operating Systems
• For example a mainframe computer that has
many users logged on to it.
• Each user uses the resources of the
mainframe -i.e. memory, CPU etc.
• The users feel that they are exclusive user of
the CPU, even though this is not possible with
one CPU i.e. shared among different users.
Operating System Concepts
35. Time-Sharing Operating Systems
• Advantages of Time-Sharing OS:
Each task gets an equal opportunity
Fewer chances of duplication of software
CPU idle time can be reduced
• Disadvantages of Time-Sharing OS:
Reliability problem
One must have to take care of the security and integrity of user
programs and data
Data communication problem
• Examples of Time-Sharing Oss
Multics, Unix, etc.
Operating System Concepts
36. Personal computer
Systems/Desktop Systems
• Personal computers – computer system
dedicated to a single user.
• I/O devices – keyboards, mice, display
screens, small printers.
• User convenience and responsiveness.
• May run several different types of operating
systems (Windows, MacOS, UNIX, Linux)
Operating System Concepts
37. Personal computer
Systems/Desktop Systems
• The PC operating system is designed for maximizing user
convenience and responsiveness.
• This system is neither multi-user nor multitasking.
• These systems include PCs running Microsoft Windows
and the Apple Macintosh.
• The MS-DOS operating system from Microsoft has been
superseded by multiple flavors of Microsoft Windows
and IBM has upgraded MS-DOS to the OS/2 multitasking
system.
• The Apple Macintosh operating system has been ported
to more advanced hardware, and includes features such
as virtual memory and multitasking
Operating System Concepts
38. Parallel Systems(multiprocessor
systems)
• Most computer systems are single processor systems i.e they
have only one processor.
• Multiprocessor operating systems are also known as parallel
OS or tightly coupled OS.
• Such operating systems have more than one processor in
close communication that sharing the computer bus, the clock
and sometimes memory and peripheral devices.
• It executes multiple jobs at same time and makes the
processing faster.
Operating System Concepts
40. Parallel Systems(multiprocessor
systems)
• Multiprocessor systems have three main advantages:
1. Increased throughput: By increasing the number of
processors, the system performs more work in less
time.
2. Economy of scale: Multiprocessor systems can save
more money than multiple single-processor
systems, because they can share peripherals, mass
storage, and power supplies.
Operating System Concepts
41. Parallel Systems(multiprocessor
systems)
3. Increased reliability: If one processor fails to done
its task, then each of the remaining processors must
pick up a share of the work of the failed processor.
The failure of one processor will not halt the
system, only slow it down.
The ability to continue providing service
proportional to the level of surviving hardware is
called graceful degradation.
Systems designed for graceful degradation are called
fault tolerant.
Operating System Concepts
42. Parallel Systems(multiprocessor
systems)
• The multiprocessor operating systems are
classified into two categories:
1. Symmetric multiprocessing system (SMP)
2. Asymmetric multiprocessing system
Operating System Concepts
43. Parallel Systems(multiprocessor
systems)
In symmetric multiprocessing system, each processor runs an
identical copy of the operating system, and these copies
communicate with one another as needed.
– Many processes can run at once without performance
deterioration.
– Each processor concurrently runs a copy of the OS
– N processes can run if there are N CPUs
– Most modern operating systems support SMP
– Eg:WindowsNT,Linux,Solaris
Operating System Concepts
45. Parallel Systems(multiprocessor
systems)
In asymmetric multiprocessing system, a processor is
called master processor that controls other
processors called slave processor.
Thus, it establishes master-slave relationship.
The master processor schedules the jobs and
manages the memory for entire system.
More common in extremely large systems
Sun’s OS SunOS Version 4 provides asymmetric
multiprocessing ,whereas version5 (solaris 2) is
symmetric .
Operating System Concepts
46. Distributed Operating Systems
• A network is a communication path between two
or more systems,distributed systems depend on
networking for their functionality.
• In distributed system, the different machines are
connected in a network and each machine has its
own processor and own local memory.
• In this system, the operating systems on all the
machines work together to manage the collective
network resource.
• It can be classified into two categories:
• Client-Server systems
• Peer-to-Peer systems
Operating System Concepts
48. Distributed Operating Systems
• Requires networking infrastructure.
• types of networks-Local area networks (LAN)
Wide area networks (WAN) and MAN
• Media include copper wires,fibre optic
cables,microwave etc
Operating System Concepts
49. Distributed Systems
• Distribute the computation among several physical
processors.
• Loosely coupled system – each processor has its own local
memory; processors communicate with one another
through various communications lines, such as high-speed
buses or telephone lines.
• Advantages of distributed systems.
– Resources Sharing
– Computation speed up – load sharing
– Reliability
– Communications
Operating System Concepts
50. Distributed Systems (cont)
• Requires networking infrastructure.
• Local area networks (LAN) or Wide
area networks (WAN)
• May be either client-server or peer-to-
peer systems.
Operating System Concepts
51. Client server systems
• Centralized systems act as server systems to satisfy
requests generated by client systems
• Server systems can be broadly categorized as
compute servers and file servers
• compute servers provide an interface to which
clients can send requests to perform an action,In
response to which they execute the action and send
back result to the client
• File server systems provide a file system interface
where clients can create,update,read and delete files
Operating System Concepts
53. Peer to peer systems
• Peer-to-peer network operating systems allow users to share
resources and files located on their computers and to access
shared resources found on other computers.
• However, they do not have a file server or a centralized
management source .
• In a peer-to-peer network, all computers are considered
equal; they all have the same abilities to use the resources
available on the network.
• Peer-to-peer networks are designed primarily for small to
medium local area networks.
• Nearly all modern desktop operating systems, such as
Macintosh OSX, Linux, and Windows, can function as peer-to-
peer network operating systems.
• Operating System Concepts
55. Real-Time Systems
• A real-time operating system (RTOS) is a multitasking
operating system intended for applications with fixed
deadlines (real-time computing).
• Such applications include some small embedded
systems, automobile engine controllers, industrial
robots, spacecraft, industrial control, and some large-
scale computing systems.
• The real time operating system can be classified into
two categories:
• 1. hard real time system and
• 2. soft real time system.
Operating System Concepts
56. Real-Time Systems
• Often used as a control device in a
dedicated application such as controlling
scientific experiments, medical imaging
systems, industrial control systems, and
some display systems.
• Well-defined fixed-time constraints.
• Real-Time systems may be either hard or
soft real-time.
Operating System Concepts
57. Real-Time Systems (Cont.)
• Hard real-time:
• A hard real-time system guarantees that critical tasks be
completed on time.
• This goal requires that all delays in the system be bounded,
from the retrieval of stored data to the time that it takes the
operating system to finish any request made of it.
• Such time constraints dictate the facilities that are available
in hard real-time systems.
– Secondary storage is limited or absent, data stored in
short term memory, or read-only memory (ROM)
– Conflicts with time-sharing systems, not supported by
general-purpose operating systems.
Operating System Concepts
58. Real-Time Systems (Cont.)
• Soft real-time
• A soft real-time system is a less restrictive type of real-
time system.
• Here, a critical real-time task gets priority over other tasks
and retains that priority until it completes.
• Soft real time system can be mixed with other types of
systems.
• Due to less restriction, they are risky to use for industrial
control and robotics.
– Limited utility in industrial control of robotics
– Useful in applications (multimedia, virtual reality)
requiring advanced operating-system features.
Operating System Concepts