1 / 23

Operating System: MS-DOS and Windows

Chapter 5. Operating System: MS-DOS and Windows. What is an OS?. It is an extended machine (interface to the machine) Hides the messy details which must be performed Presents user with a virtual machine, easier to use It is a resource manager Each program gets time with the resource

aggie
Télécharger la présentation

Operating System: MS-DOS and Windows

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. Chapter 5 Operating System:MS-DOS and Windows

  2. What is an OS? • It is an extended machine (interface to the machine) • Hides the messy details which must be performed • Presents user with a virtual machine, easier to use • It is a resource manager • Each program gets time with the resource • Each program gets space on the resource

  3. OS for 4th Generation Computers

  4. Functions of operating system • 1. Process management • 2. Memory management • 3. File management • 4. Device management • 5. Security management • 6. User Interface (Command Interpretation)

  5. What is a process? • A process is an execution of a program by the processing unit. • Several tasks of MS Word- • editing the document • the user may start printing a spreadsheet • read data from CD-ROM • A process requires certain resources like CPU time allocation, memory space, files and I/O devices. • Managing the process assigned by the user and accomplishing all the tasks by making proper and efficient use of hardware resources.

  6. What is process life-cycle? • When there are processes running on a computer, operating system allocates certain amount of time to each process for making use of the processor. So, the process may be at different stages of execution. These are - Running, ready and waiting. • Running – the process which is allowed by the operating system to use the processor. • Ready – the process which can run when the processor becomes free. • Waiting – the running process which is interrupted after completing its allotted time and kept waiting (to be processed later). • The change of the state from one to another is known as context change and the action is known as context switching.

  7. What is process scheduling? • In a multiprogramming environment the processor is required to handle many processes at a given time and these processes are to be the processor time, which is known as scheduling. • Two most popular implementation of scheduling are – First in First out (FIFO) and Round Robin • First in First out and (FIFO) – In this system, all the available processes are kept in queue. When the first one is dispatched to the processor all other processes move up one slot in the queue. In this approach, a process may take up long time to complete and holds up other processes in the queue. • Round Robin – In this approach, a process is allowed to run for a fixed period of time known as time slicing, after which it is interrupted and sent to the end of the queue.

  8. Queues at process

  9. Characterization of Scheduling Policies • The scheduler (scheduling procedure) determines which ready process is selected next for execution • The decision mode specifies the instants in time the selection function is exercised

  10. First Come First Served (FCFS) • Selection function: the process that has been waiting the longest in the ready queue (hence, FCFS) • Decision mode: non-preemptive • a process runs until it blocks for an I/O • Favors CPU-bound processes • A CPU-bound process monopolizes the processor • I/O-bound processes have to wait until completion of CPU-bound process • I/O-bound processes may have to wait even after their I/Os are completed (poor device utilization) • Better I/O device utilization could be achieved if I/O bound processes had higher priority

  11. Round-Robin Decision mode: preemptivea process is allowed to run until the time slice period (quantum, typically from 10 to 100 ms) has expireda clock interrupt occurs and the running process is put on the ready queue • Still favor CPU-bound processes • An I/O bound process uses the CPU for a time less than the time quantum before it is blocked waiting for an I/O • A CPU-bound process runs for all its time slice and is put back into the ready queue • May unfairly get in front of blocked processes

  12. Deadlock • Process is deadlocked if it is waiting for an event that will never occur • Most common situation is where two processes are involved on is holding resource required by the other and also looking for resource held by the other process. Alamgir locks AB123 BibiRussel lock AB456 Alamgir requests AB456 BibiRussel requests AB123

  13. Deadlock prevention means that deadlock will not occur due to fact that we deny one of the 4 conditions necessary. • Deadlock avoidance attempts to predict the possibility of deadlock as each resources request is made. • Example if process A requests a resource held by process B then make sure that process B is not waiting for resource held by A (Banker’s algorithm)

  14. Memory Management Memory protection Ensures that that memory location allocated to one process is not being used by any other process. The operating system keeps track of the memory space assigned to each program. • Part of the operating system that manages the memory of a computer is known as memory manager. • Two major tasks are involved in memory management: • allocation of memory space to each process; and • effective utilization of different types of memory. Virtual memory Virtual memory acts like a main memory to the user, although it is no real memory. A part of the secondary storage device (like hard disk) is linked with the main memory through the referenced page pf a program and made available to the user, when necessary.

  15. File Management • It may also be described as information management because information • is stored in the system in the form of files. Process can read information • from files and can create new files for newly generated information. • File manager of the operating system is responsible for • maintenance of the file system; • providing directories for organizing files; and • providing a protection mechanism to allow different users to access information stored in different files.

  16. Device Management • Device management module of an operating system controls all the I/O devices of a computer. For example, a printer is recognized and used through the operating system. • Objective • keeps track of I/O requests from processor • Issue command to the I/O devices • Ensure correct data transmission to and from I/O devices. SPOOLING SPOOL stands for Simultaneous Peripheral Operation On-line. It refers to putting jobs in a buffer memory where a device can access them when it is ready. The processor send the data very fast and the buffer provides a waiting space while the slower device catches up. The most common spooling application is print spooling.

  17. Security Management • This module of operating system provides protection against data corruption (or destruction) and unauthorized access. • Two major security techniques are: • data backup and • user authentication (like the use of password)

  18. User Interface • Command interpretation module (also known as command interpreter) of an operating system serves as an interface for the user to communicate with the computer via its operating system. • Two types of interface may be provided to the user. • (i) Command Line Interface (CLI) – Here the user gives user to the computer by typing commands line by line. DOS and UNIX are the examples of the operating system providing CLI. • (ii) Graphical User Interface (GUI) – Here the command is graphical or pictorial. User can give commands by clicking icons and opening dialog boxes. Commands are selected by moving a pointer (generally by using mouse). WINDOWS and LINUX are the examples of GUI based operating systems.

  19. Utilities • Utility programs- Assist the users with the system maintenance tasks. • Common utilities • Disk formatting • Disk compaction • Disk cleanup • Data compression • Data backup • Data recovery • Virus protection • Firewall • Performance Monitoring/ Profiler- Analyzing the performance of • various hardware components • overall performance of a computer system. • Information • % of CPU utilization • % of memory utilization • number of disk accesses

  20. Common DOS commands • dir [name of directory] • dir allows you to list all contents of the specified directory • Mkdir- Make directory • cd<directory name> • cd is the basic DOS command, it allows you to change directory • copy<source> <destination> • Allows you to copy a file from a <source> folder to a <destination folder> • del<file> • Deletes a specific file • move <source> <destination> • Allows you to move a file from a <source> folder to a <destination folder> • ren <source> <destination> • Renames the specified file • exit • Leaves the DOS terminal

  21. Common DOS commands … • edit <filename> • Opens the default DOS editor to allow modification of a specified file • cls • Clears the DOS screen

  22. Assignments IOA, IA, GA, Case !@#$

More Related