Edited169 by Evolving Ideas Jeetendra Pande Computing, Communication and Networking Nihar Ranjan Pande Deep Chandra Joshi Publish by Global Vision Publishing House

Advanced Architecture Based OS Neeraj Sharma1, Rajat Goel2 and Rajeev Kumar3

ABSTRACT The modern operating systems are made with the advanced architecture, which made the efficient utilization, highly scalable, and high availability of the resources and the services. The earliest operating systems were developed for mainframe architectures in the 1960s. The enormous investment in software for these systems caused most of the original computer manufacturers to continue to develop hardware and operating systems that are compatible with those early operating systems. Those early systems pioneered many of the features of modern operating systems. Modern mainframes typically also run or variants. A “Datacenter” variant of is also available for some mainframe systems. INTRODUCTION Basically an is software which enable the user to interact with hardware also provide an interface to the user to run an application. The core basic architecture was design by considering certain issues in the existing hardware they are: Processors are executing the instructions serially one by one at a time; there is a need of such an architecture, which can handle the multiple users simultaneously; hardware was too costly so people use to buy the on the leased basis. That made to a need for the time-sharing system. There is need for a communicator who can interact with the system and can manage the hardware resources efficiently and optimistically. There is the core component of the system that is responsible for the all there issues named as kernel. KERNEL AND ITS TYPES Kernel is the core of the operating system, which manages the resources and users. The kernel’s primary purpose is to manage the computer’s resources and allow other programs to run and use these

1. Associate Proffesor JP Institute of Engineering & Technology, Meerut. 2. Lecturer Translam Institute of Technology & Management, Meerut. 3. Lecturer Translam Institute of Technology & Management, Meerut. 170 Neeraj Sharma, Rajat Goel and Rajeev Kumar resources. Typically, the resources consist of: the CPU (frequently called the processor), the most central part of a computer system, responsible for running or executing programs on it. The kernel takes responsibility for deciding at any time which of the many running programs should be allocated to the processor or processors (each of which can usually run only one program at a time). There are various types of the kernel: a) Micro kernel; b) ; c) Nano Kernel; d) Hybrid Kernel. A is a minimal computer operating system kernel which, in its purest form, provides no operating-system services at all, only the mechanisms needed to implement such services, such as low- level address space management, management, and inter- communication (IPC). The microkernel is the only part of the system executing in a kernel mode. The actual operating-system services are provided by user-mode servers. These include device drivers, protocol stacks, file systems and user- interface code. A monolithic kernel is a kernel architecture where the entire kernel is run in kernel space in supervisor mode. In common with other architectures (microkernel, hybrid kernels), the kernel defines a high-level virtual interface over computer hardware, with a set of primitives or system calls to implement operating system services such as process management, concurrency, and in one or more modules.

Courtesy: Wikipedia.org:: Graphical Overview of Monolithic Kernel Fig. 1 A nanokernel or picokernel is a very minimalist operating system kernel. The nanokernel represents the closest layer of the operating system by interfacing the CPU, managing and interacting with the MMU. The management and MMU interface are not necessarily part of a nanokernel; however, on most architectures these components are directly connected to the CPU, therefore, it often makes sense to integrate these interfaces into the kernel. Hybrid kernel is a kernel architecture based on combining aspects of microkernel and monolithic kernel architectures used in computer operating systems. Advanced Architecture Based OS 171

Fig. 2 Modern kernel architecture comes with the hierarchical protection domains are much less flexible, as is the case with every kernel with a hierarchical structure assumed as global design criterion. In the case of protection it is not possible to assign different privileges to processes that are at the same privileged level, and therefore is not possible to satisfy Denning’s four principles for fault tolerance (particularly the Principle of least privilege). Hierarchical protection domains also have a majaor performance drawback, since interaction between different levels of protection, when a process has to manipulate a data structure both in ‘user mode’ and ‘supervisor mode’, always requires message copying (transmission by value). A kernel based on capabilities, however, is more flexible in assigning privileges, can satisfy Denning’s fault tolerance principles, and typically doesn’t suffer from the performance issues of copy by value. Ring 3 least privilege Ring 2 Ring 1

Ring 0

Kernel

Device drivers Most Privilege Device drivers Applications

