0% found this document useful (0 votes)
609 views19 pages

CB3402,OSS BOOK

Computer System Architecture involves the design of hardware components including CPU, memory, and I/O devices, focusing on performance and cost efficiency. Operating systems manage processes, memory, devices, and files, ensuring efficient resource allocation and security. Distributed systems consist of interconnected independent computers that function as a single system, enabling resource sharing and improved reliability.

Uploaded by

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

CB3402,OSS BOOK

Computer System Architecture involves the design of hardware components including CPU, memory, and I/O devices, focusing on performance and cost efficiency. Operating systems manage processes, memory, devices, and files, ensuring efficient resource allocation and security. Distributed systems consist of interconnected independent computers that function as a single system, enabling resource sharing and improved reliability.

Uploaded by

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

Computer System Architecture

Define Computer System Architecture:


The architecture of a computer system encompasses the design and organization of its
hardware components. A typical computer system consists of a Central Processing Unit
(CPU), memory, input/output devices, and storage devices.

A computer system is basically a machine that simplifies complicated tasks. It


should maximize performance and reduce costs as well as power consumption.
The different components in the Computer System Architecture are Input Unit,
Output Unit, Storage Unit, Arithmetic Logic Unit, Control Unit etc.

A diagram that shows the flow of data between these units is as follows −

The input data travels from input unit to ALU. Similarly, the computed data
travels from ALU to output unit. The data constantly moves from storage unit to
ALU and back again. This is because stored data is computed on before being
stored again. The control unit controls all the other units as well as their data.

Details about all the computer units are −

 Input Unit
The input unit provides data to the computer system from the outside. So,
basically it links the external environment with the computer. It takes data
from the input devices, converts it into machine language and then loads
it into the computer system. Keyboard, mouse etc. are the most
commonly used input devices.
 Output Unit
The output unit provides the results of computer process to the users i.e it
links the computer with the external environment. Most of the output data
is the form of audio or video. The different output devices are monitors,
printers, speakers, headphones etc.
 Storage Unit
Storage unit contains many computer components that are used to store
data. It is traditionally divided into primary storage and secondary
storage. Primary storage is also known as the main memory and is the
memory directly accessible by the CPU. Secondary or external storage is
not directly accessible by the CPU. The data from secondary storage
needs to be brought into the primary storage before the CPU can use it.
Secondary storage contains a large amount of data permanently.
 Arithmetic Logic Unit
All the calculations related to the computer system are performed by the
arithmetic logic unit. It can perform operations like addition, subtraction,
multiplication, division etc. The control unit transfers data from storage
unit to arithmetic logic unit when calculations need to be performed. The
arithmetic logic unit and the control unit together form the central
processing unit.
 Control Unit
This unit controls all the other units of the computer system and so is
known as its central nervous system. It transfers data throughout the
computer as required including from storage unit to central processing
unit and vice versa. The control unit also dictates how the memory, input
output devices, arithmetic logic unit etc. should behave.

Operating System Operations


What is computer system operations?
An operation, in computing, is an action that is carried out to accomplish a given task.
There are five basic types of computer operations: inputting, processing, outputting,
storing and controlling.
An operating system is a construct that allows the user application programs
to interact with the system hardware. Operating system by itself does not
provide any function but it provides an atmosphere in which different
applications and programs can do useful work.

The major operations of the operating system are process management,


memory management, device management and file management. These are
given in detail as follows:

Process Management

The operating system is responsible for managing the processes i.e assigning
the processor to a process at a time. This is known as process scheduling. The
different algorithms used for process scheduling are FCFS (first come first
served), SJF (shortest job first), priority scheduling, round robin scheduling etc.

There are many scheduling queues that are used to handle processes in process
management. When the processes enter the system, they are put into the job
queue. The processes that are ready to execute in the main memory are kept in
the ready queue. The processes that are waiting for the I/O device are kept in
the device queue.

Memory Management

Memory management plays an important part in operating system. It deals with


memory and the moving of processes from disk to primary memory for
execution and back again.

The activities performed by the operating system for memory management are

 The operating system assigns memory to the processes as required. This


can be done using best fit, first fit and worst fit algorithms.
 All the memory is tracked by the operating system i.e. it nodes what
memory parts are in use by the processes and which are empty.
 The operating system deallocated memory from processes as required.
This may happen when a process has been terminated or if it no longer
needs the memory.
Device Management

