1 / 35

Part II: Software

Part II: Software. In part II, we focus on topics associated with software. In particular, we will investigate the discovery, representation, and communication of algorithms. Operating systems and networks. Algorithms. Programming languages. Software engineering.

abner
Télécharger la présentation

Part II: Software

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Part II: Software • In part II, we focus on topics associated with software. In particular, we will investigate the discovery, representation, and communication of algorithms. • Operating systems and networks. • Algorithms. • Programming languages. • Software engineering.

  2. Ch. 3 Operating Systems and Networks • The evolution of operating systems. • Operating system architecture. • Coordinating the machine’s activities. • Handling Competition among processes. • Networks. • Network protocols.

  3. Operating Systems • Why needs an operating system? • Computer applications often require a single machine to perform activities that may compete with one another for the machine’s resources. It requires a high degree of coordination to ensure that unrelated activities do not interfere with one another and that communication between related activities is efficient and reliable. • What is an operating system? A software system which handles such a coordination task.

  4. The evolution of Operating Systems • Single-processor systems. • Batch processing - the execution of jobs (programs) by collecting them in a single batch, then executing them without further interaction with the user. • A job queue (FIFO) and a job control language (JCL). • The main drawback to batch processing is no interaction between user and job.

  5. The Evolution of Operating Systems • Interactive processing. • Real-time processing. • Time-sharing. • Multitasking - time-sharing for a single-user system. • From multiprocessor systems to networks.

  6. Operating System Architecture Software Application System Operating system Utility Shell Kernel

  7. Operating System Architecture • A machine’s software can be divided into two categories: application software and system software. • Application software - the programs for performing tasks particular to the machine’s utilization. • System software - performs tasks which are common to computer systems in general.

  8. Operating System Architecture • System software can be divided into two categories: operating-system software and utility software. • Utility software consists of software units that extend the capabilities of the operating system. For example, the ability to format a disk or software for communicating through a modem over telephone lines.

  9. Operating System Architecture • Shell - the portion of an operating system that defines the interface between the operating system and its users. • Graphical user interface (GUI). • Importance of uniformity in the human-machine interface across a variety of machines. • UNIX Vs. MS-DOS and Windows.

  10. Operating System Architecture • Kernel - the internal part of an operating system, which contains those software components that perform the very basic functions required by the computer installation. • File manager - file descriptor and directory (folder). • Device drivers - communicate with controllers.

  11. Operating System Architecture • Memory manager - virtual memory. • Scheduler and dispatcher. • Booting (boot strapping). • Bootstrap - a short program placed in ROM and this program is executed automatically when the machine is turned on. • transfer the operating system to memory • direct the CPU to execute the operating system

  12. Coordinating the Machine Activities • Process - is a dynamic activity whose properties change as time progresses. • Process state - current status of the activity, including the current position in the program being executed and the values in the other CPU registers and the associated memory cells. • A program Vs. a process. • Interprocess communication.

  13. Coordinating the Machine’s Activities • Process administration - the tasks associated with process coordination are handled by the scheduler and dispatcher within the operating system’s kernel. • Process table - keeps information of a process; when a process is created, it is assigned a memory area, a priority, and a status - ready or waiting.

  14. Coordinating the Machine’s Activities • The dispatcher is the component of the kernel that ensures that the scheduled processes are actually executed. • In a time-sharing system, the time is divided into time slices or quanta. • The dispatcher initiates a timer circuit each time a process begins its time slice. • At the end of the time slice, the timer circuit generates an interrupt.

  15. Coordinating the Machine’s Activities • When the CPU receives an interrupt, it saves the current state of the process in the process table, and begins executing the interrupt handler, which is a part of the dispatcher. • At this moment, the dispatcher allows the scheduler to update the process table.

  16. Coordinating the Machine’s Activities • The dispatcher then selects the highest priority process among the ready processes, restarts the timer circuit, and allows the selected process to begin its time slice. • At times a process’s time slice is terminated before the timer has expired (for example, an I/O request), the scheduler will update the process table to reflect the process’s waiting status.

  17. Coordinating the Machine’s Activities • Later, when the controller indicates that the I/O request has been completed, the scheduler will reclassify the process as ready.

  18. Coordinating the Machine’s Activities • The various units within an operating system compete for time slices under control of the dispatcher. • To coordinate their activities, these processes must communicate with one another. • For example, to schedule a new process, the scheduler must obtain memory space from the memory manager for that process

  19. Coordinating the Machine’s Activities • The client/server model for inter-process communication. • A client makes requests to servers and waits for replies. • A server satisfies the requests and sends replies back to the clients. • The client/server model in the design of software leads to uniformity among the types of communication taking place in the system.

  20. Handling Competition Among Processes • Competing resources among processes. • The file manager allocates both access to current files and disk space for the construction of new files. • The memory manager allocates memory space. • The scheduler allocates space in the process table. • The dispatcher allocates time slices.

  21. Handling Competition Among Processes • To control access to the printer, the operating system must keep track of whether the printer has been allocated. • By a flag: check the flag then set the flag • Problem: check the flag and find it clear; the process is then interrupted; the new process also requests the use of the printer; the operating system allows it to use the printer; later, the first process resumes and the operating system allows it to use the printer too

  22. Handling Competition Among Processes • Interrupt disable and interrupt enable. • Test-and-set instruction. • A properly implemented flag is called a semaphore. • Critical region - a sequence of instructions which can be executed by only one process. • Mutual exclusion • Guard the critical region with a semaphore

  23. Handling Competition Among Processes • Deadlock - when two or more processes are blocked from processing because each is waiting for access to resources allocated to another. • Three necessary conditions for deadlock: • 1. There is competition for non-shareable resources

  24. Handling Competition Among Processes • 2. The resources are requested on a partial basis; that is, having received some resources, a process will return later to request more • 3. Once a resource has been allocated, it cannot be forcibly retrieved • Deadlock detection and correction to attack the third condition. • Deadlock avoidance to attack the first two conditions.

  25. Handling Competition Among Processes • Require each process to request all its resources at one time • Make nonshareable resources appear shareable • holding data for output at a later but more convenient time • spooling

  26. Networks • Local area networks (LAN) Vs wide area networks (WAN). • Open networks Vs proprietary networks. • Network configurations - ring, bus, star, and irregular.

  27. Networks • Internet - initiated in 1973 by the Defense Advanced Research Projects Agency (DARPA) to develop the ability to connect a variety of computer networks so that they can function as a single network. • A collection of network clusters (domains) • Internet addressing - network identifier, host address; ex., 192.207.177.133. • ssenterprise.awl.com • alpchen.cs.nthu.edu.tw

  28. Networks • Email and name server. • wshakespeare@mailroom.awl.com • chunghaw@cs.nthu.edu.tw • The world wide web - hypertext and hypermedia documents. • A browser - a client.

  29. Networks • Uniform resource locator (URL) - a browser can contact the proper server and request the desired document. • Figure 3.12, homepage: http://www.awl.com, portal • Hypertext Markup Language (HTML). • Special markers that describe how the document should appear on the computer screen and which items within the document are to be linked to other documents for a browser to perform its task

  30. Network Protocols • Protocols - the rules that govern the communication between different components within a computer system. • Token ring protocol for networks with the ring topology (Figure 3.13). • CSMA/CD (carrier sense, multiple access with collision detection) in an Ethernet (Figure 3.14).

  31. You Customer Shipper Shipper Airline Airline Network Protocols Package Package Container Container Aircraft

  32. Application layer Application layer Transport layer Transport layer Network layer Network layer Link layer Link layer Network Protocols: The Internet Software Layer Message source Message destination

  33. Application layer consists of software units that must communicate with each other across the Internet. FTP, telnet, requires name server services Transport layer divides long messages into packets. Network layer wraps the packets it receives with the intermediate address. Link layer deals with the communication details (whether token ring or bus is used). Figure 3.17. Network Protocols: The Internet Software Layer

  34. Network Protocols • Open system interconnection (OSI) reference model produced by International standards organization (ISO). • Seven-level hierarchy • TCP/IP protocol suite defines the four-level hierarchy.

  35. Networks • Unauthorized access to information and vandalism. • Passwords and data encryption. • Virus and worm.

More Related