Upload
randolf-hudson
View
213
Download
0
Embed Size (px)
Citation preview
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Networking Operating Systems (CO32010)
1. OperatingSystems
2. Processesand scheduling
3. Distributedprocessing
4. Distributedfile systems
5. Routingprotocols6. Routers
7. Encryption
8. NT, UNIX and NetWare
1.1 Introduction1.2 Multitasking and threading1.3 Example operating system components1.4 Exercises1.5 Example operating systems
Objectives:• To define some of the basic terminology of operating systems.• To define the main components of a network operating system.• To define the differences in operating systems.• To outline the history of some of the most used operating
systems.
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Hardware, Operating Systems and User Interfaces
User interface:• Microsoft Windows (Windows 95/98/NT/2000).• Microsoft Windows 3.1.• X-Windows.
User interface:• Microsoft Windows (Windows 95/98/NT/2000).• Microsoft Windows 3.1.• X-Windows.
Operating system:• Microsoft Windows (Windows 95/98/NT/2000).• DOS.• UNIX/Linux.• VMS.• Novell NetWare.
Operating system:• Microsoft Windows (Windows 95/98/NT/2000).• DOS.• UNIX/Linux.• VMS.• Novell NetWare.
Hardware:• x86 architecture.• SPARC architecture.• Apple architecture.
Hardware:• x86 architecture.• SPARC architecture.• Apple architecture.
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Operating System
Printer Printer ServerPrint Queues
Volumes
User account database
Resources
KernelKernel
Groups
Users
File system
Memory
Operating system
Hardware, Operating Systems and User Interfaces
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Operating system characteristics
Single-user Multi-user
Stand-alone Networked
Single-tasking Multitasking
Single processor Multi-processor
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Operating Systems
Hardware
MicrosoftWindows95/98 (OS)
UnixLinux
DOSMac OS
MicrosoftWindowsNT (OS)
File system:- Creating a file system- Copying/deleting/moving files
Multi-user- Allowing users to login into system- Allows users permissions to certain resources- Manage queues for resources
Memory:- Creating virtual memory systems- Disk swapping for memory
Multiprocessing- Allowing several processes to run, at a time- Scheduling of processing to allow priority
Device interfacing:- Access to connected devices- Multi-user access- Device drivers
Networking:- Remote login/file transfer- Creating global file systems
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Mouse driver
Video driver
Soundcard driver
Operating System
Network driver
Application program
Applicationprogram
Kernel
Communicationwith operating system
Keyboard driver
Operating SystemComponents
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Information passed between processes
Low-levelinterrupt
Low-levelinterrupt
ProcessProcess
Low-levelinterrupt
Low-levelinterrupt
ProcessProcess
Message or signal
Network or local computer
Data passed between processes
Interrupt Interrupt
Low-levelinterrupt
Low-levelinterrupt
ProcessProcess
Low-levelinterrupt
Low-levelinterrupt
ProcessProcess
Message or signal
Network or local computer
Data passed between processes
Interrupt Interrupt
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Preemptive Multitasking
Processor Okay No.1, you’ve had your turn,
get to the back ofthe queue. Next!
Okay No.1, you’ve had your turn,
get to the back ofthe queue. Next! Process queue
23 4 5
1
Come on. My turn soon
Come on. My turn soon
Pre-emptive multitasking:Processes are given some time on the processor. This allows all the processes to have some time on the processor, and makes for smoother and more reliable operation
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Co-operative Multitasking
Sorry. You’ll have towait until he’s
finished
Sorry. You’ll have towait until he’s
finished
6
Process queue
2 3 4 5
Processor
1
Hurry up. I’mwaiting. You’ve
been on that processorfor ages.
Hurry up. I’mwaiting. You’ve
been on that processorfor ages.
This isn’tvery fair!
This isn’tvery fair!
Hurray. I could stay here forever.
Anyway, I’m not going back to
the end of the queue.
Hurray. I could stay here forever.
Anyway, I’m not going back to
the end of the queue.
Co-operative multitasking:Processes must yield from the processor, before other processes can run on the processor
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Boilpotatoes
Boilpotatoes Microwave
the pie
Microwavethe pie
Boilcarrots
Boilcarrots
Putpotatoeson plate
Putpotatoeson plate
Putpie
on plate
Putpie
on plate
Putcarrotson plate
Putcarrotson plate
Potatoesare soft
Carrotsare soft
Pie is cooked
Threads in a task
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Threads
Process approach
Interlinkingof threads
Independentthreads
Threads approach
Process splits into threads
Process
Common sharingof data between threads
Splitting a process into threads
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Dynamic Link Libraries
Dynamic link library (DLL)(standard ones stored in \WINDOWSand \WINDOWS\SYSTEM folders)- WINSOCK.DLL (TCP/IP)- GDI.DLL (Graphical interface)- KERNAL32.DLL (Kernel)
Program
Program calls upa DLL when it requires a certain function
Static libraryis used whencompiling theprogram. All theassociated codeis included in theprogram (even ifit is not used)
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
TCP/IP affected virus
TCP/IPDLL
(Virus effected)
TCP/IPDLL
(Virus effected)
Application program
Application program
TCP/IPDLL
(Correct version)
TCP/IPDLL
(Correct version)
Internet/network
Internet/network
Virus can nowlisten to (and modify) any networktraffic
Infected networktransmission (such asinfecting other users,typically from an e-mail list)
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Window’s Components
• User. The User component provides input and output to and from the user interface. Input is from the keyboard, mouse, and any other input device and the output is to the user interface. It also manages interaction with the sound driver, timer, and communications ports.
• Kernel. The Kernel provides for core operating system components including file I/O services, virtual memory management, task scheduling and exception handling, such as: file I/O, exceptions, virtual memory management, task scheduling.
• GDI. Controls output to screen and printer.
User
GDI
Windows 95/98 core
Kernel
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Virtual Machine Manager
VirtualMachineManager
VirtualMachineManager
Program 1
- Process scheduling- Memory paging- MS-DOS support
Program 3
Program 2
Programs have access toall the resources of the computer,as if they were the only program running
Creating virtualmemory (up to 2/4GB) DOS
program
DOSprogram
DOS emulator
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Virtual Machine Manager
• Process scheduling. This is responsible for scheduling processes. It allows for multiple applications to run concurrently and also for providing system resources to the applications and other processes that run. This allows multiple applications and other processes to run concurrently, using either co-operative multitasking or pre-emptive multitasking.
• Memory paging. Windows 95/98/NT uses a demand-paged virtual memory system, which is based on a flat, linear address space accessed using 32-bit addresses. The system allocates each process a unique virtual address space of 4GB. The upper 2GB is shared, while the lower 2GB is private to the application. This virtual address space is divided into equal blocks (or pages).
• MS-DOS Mode support. Provides support for MS-DOS-based applications which must have exclusive access to the hardware. When an MS-DOS-based application runs in this mode then no other applications or processes are allowed to compete for system resources. The application thus has sole access to the resources.
bill@napier, 2001http://www.soc.napier.ac.uk/~bill/nos.html
Example: Windows NT Architecture
Hardware
Devicedriver
HAL (Hardware Abstraction Layer)
Microkernel
I/Omanager
Objectmanager
Processmanager
Localprocedure
callfacility
Virtualmemorymanager
Win32WindowManager
Graphicdevicedriver
Executive Services
NT Executive
Application
User mode
Kernel mode