0% found this document useful (0 votes)
25 views7 pages

Chapter 1 OS Notes

An operating system is a program that manages computer hardware and provides a platform for application programs, aiming to enhance user convenience and resource efficiency. It can be viewed from user and system perspectives, where it acts as a resource allocator and control program. Various system architectures, including single-processor, multiprocessor, and clustered systems, are discussed, highlighting their features and advantages in resource management and reliability.

Uploaded by

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

Chapter 1 OS Notes

An operating system is a program that manages computer hardware and provides a platform for application programs, aiming to enhance user convenience and resource efficiency. It can be viewed from user and system perspectives, where it acts as a resource allocator and control program. Various system architectures, including single-processor, multiprocessor, and clustered systems, are discussed, highlighting their features and advantages in resource management and reliability.

Uploaded by

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

CS4TH3: OPERATING SYSTEM CHAPTER 1

CHAPTER-1

Introduction to operating systems

Definition: - 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.
Operating system goals: -

 An operating system makes a computer system more convenient to use.


 An operating system allows the computer system resources to be used in an
efficient manner.
 Execute user programs and make solving user problems easier.

1.1 What Operating Systems Do:

A computer system can be divided roughly into four components: -


1. Hardware
2. Operating system
3. Application programs
4. Users

Fig 1.1 Abstract view of the components of a computer system

Prepared by: Sharath Babu CG, Asst. Prof, Dept. of CSE, S.S.I.T, 1
Tumkur
CS4TH3: OPERATING SYSTEM CHAPTER 1

The hardware consists of memory, central processing unit (CPU), and the input/output
(I/O) devices. It provides the basic computing resources for the system.

System programs consists of compilers, assemblers and editors.

Application programs such as word processors, spreadsheets, etc


The operating system controls the hardware and coordinates its use among the various
application programs for the various users.
Users- People, machines, other computers

Operating systems can be explored from two viewpoints: that of the user and that of the
system

1.1.1 User View


The user's view of the computer varies according to the interface being used.
 Most of the users sit in front of a personal computer, consisting of a monitor,
keyboard, mouse and system unit. Such a system is designed for one use to
monopolize its resources. In this case, the operating system is designed mostly for
ease of use.
 Mainframe or minicomputers is other type of terminal. Many users are accessing
the same computer through other terminals. These users share resources and may
exchange information. The operating system in such cases is designed to
maximize resource utilization.
 Users sit at workstations connected to networks of other workstations and servers.
These users have dedicated resources at their disposal but they also share
resources such as networking and servers.
 Some computers have little or no user view. Ex: Embedded computers

1.1.2 System View

1. We can view an operating system as a resource allocator.


 A computer system has many resources that may be required to solve a problem:
CPU time, memory space, file storage space, I/O devices and so on.

Prepared by: Sharath Babu CG, Asst. Prof, Dept. of CSE, S.S.I.T, 2
Tumkur
CS4TH3: OPERATING SYSTEM CHAPTER 1

 The operating system acts as the manager of these resources.


 Decides between conflicting request for efficient and fair resource use.

2. Operating system is a control program.


A control program manages the execution of user programs to prevent errors and
improper use of the computer.

 The interrupt must transfer control to the appropriate interrupt service routine.
 The routine would call the interrupt-specific handler. The interrupt routine is called
indirectly through the table, with no intermediate routine needed. Generally, the table
of pointers is stored in low memory (the first 100 or so locations).
 These locations hold the addresses of the interrupt service routines for the various
devices.
 This array, or interrupt vector, of addresses is then indexed by a unique device
number, given with the interrupt request, to provide the address of the interrupt
service routine for the interrupting device.

1.3 Computer-System Architecture

1.3.1 Single-Processor Systems

 On a single-processor system, there is one main CPU capable of executing a general-


purpose instruction set, including instructions from user processes.
 Almost all systems have other special-purpose processors as well. They may come in
the form of device-specific processors, such as disk, keyboard, and graphics
controllers; or, on mainframes, they may come in the form of more general-purpose
processors, such as I/O processors that move data rapidly among the components of
the system.
 All of these special-purpose processors run a limited instruction set and do not run
user processes.
 For example, a disk-controller microprocessor receives a sequence of requests from
the main CPU and implements its own disk queue and scheduling algorithm.
 PCs contain a microprocessor in the keyboard to convert the keystrokes into codes to
be sent to the CPU.

Prepared by: Sharath Babu CG, Asst. Prof, Dept. of CSE, S.S.I.T, 3
Tumkur
CS4TH3: OPERATING SYSTEM CHAPTER 1

1.3.2 Multiprocessor Systems

Multiprocessor systems (also known as parallel systems or tightly coupled systems)


are growing in importance. Suchsystems have two or more processors in close
communication, sharing the computer bus and sometimes the clock, memory, and
peripheral devices.

Multiprocessor systems have three main advantages:

1. Increased throughput: By increasing the number of processors, we expect to get


more work done in less time.
2. Economy of scale: Multiprocessor systems can cost less than equivalent multiple
single-processor systems, because they can share peripherals, mass storage, and power
supplies.
3. Increased reliability: If functions can be distributed properly among several
processors, then the failure of one processor will not halt the system, only slow it down.

Increased reliability of a computer system is crucial in many applications. The ability to


