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

Topic 1.2 Os Functions and Components Oct22

This document discusses operating system functions and components. It covers the following key points in three sentences: The document outlines the main components of an operating system including the user command interface, processor management, memory management, network management, I/O management, file management, and inter-process communication. It also describes characteristics of modern operating systems such as using a microkernel architecture, multithreading, symmetric multiprocessing (SMP), and being based on object-oriented programming languages. The document provides details on each of these components and characteristics to explain their purpose and how they contribute to overall operating system functions.

Uploaded by

AISYAH FARHANA
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)
20 views

Topic 1.2 Os Functions and Components Oct22

This document discusses operating system functions and components. It covers the following key points in three sentences: The document outlines the main components of an operating system including the user command interface, processor management, memory management, network management, I/O management, file management, and inter-process communication. It also describes characteristics of modern operating systems such as using a microkernel architecture, multithreading, symmetric multiprocessing (SMP), and being based on object-oriented programming languages. The document provides details on each of these components and characteristics to explain their purpose and how they contribute to overall operating system functions.

Uploaded by

AISYAH FARHANA
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/ 28

CSC204

PRACTICAL APPROACH
OF OPERATING
SYSTEM
TOPIC 1.2
OS Functions and Components
OS Functions and Components
1. Understanding OS Components
i. User Command Interface
ii. Processor Component
iii. Memory Component
iv. Network Management
v. I/O Component
vi. File Component
vii. Inter Process Communication (IPC)
2. Characteristics of Modern Operating Systems
i. Microkernel Architecture
ii. Multithreading
iii. Symmetric Multiprocessing (SMP)
iv. Object-Oriented Programming Language Based
OS MODEL
USER COMMAND INTERFACE

• Command-Line Interface (CLI)


• Graphical User Interface (GUI)
PROCESSOR MANAGER
• Processor Manager decides how to
allocate the CPU
• Processor Manager has two levels of
responsibility
• To handle jobs as they enter the system - Handled by
Job Scheduler
• To manage each process within those jobs - Handled
by Process Scheduler
MEMORY MANAGER
• Memory Manager: In charge of main
memory (RAM)
• Responsibility includes:
• Preserves the space in main memory occupied by the
operating system
• Checks the validity of each request for memory space
• Sets up a table to keep track of who is using which
section of memory in a multiuser environment
• Deallocates memory when the time comes to reclaim
the memory
DEVICE MANAGER
• Device Manager monitors every device,
channel, and control unit
• Responsibility includes:
• Chooses the most efficient way to allocate all
system’s devices, printers, terminals, disk
drives, based on a scheduling policy
• Makes the allocation; starts its operation
• Deallocates the device
FILE MANAGER
File Manager keeps track of every file in the
system including data files, assemblers,
compilers, and application programs
Responsibility includes:
• Enforces restrictions on who has access to which files
by using predetermined access
• Controls what users are allowed to do with files once
they access them
• Allocates the resource by opening the file and
deallocates it by closing the file
NETWORK MANAGER
• Network Manager provides a convenient
way for users to share resources while
controlling users’ access to them. The
resources include:
• Hardware (such as CPUs, memory areas, printers,
tape drives, modems, and disk drives)
• Software (such as compilers, application
programs, and data files)
I/O OR DEVICE MANAGER
• The device manager monitors every device, channel and
control unit. Its job is to choose the most efficient way to
allocate all of the system’s devices, printers, ports, disk
drives and so forth based on a scheduling policy chosen
by the system designers.
• The device manager does this by allocating the device,
making it available to the next process or job.
• I/O / device module keeps track of the status of devices
(I/O traffic controller). Each I/O device has a device
handler that resides in a separate process associated
with that device
INTERPROCESS COMMUNICATION (IPC)
• A capability supported by some operating systems that allows
one process to communicate with another process.
• The processes can be running on the same computer or on
different computers connected through a network.
• IPC enables one application to control another application,
and for several applications to share the same data without
interfering with one another.
• IPC is required in all multiprocessing systems, but it is not
generally supported by single-process operating systems such
as DOS.
• OS/2 and MS-Windows support an IPC mechanism
called DDE.
• Interprocess communication (IPC)
is the transfer of data among
processes.
• For example, a Web browser may
request a Web page from a Web
server, which then sends HTML
data.
INTERPROCESS COMMUNICATION (IPC)
• Some forms of IPC facilitate the division of labor among several
specialized processes. Other forms of IPC facilitate the division of
labor among computers on a network.
• Typically, applications can use IPC categorized as clients or servers.
• A client is an application or a process that requests a service from
some other application or process. A server is an application or a
process that responds to a client request. Many applications act as
both a client and a server, depending on the situation.
• For example, a word processing application might act as a client in
requesting a summary table of manufacturing costs from a
spreadsheet application acting as a server. The spreadsheet
application, in turn, might act as a client in requesting the latest
inventory levels from an automated inventory control application.
Characteristics of
Modern Operating
Systems
Characteristics of Modern OS

