200 likes | 305 Views
Chapter 1 Introduction to Operating System Part 4. Chapter Summary. At the end of this chapter, student will be able to: Explain what is a shell program Explain what is a network operating system. Explain the following terminologies: - cooperative multitasking
E N D
Chapter 1Introduction to Operating SystemPart 4 F2032 Fundamental of OS
Chapter Summary • At the end of this chapter, student will be able to: • Explain what is a shell program • Explain what is a network operating system. • Explain the following terminologies: - cooperative multitasking - preemptive multitasking - multithreading F2032 Fundamental of OS
Shell program • A piece of software that provides an interface for users. • The term refers to an operating system shell which provides access to the services of a kernel. • The name shell originates from shells being an outer layer of interface between the user and the innards of the operating system (the kernel). • Primary purpose of the shell is to invoke or "launch" another program; however, shells frequently have additional capabilities such as viewing the contents of directories. F2032 Fundamental of OS
Shell program • Types: F2032 Fundamental of OS
Shell program • Example of a CLI shell: Windows PowerShell 2.0 • An extensible automation engine from Microsoft, consisting of a command-line shell and associated scripting language. • Codenamed "Monad. • Windows PowerShell 2.0 was released with Windows 7 and Windows Server 2008. F2032 Fundamental of OS
Shell program • Example of a GUI shell: Windows Explorer • Modern versions of the Microsoft Windows operating system use Windows Explorer as their shell. • Windows Explorer provides the familiar desktop environment, start menu, and task bar, as well as the file management functions of the operating system. • Older versions also include Program Manager which was the shell for the 3.x series of Microsoft Windows. F2032 Fundamental of OS
Example of Windows Explorer interface in Windows 7 F2032 Fundamental of OS
Network Operating System (NOS) • Unlike operating systems, such as Windows, that are designed for single users to control one computer, network operating systems (NOS) coordinate the activities of multiple computers across a network. • The network operating system acts as a director to keep the network running smoothly.
Network Operating System • Functions: • Add, remove and manage users who wish to use resources on the network. • Allow users to access to the data on the network. This data commonly resides on the server. • Allow users to access data found on other network such as the internet. • Allow users to access hardware connected to the network. • Protect data and services located on the network. • Enables the user to pass documents on the attached network F2032 Fundamental of OS
Network Operating System • Two major types : • Peer-to-Peer • Allow users to share resources and files located on their computers and to access shared resources found on other computers. • However, they do not have a file server or a centralized management source. • AppleShare and Windows for Workgroups are examples of programs that can function as peer-to-peer network operating systems. F2032 Fundamental of OS
Network Operating System • Client/Server • Client/server network operating systems allow the network to centralize functions and applications in one or more dedicated file servers . • The file servers become the heart of the system, providing access to resources and providing security. • Individual workstations (clients) have access to the resources available on the file servers. • Provides the mechanism to integrate all the components of the network and allow multiple users to simultaneously share the same resources irrespective of physical location. • Novell Netware and Windows 2000 Server are examples of client/server network operating systems. F2032 Fundamental of OS
Peer-to-peer network Client/server network F2032 Fundamental of OS
Multitasking • Process of letting the operating system perform multiple task at what seems to the user simultaneously. • The CPU switches from one program to the next so quickly that appears as if all of the programs are executing at the same time. • System with multiple processor - This is the case, since there are several CPU's to execute programs on . • System with single processor - Multitasking done by switching execution very rapidly between each program, thus giving the impression of simultaneous execution. -This process is also known as task switching or timesharing.
Multitasking • How multitasking works in system with a single processor? 1) Implemented by letting the running process own the CPU for a while (a timeslice). 2) When another process required the use of CPU, the previous process is replaced with newer process, which then owns the CPU. • Practically all modern OS has this ability. • The two most common methods for sharing the CPU time: • Cooperative multitasking or • Preemptive multitasking F2032 Fundamental of OS
Cooperative multitasking/ Non-preemptive multitasking • Simplest form of multitasking • It lets the programs decide when they wish to let other tasks run. • Disadvantage: • Lets one process monopolize the CPU and never let other processes run. • Program may be reluctant to give away processing power in the fear of another process using all CPU-time. • Used in early versions of the MacOS (up til MacOS 8) and versions of Windows earlier than Win95/WinNT ( Win95 when running old apps). F2032 Fundamental of OS
Preemptive multitasking • Moves the control of the CPU to the OS. • Letting each process run for a given amount of time (a timeslice) and then switching to another task. • The assignment of CPU time is taken care of by the scheduler. • Advantage over cooperative multitasking: • This method prevents one process from taking complete control of the system and thereby making it seem as if it is crashed. • Most common today, implemented by among others OS/2, Win95/98, WinNT, Unix, Linux, BeOS, QNX, OS9, etc. F2032 Fundamental of OS
Multithreading • Multithreading is the ability of an operating system to execute the different parts of the program, called threads simultaneously. • Threads????? - Computers can perform many tasks concurrently – download a file, print a file, receive email, etc. - Each of these independent subtasks is called a thread. - It as semi-process with a definite starting point, an execution sequence and a terminating point F2032 Fundamental of OS
Multitasking Vs Multithreading Application Application Application CPU CPU CPU CPU Higher throughput for parallel applications Better response time in multiple application programs F2032 Fundamental of OS