There are many I/O devices handled by the operating system such as mouse,
keyboard, disk drive etc. There are different device drivers that can be
connected to the operating system to handle a specific device. The device
controller is an interface between the device and the device driver. The user
applications can access all the I/O devices using the device drivers, which are
device specific codes.

File Management

Files are used to provide a uniform view of data storage by the operating
system. All the files are mapped onto physical devices that are usually non
volatile so data is safe in the case of system failure.
The files can be accessed by the system in two ways i.e. sequential access and
direct access −

 Sequential Access
The information in a file is processed in order using sequential access. The
files records are accessed on after another. Most of the file systems such
as editors, compilers etc. use sequential access.
 Direct Access
In direct access or relative access, the files can be accessed in random for
read and write operations. The direct access model is based on the disk
model of a file, since it allows random accesses.

Resource Management in Operating


System


Resource Management in Operating System is the process to manage all the


resources efficiently like CPU, memory, input/output devices, and other
hardware resources among the various programs and processes running in the
computer.
Resource management is an important thing because resources of a computer
are limited and multiple processes or users may require access to the same
resources like CPU, memory etc. at the same time. The operating system has
to manage and ensure that all processes get the resources they need to
execute, without any problems like deadlocks.
Here are some Terminologies related to the resource management in OS:
 Resource Allocation: This terms defines the process of assigning the available
resources to processes in the operating system. This can be done
dynamically or statically.
 Resource: Resource can be anything that can be assigned dynamically or
statically in the operating system. Example may include CPU time, memory,
disk space, and network bandwidth etc.
 Resource Management: It refers to how to manage resources efficiently
between different processes.
 Process: Process refers to any program or application that is being executed
in the operating system and has its own memory space, execution state, and
set of system resources.
 Scheduling: It is the process of determining from multiple number of
processes which process should be allocated a particular resource at a
given time.
 Deadlock: When two or more processes are waiting for some resource but
resources are busy somewhere else and resources are also waiting for
some process to complete their execution . In such condition neither
resources will be freed nor process would get it and this situation is called
deadlock.
 Semaphore: It is the method or tool which is used to prevent race condition.
Semaphore is an integer variable which is used in mutual exclusive manner
by various concurrent cooperative process in order to achieve
synchronization.
 Mutual Exclusion: It is the technique to prevent multiple number of process to
access the same resources simultaneously.
 Memory Management: Memory management is a method used in the operating
systems to manage operations between main memory and disk during
process execution.
Features or characteristics of the Resource management of operating system:

 Resource scheduling: The OS allocate available resources to the


processes. It decides the sequence of which process will get access to the
CPU, memory, and other resources at any given time.
 Resource Monitoring: The operating system monitors which resources is
used by which process and also take action if any process takes many
resources at the same time causing into deadlock.
 Resource Protection: The OS protects the system from unauthorized or
fake access by the user or any other process.
 Resource Sharing: The operating system permits many processes like
memory and I/O devices to share resources. It guarantees that common
resources are utilized in a fair and productive way.
 Deadlock prevention: The OS prevents deadlock and also ensure that no
process is holding resources indefinitely . For that it uses techniques likes
resource preemption.
 Resource accounting: The operating system always tracks the use of
resources by different processes for allocation and statistical purposes.
 Performance optimization: The OS optimizes resources distribution , the
reason is to increase the system performance. For that many techniques like
load balancing and memory management are followed that ensures efficient
resources distribution.
Diagrammatically representation of the Resource management :
Protection and Security in
Operating System
Protection and security requires that computer resources such

as CPU, softwares, memory etc. are protected. This extends to the operating system as well

as the data in the system. This can be done by ensuring integrity, confidentiality and

availability in the operating system. The system must be protect against unauthorized

access, viruses, worms etc.


Security and protection in operating systems (OS) are critical aspects that
ensure the integrity, confidentiality, and availability of resources within a
computing environment. Here are some key concepts and mechanisms
involved in security and protection in OS:

1. User Authentication: Operating systems employ various methods for user


authentication such as passwords, biometrics, smart cards, etc., to ensure
that only authorized users can access the system.
2. Username/ Password
Each user has a distinct username and password combination and they
need to enter it correctly before they can access the system.
3. User Key/ User Card
The users need to punch a card into the card slot or use they individual
key on a keypad to access the system.
4. User Attribute Identification
Different user attribute identifications that can be used are fingerprint,
eye retina etc. These are unique for each user and are compared with the
existing samples in the database. The user can only access the system if
there is a match.

