Part I
Part I
OS ARCHITECTURE
OPERATING SYSTEM
• An operating system (OS) is system software that manages computer
hardware, software resources, and provides common services for
computer programs.
• History of Operating Systems
• Tasks of an Operating System
• OS as extension of the hardware
• Main concepts: processes, files, system calls
• Operating system structuring
The Evolution of Operating System
Functionality
• Batch Job Processing(Payroll System, Bank Statements, etc.)
• Linkage of library routines to programs
• Management of files, I/O devices, secondary storage
• Multiprogramming(download apps, transfer data, MS-Excel, Google Chrome, Firefox browser)
• Resource managment and sharing for multiple programs
• Quasi-simultaneous program execution
• Single user
• Multiuser/Timesharing Systems (UNIX · Multics · Linux · Windows 2000 server · Windows NT server ,etc)
• Management of multiple simultaneous users interconnected via terminals
• Fair resource management: CPU scheduling, spooling, mutual exclusion
• Real-Time Systems (process control systems)
• Management of time-critical processes
• High requirements with respect to reliability and availability
• (Examples of the real-time operating systems: Airline traffic control systems, Command Control Systems, Airlines
reservation system, Heart Peacemaker, Network Multimedia Systems, Robot etc. ... )
Tasks of an Operating System
• Processor management - Scheduling
• Fairness
• Non-blocking behavior
• Priorities
• Memory management
• Virtual versus physical memory, memory hierarchy
• Protection of competing/conurrent programs
• Storage management – File system
• Access to external storage media
• Device management
• Hiding of hardware dependencies
• Management of concurrent accesses
• Batch processing
• Definition of an execution order; throughput maximization
Components of Operating System
• Shell
• Kernel
• Shell handles user interactions. It is the outermost layer of the
operating system and manages the interaction between user and
operating system by:
1. Input-Output management
2. Memory Management
3. Process Management for application execution.
4. Device Management
5. System calls control
Types of Operating Systems
• Batch OS
• Distributed OS
• Multitasking OS
• Network OS
• Real-OS
• Mobile OS
Batch OS
• Batch OS is the first operating system for second-generation
computers. This OS does not directly interact with the computer.
Instead, an operator takes up similar jobs and groups them together
into a batch, and then these batches are executed one by one based
on the first-come, first, serve principle.
• Examples of Batch OS: payroll system, bank statements, data entry,
etc.
Distributed OS
• A distributed operating system is a recent advancement in the field of
computer technology and is utilized all over the world that too with
great pace.
• In a distributed OS, various computers are connected through a
single communication channel. These independent computers have
their memory unit and CPU and are known as loosely coupled
systems.
• The major benefit of such a type of operating system is that a user
can access files that are not present on his system but another
connected system. In addition, remote access is available to the
systems connected to this network.
• AIX operating system for IBM RS/6000 computers. Solaris operating
system for SUN multiprocessor workstations. Mach/OS is a
multitasking and multithreading UNIX compatible operating system.
Multitasking OS
• The multitasking OS is also known as the time-sharing operating
system as each task is given some time so that all the tasks work
efficiently.
• This system provides access to a large number of users, and each user
gets the time of CPU as they get in a single system.
• The tasks performed are given by a single user or by different users.
The time allotted to execute one task is called a quantum, and as
soon as the time to execute one task is completed, the system
switches over to another task.
• UNIX · Multics · Linux · Windows 2000 server · Windows NT
server ,etc)
Network OS
• Network operating systems are the systems that run on a server and
manage all the networking functions.
• They allow sharing of various files, applications, printers, security, and
other networking functions over a small network of computers like
LAN or any other private network.
• In the network OS, all the users are aware of the configurations of
every other user within the network, which is why network operating
systems are also known as tightly coupled systems.
• Microsoft Windows server 2008, LINUX, etc.
Real-Time OS
• Real-Time operating systems serve real-time systems.
• These operating systems are useful where many events occur in a short
time or certain deadlines, such as real-time simulations.
• Types of the real-time operating system are:
1. Hard real-time OS
❑The hard real-time OS is the operating system for mainly the applications
in which the slightest delay is also unacceptable.
❑The time constraints of such applications are very strict. Such systems are
built for life-saving equipment like parachutes and airbags, which
immediately need to be in action if an accident happens.
• Soft real-time OS
❑The soft real-time OS is the operating system for applications where
time constraint is not very strict.
❑For Example, virtual reality, reservation systems, etc.
• Example of Real Time OS- Medical imaging systems, robots, etc
Mobile OS
• A mobile OS is an operating system for smartphones, tablets, and
PDA’s(Personal Digital Assistants). It is a platform on which other
applications can run on mobile devices.
• Eg: Android OS, ios, Symbian OS, and Windows mobile OS.
Advantages of Operating System
• Ensuring correct and efficient use of the computer’s hardware.
• Allowing different applications to run concurrently.
• Managing files and folders.
• Providing a user interface.
• Managing security.
• Managing resources.
• Managing printing.
• Providing a platform for software development.
Disadvantages of Operating System
• They can be complex and difficult to use.
• They can be expensive to purchase and maintain.
• They can be vulnerable to attack from malicious users.
Kernel- and User Mode Programs
Typical functionality implemented in either mode:
Kernel:
• Privileged mode
• Strict assumptions about reliability/security of code
• Memory resident
• CPU-, memory-, Input/Output managment
• Multiprocessor management, diagnosis, test
• Parts of file system and of the networking interface
User Space:
• More flexible
• Simpler maintenance and debugging
• Compiler, assembler, interpreter, linker/loader
• File system management, telecommunication, network management
• Editors, spreadsheets, user applications
Layered Model of
Operating System Concepts
nr name typical objects typical operations
1 Integrated circuits register, gate, bus Nand, Nor, Exor
2 Machine language instruction counter, ALU Add, Move, Load, Store
3 Subroutine linkage procedure block Stack Call, JSR, RTS
4 Interrupts interrupt handlers Bus error, Reset
5 Simple processes process, semaphore wait, ready, execute
6 Local memory data block, I/O channel read, write, open, close
7 Virtual model page, frame read, write, swap
8 Process communication channel (pipe), message read, write, open
9 File management files read, write, open, copy
10 Device management ext.memory, terminals read, write
11 I/O data streams data streams open, close, read, write
12 User processes user processes login, logout, fork
13 Directory management internal tables create, delete, modify
14 Graphical user interface window, menu, icon OS system calls
• The VMS operating system and the VAX architecture were designed at the same time - several
features of the VAX architecture can be traced to specific usages in the operating system.
• One particular design feature is the four modes of protection enforced by the hardware (Kernel,
Executive, Supervisor, and User).
• The full instruction set of the VAX is available to programs executing in kernel mode. The entire
VMS database (scheduler, IS, and memory) is accessible only in kernel mode. Most of the system
services operate in kernel mode.
• The executive modes is reserved for RMS, the Record Management Services, responsible for
managing all files on disk. The Command Language Interpreter (CLI) executes in supervisor mode,
calling both RMS and VMS kernel services. The least privileged and by far the greatest number of
programs execute in user mode, as do the utilities, compiler, editors, and certain Digital products.
• The architecture of Windows also uses a layered design. However, Windows uses only two
different protection modes, namely kernel mode (privileged) and user mode. Interestingly
enough, the VAX/VMS design has influenced the feature set of other processor architectures as
well - even the Intel 80368 series of CPUs supports four distinct protection modes (ring 0..3).