Fig. 3 Based on the application and purpose there are different kernel architectures and based on them there are various types of operating systems: [DOS] Many vendors had introduces with the DOS operating system for the PC’s and mini computer. It includes basic disk management and data retrival commands, along with some editing commands. File 172 Neeraj Sharma, Rajat Goel and Rajeev Kumar system vary from vendor to vendor basically. MS-DOS and PC-DOS were using FAT16 as their . Later MS-DOS 7.1 added a support for FAT32. DOS is having capability to swap its kernel with the application. It is 16 bit operating system, programmed in assembly language. As every application is having its own starting point, the linker and loader in the kernel loads at its entry point, and kernel swaps its memory loaction to other location. Initially, DOS was design for PC’s and supported only disk level operation later on it supported network and FAT32 file system. Following are the list of DOS distributed by different vendors for different architecture: • CP/M – Control Program/Monitor developed by Digital Research Inc; • MP/M –Multi user version of CP/M, developed by Digital Research Inc; • DR-DOS –developed by Digital Research Inc; • OpenDOS – by Free Software Foundation; • Apple DOS – developed by Apple; • DOS/360 – developed by IBM; • PC-DOS/386 - by IBM; • FreeDOS32 - by GNU. (NOS) A network operating system (NOS) is a computer operating system that is designed primarily to support workstation, personal computer, and, in some instances, older terminal that are connected on a local area network (LAN). Artisoft’s, LANtastic, Banyan VINES, Novell’s NetWare, and ’s LAN Manager are examples of network operating systems. In addition, some multi-purpose operating systems, such as Windows NT and Digital’s OpenVMS come with capabilities that enable them to be described as a network operating system. A network operating system provides printer sharing, common file system and database sharing, application sharing, and the ability to manage a network name directory, etc. There is NOS oprating system that includes Novel Netware, Windows NT and 2000, Solaris, IBM OS/2, UNIX, etc. While Cisco IOS is called as Internet Operating System. Some of the features of network operating system are: • Provide basic operating system features such as support for processors, protocols, automatic hardware detection and support multi-processing of applications; • Security features such as authentication, authorization, logon restrictions and access control; • Provide name and directory services; • Provide file, print, web services, back-up and replication services; • Support Internetworking such as routing and WAN ports; • User management and support for logon and logoff, remote access, system management, administration and auditing tools with graphic interfaces; • Clustering capabilities, fault tolerant and high availability systems. Embedded Operating System Embedded systems use a variety of dedicated operating systems. In some cases, the “operating system” software is directly linked to the application to produce a monolithic special-purpose program. In Advanced Architecture Based OS 173 the simplest embedded systems, there is no distinction between the OS and the application. Embedded systems that have certain time requirements are known as Real-time operating systems. There are many vendors who introduce with their distributions: • Open BSD; • Embedded Linux; • Free RTOS; • LynxOS RTOS; • NetBSD; • Windows XP Embedded; • Windows CE; • Symbian OS. WINDOWS NT ARCHITECTURE The architecture of Windows NT is highly modular and consists of two main layers: a user mode and a kernel mode. Programs and subsystems in user mode are limited in terms of what system resources they have access to, while the kernel mode has unrestricted access to the system memory and external devices. The kernels of the operating systems in this line are all known as hybrid kernel, although this term is disputed, with the claim that the kernel is essentially a monolithic kernel that is structured somewhat like a microkernel. The architecture comprises a hybrid kernel, hardware abstraction layer (HAL), drivers, and a range of services (collectively named Executive), which all exist in kernel mode. Kernel mode in the Windows NT line is made of subsystems capable of passing I/O requests to the appropriate kernel mode software drivers by using the I/O manager. Two subsystems make up the user mode layer of Windows NT: the Environment subsystem (which runs applications written for many different types of operating systems), and the Integral subsystem (operates system specific functions on behalf of the environment subsystem). Kernel mode in Windows NT has full access to the hardware and system resources of the computer. The kernel mode stops user mode services and applications from accessing critical areas of the operating system that they should not have access to. The executive interfaces with all the user mode subsystems. It deals with I/O, object management, security and process management. The kernel sits between the Hardware Abstraction Layer and the Executive to provide multiprocessor synchronization, thread and interrupt and dispatching, and trap handling and exception dispatching. The kernel is also responsible for initializing device drivers at bootup. Kernel mode drivers exist in three levels: highest level drivers, intermediate drivers and low level drivers. Windows Driver Model (WDM) exists in the intermediate layer and was mainly designed to be binary and source compatible between Windows 98 and . The lowest level drivers are either legacy Windows NT device drivers that control a device directly or can be a PnP hardware. Windows NT is having the boot loader NTLDR for x86 and x64 architecture, when the partition’s boot sector code is executed it loads a file NTLDR, which is stored at the root folder of the boot disk. It is composed of two parts; first module is the StartUp module and immediately following the OS loader the osloader.exe. When NTLDR is loaded first the control goes to StartUp module in real mode of operation and its main task is to switch to the , which facilitates 32 bit memory access and thus allowing creating Interrupt description table, global descriptor table, and enable paging. In Windows NT there is fixed entry point for every process. And unlike DOS, the kernel location do not change and swap with the application memory. 174 Neeraj Sharma, Rajat Goel and Rajeev Kumar

The security is provided by means of executing the processes in privileged mode. Windows NT is based on the registry and is divided into user object and system object.

Fig. 4

Fig. 5 Advanced Architecture Based OS 175