5. Access Control: Access control mechanisms regulate access to system


resources based on user permissions. This includes discretionary access
control (DAC), where users have control over their own resources, and
mandatory access control (MAC), where access is determined by system
policies.
6. File System Security: File permissions and access control lists (ACLs) are
used to control access to files and directories. Encryption can be employed
to protect sensitive data stored on disk.
7. Process Isolation: Operating systems use process isolation to prevent
processes from interfering with each other's memory space and resources.
This prevents unauthorized access and protects against malicious code
execution.
8. Firewalls and Network Security: Operating systems may include built-in
firewalls to monitor and control network traffic, protecting the system from
unauthorized access and malicious attacks.
9. Security Updates and Patch Management: Regular security updates and
patches are essential to address vulnerabilities and protect against known
threats. Operating system vendors release updates to address security
issues and improve system security.
10. Auditing and Logging: Operating systems often include auditing and
logging mechanisms to record system events and user activities. This helps
in monitoring and identifying security breaches and suspicious activities.
11. Virus and Malware Protection: Operating systems may include
built-in antivirus and antimalware software to detect and remove malicious
software that could compromise system security.
12. Secure Boot: Secure boot mechanisms ensure that only trusted
software components are loaded during the boot process, preventing the
execution of unauthorized or malicious code.
13. Virtualization and Containerization: Virtualization and
containerization technologies provide isolated environments for running
applications, enhancing security by reducing the impact of security breaches
and providing better resource isolation.
14. Trusted Computing: Trusted computing platforms employ hardware-
based mechanisms to ensure the integrity of system components and
protect against tampering and unauthorized access.
15. Backup and Recovery: Regular backups are essential for data
protection and disaster recovery. Operating systems may include backup
and recovery tools to facilitate the backup process and restore the system in
case of data loss or system failure.

Overall, security and protection mechanisms in operating systems play a


crucial role in safeguarding system resources and maintaining the overall
security posture of computing environments.

Distributed System
• Definition: A distributed system is a collection of autonomous hosts that are
connected through a computer network.
• A distributed system is a collection of independent computers that appears to its
users as a single coherent system. Each host executes components and operates a
distribution middleware.
Middleware enables the components to coordinate their activities. Users perceive
the system as a single, integrated computing facility.
• A distributed computer system consists of multiple software components that are
on multiple computers, but run as a single system. The computers that are in a
distributed system can be physically close together and connected by a local
network, or they can be geographically distant and connected by a wide area
network.
• A distributed system can consist of any number of possible configurations, such
as
mainframes, personal computers, workstations, minicomputers and so on, such a
• Distributed operating systems depend on networking for their operation.
Distributed OS runs on and controls the resources of multiple machines. It sts
provides resource sharing across the boundaries of a single computer system. It
looks to users like a single machine OS.
Distributing OS owns the whole network and makes it look like a virtual otauni-
processor or may be a virtual multiprocessor.
• Definition: A distributed operating system is one that looks to its users like an
ordinary operating system but runs on multiple, independent CPU.
• Distributed systems depend on networking for their functionality. Fig. 1.6.1
shows the distributed system.

• Examples of distributed operating system are Amoeba, chrous, mach and v-


system
• A Local Area Network (LAN) is a network that is confined to a relatively small
area. It is generally limited to a geographic area such as a college, lab or building.
WAN provides long distance transmission of data and voice. Computers connected
to a wide-area network are often connected through public networks, such as the
telephone system. They can also be connected through leased lines or satellites.
• A MAN typically covers an area of between 5 and 50 km diameter. Many MANS
cover an area the size of a city, although in some cases MANS may be as small as
a group of buildings.
• A MAN often acts as a high speed network to allow sharing of regional
resources. MAN provides the transfer rates from 34 to 150 Mbps.
Advantages and Disadvantages of DS
a) Advantages of distributed OS:
1. Resource sharing: Sharing of software resources such as software libraries,
database and hardware resources such as hard disks, printers and CDROM can also
be done in a very effective way among all the computers and the users.
2. Higher reliability: Reliability refers to the degree of tolerance against errors
and component failures. Availability is one of the important aspects of reliability.
Availability refers to the fraction of time for which a system is available for use.
3. Better price performance ratio: Reduction in the price of microprocessor and
increasing computing power gives good price-performance ratio.
4. Shorter responses times and higher throughput.
5. Incremental growth: To extend power and functionality of a system by simply
adding additional resources to the system.
b) Disadvantages :
1. There are no current commercially successful examples.
2. Protocol overhead can dominate computation costs.
3. Hard to build well.
4. Probably impossible to build at the scale of the internet.