continue providing service proportional to the level of surviving hardware is called
graceful degradation.

Some systems go beyond graceful degradation and are called fault tolerant, because they
can suffer a failure of any single component and still continue operation.

The multiple-processor systems in use today are of two types:

Asymmetric multiprocessing:

 Each processor is assigned a specific task.


 A master processor controls the system; the other processors either look to the master
for instruction or have predefined tasks.
 This scheme defines a master-slave relationship.
 The master processor schedules and allocates work to the slave processors.

Symmetric multiprocessing:

 Each processor performs all tasks within the operating system.


 SMP means that all processors are peers; no master-slave relationship exists between
processors.

Prepared by: Sharath Babu CG, Asst. Prof, Dept. of CSE, S.S.I.T, 4
Tumkur
CS4TH3: OPERATING SYSTEM CHAPTER 1

Features of multiprocessor systems:

1. If one processor fails, then another processors should retrieve the interrupted
process state so that execution of the process can continue.
2. The processors should support efficient context switching operation.
3. Multiprocessor system supports large physical address space and large virtual
address space.
4. The IPC mechanism should be provided and implemented in hardware as it
becomes efficient and easy.

1.3.3 Clustered Systems

 Clustered systems gather together multiple CPUs to accomplish computational work.


 Clustered systems differ from multiprocessor systems, however, in that they are
composed of two or more individual systems coupled together.
 Clustered computers share storage and are closely linked via a local-area network
(LAN).
 Clustering is usually used to provide high-availability service; that is, service will
continue even if one or more systems in the cluster fail.
 High availability is generally obtained by adding a level of redundancy in the system.
 Clustering can be structured asymmetrically or symmetrically.
 Asymmetric clustering:

 One machine is in hot-standby mode while the other is running the


applications. The hot-standby host machine does nothing but monitor the active
server. If that server fails, the hot-standby host becomes the active server.

 Symmetric clustering:

 Two or more hosts are running applications, and are monitoring each other.
This mode is obviously more efficient, as it uses all of the available hardware. It
does require that more than one application be available to run.

Prepared by: Sharath Babu CG, Asst. Prof, Dept. of CSE, S.S.I.T, 5
Tumkur
CS4TH3: OPERATING SYSTEM CHAPTER 1

 Clusters include parallel clusters and clustering over a wide-area network


(WAN) (as described in Section 1.10). Parallel clusters allow multiple hosts to
access the same data on the shared storage.
 To provide shared access to data, the system must also supply access control
and locking to ensure that no conflicting operations occur. This function,
commonly known as a distributed lock manager (DLM). Storage-area
networks (SANs), which allow many systems to attach to a pool of storage.

1.4 Operating-System Structure:

 An operating system provides the environment within which programs are executed.
 One of the most important aspects of operating systems is the ability to multi-
program.
 When two or more programs are in memory at the same time, sharing the processor is
referred to the multiprogramming operating system.

The idea is as follows:

 The operating system keeps several jobs in memory simultaneously (Figure 1.7).
 This set of jobs can be a subset of the jobs kept in the job pool which contains all
jobs that enter the system.
 Since the number of jobs that can be kept simultaneously in memory is usually
smaller than the number of jobs that can be kept in the job pool.
 The operating system picks and begins to execute one of the jobs in memory.
 The job may have to wait for some task, such as an I/O operation, to complete.

 In a non-multiprogrammed system, the CPU would sit idle. In a


multiprogrammed system, the operating system simply switches to, and

Prepared by: Sharath Babu CG, Asst. Prof, Dept. of CSE, S.S.I.T, 6
Tumkur
CS4TH3: OPERATING SYSTEM CHAPTER 1

executes, another job. When that job needs to wait, the CPU is switched to
another job, and so on.
 Multiprogrammed systems provide an environment in which the various
system resources are utilized effectively.

Advantage:-Multiprogramming increases CPU utilization by organizing jobs


(code and data) so that the CPU always has one to execute.

Disadvantage:-
1. Multiprogrammed systems do not provide for user interaction with the
computer system.
2. To accommodate many jobs in memory, memory management is required.

Time sharing (or multitasking) is a logical extension of multiprogramming.


 In time-sharing systems, the CPU executes multiple jobs by switching
among them, but the switches occur so frequently that the users can
interact with each program while it is running.
 Time sharing requires an interactive (or hands-on) computer system,
which provides direct communication between the user and the
system.
 User gives instructions to the operating system or to a program
directly, using an input device such as a keyboard or a mouse, and
waits for immediate results on an output device.
 Time sharing and multiprogrammed require that several jobs be kept
simultaneously in memory. If several jobs are ready to be brought into
memory, and if there is not enough room for all of them, then the
system must choose among them. Making this decision is job
scheduling.
 When the operating system selects a job from the job pool, it loads that
job into memory for execution.
 If several jobs are ready to run at the same time, the system must
choose among them. Making this decision is CPU scheduling.
 Swapping: Processes are swapped in and out of main memory to the
disk.
 A more common method for achieving this goal is virtual memory, a
technique that allows the execution of a process that is not completely
in memory. 

Prepared by: Sharath Babu CG, Asst. Prof, Dept. of CSE, S.S.I.T, 7
Tumkur

You might also like