The user mode is made up of subsystems, which can pass I/O requests to the appropriate kernel mode drivers via the I/O manager (which exists in kernel mode). Two subsystems make up the user mode layer of Windows NT: the Environment Subsystem and the Integral Subsystem. The environment subsystem was designed to run applications written for many different types of operating systems. None of the environment subsystems can directly access hardware, and must request access to memory resources through the Manager that runs in kernel mode. Also, applications run at a lower priority than kernel mode processes. Windows NT kernel mode has full access to the hardware and system resources of the computer and runs code in a protected memory area. It controls access to scheduling, thread prioritisation, memory management and the interaction with hardware. The kernel mode stops user mode services and applications from accessing critical areas of the operating system that they should not have access to; user mode processes must ask the kernel mode to perform such operations on their behalf. When running on x86 architecture, which supports four different I/O privilege levels (numbered 0 to 3), only the two extreme IOPL levels are used. Usermode programs are run with IOPL 3, and the kernel runs with IOPL 0. These two levels are often referred to as “ring 3” and “ring 0”, respectively as refered to the fig of privilege architecture. Such a design decision had been done to achieve code portability to RISC platforms having only two privilege levels. Kernel mode consists of executive services, which are itself made up on many modules that do specific tasks, kernel drivers, a kernel and a Hardware Abstraction Layer or HAL. The Executive interfaces with all the user mode subsystems. It deals with I/O, object management, security and process management. It’s informally divided into several subsystems, among which Cache Manager, Configuration Manager, I/O Manager, Local Procedure Call (LPC), Memory Manager, Object Manager, Process Structure and Security Reference Monitor (SRM). Grouped together, the components can be called Executive Services (internal name Ex). System Services (internal name Nt), i.e., system calls, are implemented at this level, too, except very few that call directly into the kernel layer for better performance. It uses the NTFS type of file system, stands for Network File System. It is transactional-based file system, mainly used for network operations and services. It overcomes the limitation of the FAT32 file system during the network operations, when file is used by two or more users in write and read mode. Here all the user processes are executed in virtual protected mode and executed by the Kerenl. It uses unicode character sets, while the Win32 platform based Operating system uses ASCII character set. UNIX ARCHITECTURE The first TCP/IP implementation was introduced in BSD 4.2 UNIX developed by university of California, Berkeley. It was already supporting the multi-user, Multi-tasking, Time-sharing system. It was initially using UFS (Unix File System) as its file system. Later on different vendors of UNIX started using the different file systems. FFS (Fast File System) was created by the Berkeley. Later on the UFS is splitted into two layers, as UFS1 and FFS called as lower layer. UFS1 was extended to UFS2 and it supports upto 1TB of volume size. The kernel is highly customized and there is a provision to recompile the kernel as per the business requirement. It is the operating system which is having a support from a small minicomputer to the super computer. There is a in the UNIX, that user with an interpreted environment for programming as well as for running jobs, which interact with the kernel. UNIX provides a variety of shells for various purposes. The 176 Neeraj Sharma, Rajat Goel and Rajeev Kumar shell is in between the kernel and the application. There are three methods to interact with the kernel. It can be either through shell; or can be using API; or can be using low-level routines of the kernel. The kernel is design with such a flexible architecture, that it can run from small PC to Super Computer. It is divided in to the loadable modules, when there is a need for any module during execution it is loaded in to memory from disk and the modules which are not required for the current execution they are unloaded from memory. This facilitates to optimization of the memory usage.

applications

s

m

a

r

g

o Shell r X

P

Kernel

Hardware

Fig. 6 The applications can interact with the kernel via Shell or Xwindow or by directly through kernel API. Here UNIX provides a user level security also, it will not allow one user to access the objects of the other user unless it is not having permission to browse, read, or write. Every user is privileged and based on the privilege its program will get the priority for the execution. All the resources are managed in UNIX by kernel. CONCLUSION The modern operating system which comes today in the market comprises of special system calls that enables to execute the processes over a multi core hardware Architecture. Also there are special system call to the virtual computing environment that enables processes to isolate each other by creating a partition over single execution environment and emulates a Virtual Machine Architecture. REFERENCES Books Operating Concepts; Sumithabha Das Tata MCGrawl Hil. Fundamentals of Operating System; Schilbert, Galvin Tata MCGrawl Hill. Citation References Citation: LogP: Towards a Realistic Model of Parallel Computation by David Culler, Richard Karp, David Patterson, Abhijit Sahay, Klaus Erik Schauser, Eunice Santos, Ramesh Subramonian, Thorsten von Eicken — 1993. Advanced Architecture Based OS 177

Citation: Complexity-effective Superscalar Processors by Subbarao Palacharla, J. E. Smith — 1997 — In Proceedings of the 24th Annual International Symposium on . Citation: The Case for a Single-Chip Multiprocessor by Kunle Olukotun, Basem A. Nayfeh, Lance Hammond, Ken Wilson, Kunyung Chang — 1996 — IEEE Computer. Citation: Automatic Verification of Pipelined Microprocessor Control by Jerry Burch, David Dill — 1994. Citation: Hitting the Memory Wall: Implications of the Obvious by Wm. A. Wulf, Sally A. Mckee — 1995 — Computer Architecture News. Website (Published): en.wikipedia.org. http://www.cs.colorado.edu/~kena/classes/3308/f04/lectures/lecture03.pdf.