Client-Server Computing
• The system is structured as a set of processes, called servers that offer services to
the users, called clients.
• Server systems are of two types: Compute servers and file servers.
Compute-server system: It provides an interface to which a client can send a
request to perform an action. In response, the server performs some operation and
sends the results to the client. Server contains database.
• File-server system: Client can performs various operation like create, read,
update and delete file on file server. Web server is best example of this type.
• Fig. 1.6.2 shows the client server model.
• The client-server model is usually based on a simple request/reply protocol,
implemented with send/receive primitives or using Remote Procedure Calls (RPC)
or Remote Method Invocation (RMI) :
1. The client sends a request (invocation) message to the server asking for some
service;
2. The server does the work and returns a result (e.g. the data requested) or an error
code if the work could not be performed.
• Server is a process; Client is a process. Clients invoke servers, servers send
results to clients. Servers can be clients of other servers.
HTTP server may be a client of a database server. Service may be provided by
multiple servers, as is most often the case within a large enterprise.
• Cache is a repository of recently accessed objects (files, graphics) that is
physically closer to the client than the server from which it originated. Proxy
server sits in between clients and servers and can play many mitigation roles.
Advantages:
1. Simple to implement.
2. Provides good security.
3. All files are stored in a central location.
Disadvantages:
1. Single point of failure.
2. A specialist network operating system is needed.
Peer-to-Peer System
• All processes (objects) play similar role. Do not require a server process.
Processes (objects) interact without particular distinction between clients and
servers.
• The pattern of communication depends on the particular application. Fig. 1.6.3
shows the peer-to-peer model. (See Fig. 1.6.3 on next page.)
• Processing and communication loads for access to objects are distributed across
many computers and access links. This is the most general and flexible model.
• A group of computers connected together to combine their computing and
'processing abilities to search the Internet or solve very complex problems

• Problems with peer-to-peer : High complexity due to,


1. Cleverly place individual objects
2. Retrieve the objects
3. Maintain potentially large number of replicas.
Distinguish between Client Server and Peer-to-Peer Model

Operating System Services




Operating system is a software that acts as an intermediary between the user
and computer hardware. It is a program with the help of which we are able to
run various applications. It is the one program that is running all the time. Every
computer must have an operating system to smoothly execute other programs.
The OS coordinates the use of the hardware and application programs for
various users. It provides a platform for other application programs to work. The
operating system is a set of special programs that run on a computer system
that allows it to work properly. It controls input-output devices, execution of
programs, managing files, etc.
Services of Operating System
1. Program execution
2. Input Output Operations
3. Communication between Process
4. File Management
5. Memory Management
6. Process Management
7. Security and Privacy
8. Resource Management
9. User Interface
10. Networking
11. Error handling
12. Time Management
Program Execution
It is the Operating System that manages how a program is going to be
executed. It loads the program into the memory after which it is executed. The
order in which they are executed depends on the CPU Scheduling Algorithms.
A few are FCFS, SJF, etc. When the program is in execution, the Operating
System also handles deadlock i.e. no two processes come for execution at the
same time. The Operating System is responsible for the smooth execution of
both user and system programs. The Operating System utilizes various
resources available for the efficient running of all types of functionalities.
Input Output Operations
Operating System manages the input-output operations and establishes
communication between the user and device drivers. Device drivers are
software that is associated with hardware that is being managed by the OS so
that the sync between the devices works properly. It also provides access to
input-output devices to a program when needed.
Communication between Processes
The Operating system manages the communication between processes.
Communication between processes includes data transfer among them. If the
processes are not on the same computer but connected through a computer
network, then also their communication is managed by the Operating System
itself.
File Management
The operating system helps in managing files also. If a program needs access
to a file, it is the operating system that grants access. These permissions
include read-only, read-write, etc. It also provides a platform for the user to
create, and delete files. The Operating System is responsible for making
decisions regarding the storage of all types of data or files, i.e, floppy disk/hard
disk/pen drive, etc. The Operating System decides how the data should be
manipulated and stored.
Memory Management
Let’s understand memory management by OS in simple way. Imagine a cricket
team with limited number of player . The team manager (OS) decide whether
the upcoming player will be in playing 11 ,playing 15 or will not be included in
team , based on his performance . In the same way, OS first check whether the
upcoming program fulfil all requirement to get memory space or not ,if all things
good, it checks how much memory space will be sufficient for program and then
load the program into memory at certain location. And thus , it prevents
program from using unnecessary memory.
Process Management
Let’s understand the process management in unique way. Imagine, our kitchen
stove as the (CPU) where all cooking(execution) is really happen and chef as
the (OS) who uses kitchen-stove(CPU) to cook different dishes(program). The
chef(OS) has to cook different dishes(programs) so he ensure that any
particular dish(program) does not take long time(unnecessary time) and all
dishes(programs) gets a chance to cooked(execution) .The chef(OS) basically
scheduled time for all dishes(programs) to run kitchen(all the system) smoothly
and thus cooked(execute) all the different dishes(programs) efficiently.
Security and Privacy
 Security : OS keep our computer safe from an unauthorized user by adding