1. Microkernel Architecture
2. Multithreading
3. Symmetric Multiprocessing (SMP)
4. Object-Oriented Design
1. Microkernel Architecture
• Generally speaking, an OS consists of two parts: a
privileged mode called kernel space and
unprivileged mode called user space.
• The separation is a need rather than an option
otherwise process protection cannot be achieved.
• Depending on which processes run in what
space, we can classify OSs into three main
architectures:
• Monolithic kernel
• Microkernel and
• Hybrid or modular kernel operating systems.
KERNEL
▪ The kernel is the heart of an OS.
▪ The kernel internally contains many components, such as a memory manager,
scheduler, numerous device drivers, a file system, and so on.
▪ When an OS is being written, there are numerous design philosophies which
the designers can adopt.
▪ At one extreme is the monolithic kernel, in which all components mentioned
above, and many others, are all lumped into a single OS file.
▪ At the other extreme is the microkernel, where only the bare minimum is put
into the kernel file, and everything else is put into separate programs, which
the microkernel loads and runs at boot time.
▪ In practice, the design of most OSs lies somewhere in between those two
extremes, although they generally tend to be closer to a monolithic kernel than
a microkernel. But, like everything else in life, the microkernel has its true
believers.
MONOLITHIC KERNEL
• As the name suggest mono means everything put together
in one huge unit that is called the monolithic.
• You can think of a monolithic kernel OS as a single large
static binary file process running entirely in a single address
space. Basic OS services such as process management,
memory management, interrupt handling, IO
communication, file system, device drivers, networking, etc
all run in kernel space.
• Entire services are loaded on boot up and reside in memory
and work is done using system calls.
• Linux, Unix, MS-DOS, and the early Mac OS are typical
examples of monolithic kernel-based OS
MICROKERNEL
• The idea behind microkernel OS is to reduce the kernel to only basic
process communication and IO control and let other system services
run in user space just like any other normal processes.
• These services are called servers and kept separate and run in
different address spaces.
• Contrary to monolithic OS where services are directly invoked,
communication in a microkernel is done via message passing (inter
process communication IPC).
• Mac OS and WinNT are two examples on microkernel OS
architecture.
• Only the very important parts like IPC (Inter process Communication),
basic scheduler, basic memory handling, basic I/O primitives etc., are
put into the kernel
HYBRID KERNEL

• The hybrid approach is derived from the best of


both micro and monolithic kernel architectures.
• Instead of loading the whole thing into memory,
core modules are loaded dynamically to memory
on demand. One disadvantage is that a module
may destabilize a running kernel.
OS ARCHITECTURE
OS ARCHITECTURE
• In conclusion, there is no OS architecture
that is better than the other in the general
sense.
• Comparing monolithic OS is like
comparing two different types of
transportation for example a car and a bus
where each meets different needs.
2. MULTITHREADING

• The ability of an OS to execute different parts of a


program, called threads, simultaneously.
• The programmer must carefully design the
program in such a way that all the threads can
run at the same time without interfering with
each other.
THREAD
• Thread is a basic unit of CPU utilization; it comprises a thread
ID, a program counter, a register set, and a stack.
• It shares with other threads belonging to the same process its
code section, data section, and other OS resources, such as
open files and signals
• A traditional process has a single thread of control.
• If a process has multiple threads of control, it can perform more
than one task at a time
• Many software packages that run on a modern desktop PCs
are multithreaded. An application typically is implemented as
a separate process with several threads of control
THREAD (cont.…)

• E.g., a word processor may have a thread for


displaying graphics, another thread for
responding to keystrokes from the user, and a
third thread for performing spelling and grammar
checking in the background
3. SYMMETRIC MULTIPROCESSING (SMP)
Multiple-processor systems in use today are of two types:
i. 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. It is a master-slave relationship
ii. Symmetric multiprocessing (SMP) – each processor
performs all tasks within the OS; all processors are peers; no
master-slave relationship exists between processors; each
processor has its own set of registers, as well as a private –
or local – cache; however, all processors share physical
memory
4. OBJECT-ORIENTED DESIGN OS
*Kernel - always resides
in memory, performs
essential tasks, and
protected by hardware
*Memory resident: only
for few essential
functions, such as
process scheduling and
memory allocation
*All other functions such
as device allocation, are
not allowed reside in
main memory at all time.
"The man who does not read
books has no advantage over
the one who cannot read
them."
— Mark Twain

THANK YOU

You might also like