1 / 39

Operating System

Operating System. First lecture. Materials. Lecture note ELearning web site : http :// scholar.cu.edu.eg/zizo Abraham Silberschatz , Peter B. Galvin, Greg Gagne , “Operating System Concepts” , 8th edition Paperback, 2010

hroman
Download Presentation

Operating System

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. Operating System First lecture

  2. Materials • Lecture note • ELearning web site : http://scholar.cu.edu.eg/zizo • Abraham Silberschatz, Peter B. Galvin, Greg Gagne , “Operating System Concepts” , 8th edition Paperback, 2010 • Vijay Shukla“ operating systems”, S K Kataria & Sons, third edition 2011

  3. Assessement • Mid term 20% • Lab or assignments 10% • Practical exam • Final exam 70% • -------------------------------------- • Total 100%

  4. Introduction • The 1960’s definition of an operating system is “the software that controls the hardware”. • An operating system is the set of programs that controls a computer. • Some examples of: • operating systems are UNIX, Mach, MS-DOS, MS-Windows, Windows/NT, OS/2, MacOS, VMS, MVS, and VM.

  5. Computer System Structure • Computer system can be divided into four components • Hardware – provides basic computing resources • CPU, memory, I/O devices. • Operating system • Controls and coordinates use of hardware among various applications and users • Application programs – define the ways in which the system resources are used to solve the computing problems of the users. • Word processors, compilers, web browsers, database systems, or video games. • Users • People, machines, or other computers.

  6. Four Components of a Computer System

  7. What is Operating System • The operating system comprises a set of software packages that can be used to manage interactions with the hardware. • Kernel. • Shell.

  8. Components of the operating system • The kernel: • Portion of operating system that is in main memory • which represents the operating system's basic functions such as management of memory, processes, files, main inputs/outputs and communication functionalities.

  9. Components of the operating system • The shell: • allowing communication with the operating system via a control language, letting the user control the peripherals without knowing the characteristics of the hardware used, management of physical addresses, etc.

  10. Objectives of Operating Systems • To hide details of hardware by creating abstraction • To allocate resources to processes (Manage resources) • Provide a pleasant and effective user interface

  11. Operating Systems’ Components • Even though not all systems have the same structure, many modern operating systems share the same goal of supporting the following types of system components

  12. Operating Systems’ Components • Process Management • Main-Memory Management • FileManagement • I/o Management • Secondary-Storage Management • Networking • Protection System • Command Interpreter System

  13. Operating Systems’ Components 1- Process Management • a process is a program in execution The five major activities of an operating system in regard to process management are: • Creation and deletion of user and system processes. • Suspension and resumption of processes. • A mechanism for process synchronization. • A mechanism for process communication. • A mechanism for deadlock handling.

  14. Operating Systems’ Components 2- Main-Memory Management • Main-Memory is a large array of words or bytes The major activities of an operating in regard to memory-management are: • Keep track of which part of memory are currently being used and by whom. • Decide which process are loaded into memory when memory space becomes available. • Allocate and de-allocate memory space as needed.

  15. Operating Systems’ Components 3- File Management • A file is a collected of related information defined by its creator. Computer can store files on the disk (secondary storage) The five main major activities of an operating system in regard to file management are • The creation and deletion of files. • The creation and deletion of directions. • The support of primitives for manipulating files and directions. • The mapping of files onto secondary storage. • The back up of files on stable storage media

  16. Operating Systems’ Components 4- I/O System Management • I/O subsystem hides the peculiarities of specific hardware devices from the user.

  17. Operating Systems’ Components 5- Secondary-Storage Management Secondary storage consists of tapes, disks, and other media. The three major activities of an operating system in regard to secondary storage management are: • Managing the free space available on the secondary-storage device. • Allocation of storage space when new files have to be written. • Scheduling the requests for memory access.

  18. Operating Systems’ Components 6- Networking • A distributed system is a collection of processors that do not share memory, peripheral devices, or a clock. • The processors communicate with one another through communication lines called network. • The communication-network design must consider routing and connection strategies, and the problems of contention and security.

  19. Operating Systems’ Components 7- Protection System Protection refers to a mechanism for controlling the access of programs, processes, or users to the resources defined by a computer system

  20. Operating Systems’ Components 8- Command Interpreter System • is an interface of the operating system with the user • The main function of a command interpreter is to get and execute the next user specified command

  21. Operating Systems Services • Program Execution • It allows the user to execute programs • I/O Operations • Operating systems by providing I/O makes it convenient for the users to run programs • File System Manipulation • The output of a program may need to be written into new files or input taken from some files.

  22. Operating Systems Services • Communications • It may be between processes running on the same computer or running on the different computers. • Error Detection • Error is one part of the system may cause malfunctioning (خلل) of the complete system.

  23. Computer-System Operation • A general-purpose computer system consists of a CPU and a number of device controllers that are connected through a common bus that provides access to the shared memory.

  24. Computer-System Operation • The Controller is a piece of hardware that lets the computer's motherboard communicate with device. • A device controller maintains some local buffer storage and a set of special-purpose registers. • The device controller is responsible for moving the data between the peripheral devices that it controls and its local buffer storage.

  25. Computer-System Operation • Each device controller is in charge of a specific type of devices. • Depending on the controller, more than one device may be attached. • For instance, seven or more devices can be attached to the small computer-systems interface (SCSI) controller.

  26. Computer-System Operation • Typically, operating systems have a device driver for each device controller. • The driver is a piece of software that tells the operating system how to communicate with a specific bit computer hardware.  • This device driver understands the device controller and presents a uniform interface to the device to the rest of the operating system.

  27. Computer-System Operation • To start an I/O operation (read from a key board), the device driver loads the appropriate registers within the device controller. • The device controller, in turn, examines the contents of these registers to determine what action to take (such as “read a character from the keyboard”). • The controller starts transferring of data from the device to its local buffer. Once the transfer of data is completing, the device controller informs the device driver via an interrupt that it has finished its operation.

  28. Computer-System Operation • The device driver then returns control to the operating system, possibly returning the data or a pointer to the data if the operation was a read. For other operations, the device driver returns status information.

  29. Computer Startup Power on self test (POST) Bios Sector Boot Sector Configuration Files Loading

  30. Computer Startup • POST: in this step the computer checks itself to see if the basic devices (keyboard, mouse, video etc..) are connected with the processor. It sends predefined signals to these devices and expects pre-defined responses back from these devices. • BIOS : (basic input output system): part of ROM and perform checking the memory system.

  31. Computer Startup • Boot Sector Reading: BIOS reads the disk sector where files are needed to start the operating system. The area of the disk where there files are located is called Boot Sector. • Once these files are loaded in RAM , few more configuration files are also required which contains what to do upon the start of computer

  32. Computer Startup • For a computer to start running—for instance, when it is powered up or rebooted—it needs to have an initial program to run called bootstrap program. • It is stored in read-only memory (ROM) or electrically erasable programmable read-only memory (EEPROM), known by the general term firmware. • It initializes all aspects of the system, from CPU registers to device controllers and memory contents.

  33. Computer Startup • The bootstrap program loads the operating system kernel into memory and starts execution.

  34. Special-Purpose Systems The discussion thus far has focused on the general-purpose computer systems that we are all familiar with. However, there are other classes of computer systems whose functions are more limited and whose objective is to deal with limited computation domains.

  35. Special-Purpose Systems • Real-Time Embedded Systems: • Embedded computers are the most prevalent form of computers in existence. These devices are found everywhere, from car engines and manufacturing robots to DVDs and microwave ovens. They tend to have very specific tasks. • The systems they run on are usually primitive, and so the operating systems provide limited features. Usually, they have little or no user interface, preferring to spend their time monitoring and managing hardware devices, such as automobile engines and robotic arms.

  36. Special-Purpose Systems • Real-Time Embedded Systems: • Embedded systems almost always run real-time operating systems. A real-time system is used when rigid time requirements have been placed on the operation of a processor or the flow of data.

  37. Special-Purpose Systems • Multimedia Systems • operating systems are designed to handle conventional data such as text files. • Multimedia data consist of audio and video files as well as conventional files. • Multimedia application often includes a combination of both.

  38. Special-Purpose Systems • Handheld Systems • Handheld systems include personal digital assistants (PDAs), such as Palm and Pocket-PCs, and cellular telephones. • Many of which use special-purpose embedded operating systems.

  39. Special-Purpose Systems • Open-Source Operating Systems • Open-source operating systems are those made available in source-code format rather than as compiled binary code. • Linux is the most famous open- source operating system, while Microsoft Windows is a well-known example of the opposite closed source approach • benefits to open-source operating systems, including a community of interested (and usually unpaid) programmers who contribute to the code by helping to debug it, analyze it, provide support, and suggest changes. • more secure than closed-source code

More Related