security layer to it. Basically, Security is nothing but just a layer of protection
which protect computer from bad guys like viruses and hackers. OS provide
us defenses like firewalls and anti-virus software and ensure good safety of
computer and personal information.
 Privacy : OS give us facility to keep our essential information hidden like
having a lock on our door, where only you can enter and other are not
allowed . Basically , it respect our secrets and provide us facility to keep it
safe.
Resource Management
System resources are shared between various processes. It is the Operating
system that manages resource sharing. It also manages the CPU time among
processes using CPU Scheduling Algorithms. It also helps in the memory
management of the system. It also controls input-output devices. The OS also
ensures the proper use of all the resources available by deciding which
resource to be used by whom.
User Interface
User interface is essential and all operating systems provide it. Users either
interface with the operating system through the command-line interface or
graphical user interface or GUI. The command interpreter executes the next
user-specified command.
A GUI offers the user a mouse-based window and menu system as an
interface.
Networking
This service enables communication between devices on a network, such as
connecting to the internet, sending and receiving data packets, and managing
network connections.
Error Handling
The Operating System also handles the error occurring in the CPU, in Input-
Output devices, etc. It also ensures that an error does not occur frequently and
fixes the errors. It also prevents the process from coming to a deadlock. It also
looks for any type of error or bugs that can occur while any task. The well-
secured OS sometimes also acts as a countermeasure for preventing any sort
of breach of the Computer System from any external source and probably
handling them.
Time Management
Imagine traffic light as (OS), which indicates all the cars(programs) whether it
should be stop(red)=>(simple queue) , start(yellow)=>(ready
queue),move(green)=>(under execution) and this light (control) changes after a
certain interval of time at each side of the road(computer system) so that the
cars(program) from all side of road move smoothly without traffic.

Kernel Data Structures


The kernel data structures are very important as they store data about the
current state of the system. For example, if a new process is created in the
system, a kernel data structure is created that contains the details about the
process.
Most of the kernel data structures are only accessible by the kernel and its
subsystems. They may contain data as well as pointers to other data structures.

Kernel Components

The kernel stores and organizes a lot of information. So it has data about which
processes are running in the system, their memory requirements, files in use
etc. To handle all this, three important structures are used. These are process
table, file table and v node/ i node information.

Details about these are as follows:

Process Table

The process table stores information about all the processes running in the
system. These include the storage information, execution status, file information
etc.

When a process forks a child, its entry in the process table is duplicated
including the file information and file pointers. So the parent and the child
process share a file.
File Table

The file table contains entries about all the files in the system. If two or more
processes use the same file, then they contain the same file information and the
file descriptor number.

Each file table entry contains information about the file such as file status (file
read or file write), file offset etc. The file offset specifies the position for next
read or write into the file.

The file table also contains v-node and i-node pointers which point to the virtual
node and index node respectively. These nodes contain information on how to
read a file.

V-Node and I-Node Tables

Both the v-node and i-node are references to the storage system of the file and
the storage mechanisms. They connect the hardware to the software.

The v-node is an abstract concept that defines the method to access file data
without worrying about the actual structure of the system. The i-node specifies
file access information like file storage device, read/write procedures etc.

You might also like