OPERATING SYSTEMS. Table of Contents. Republic of Cameroon Peace Work Fatherland School Year 2013/2014

Size: px
Start display at page:

Download "OPERATING SYSTEMS. Table of Contents. Republic of Cameroon Peace Work Fatherland School Year 2013/2014"

Transcription

1 Ministry of Secondary Education Progressive Comprehensive High School & PCHS Mankon Bamenda Department of Computer Studies Republic of Cameroon Peace Work Fatherland School Year 2013/2014 OPERATING SYSTEMS Class: Comp. Sc A/L By: DZEUGANG PLACIDE CHAPTER OBJECTIVES This chapter aims: To describe the services an operating system provides to users, processes, and other systems. To explain some Operating system concept such as system call, kernel mode, deadlock, paging, segmentation To discuss the various ways of structuring an operating system. To describe in detail some functions of operating systems such as process management, memory management, device management, To describe some examples of today s operating systems and contrast Linux and Windows operating system Table of Contents I. INTRODUCTION TO OPERATING SYSTEM... 2 II. OPERATNG SYSTEM STRUCTURES... 4 III. TYPES OF OPERATING SYSTEMS... 8 IV. FUNCTIONS OF OPERATING SYSTEM... 9 V. PROCESS MANAGEMENT VI. DEADLOCK VII. MEMORY MANAGEMENT VIII. FILE MANAGEMENT IX. DEVICE MANAGEMENT X. SECURITY MANAGEMENT XI. EXAMPLES OF OS Visit for further learning tools for ICT & Comp. Sc Page 1

2 I. INTRODUCTION TO OPERATING SYSTEM I.1 Definition and objectives An operating system is a collection of system programs that together controls the operation of a computer system. Operating system along with hardware, application and other system software, and users constitute a computer system. It is the most important part of any computer system. The roles of an OS in a computer systems are many: Operating System is a Resource Manager. Handles multiple computer resources: CPU, Internal/External memory, Processes, Tasks, Applications, Users, etc Manages and allocates resources to multiple users or multiple jobs running at the same time (e.g., processor time, memory space, I/O devices) Arranges to use the computer hardware in an efficient manner (maximize throughput, minimize response time) and in a fair manner. It is a Control Program. Manages all the components of a complex computer system in an integrated manner. Controls the execution of user programs and I/O devices to prevent errors and improper use of the computer resources. Looks over and protects the computer. It is an extended/virtual machine It is an interface between the user and hardware, for it hides the details of the hardware from the user (e.g., I/O). Therefore, the end-users are not particularly concerned with the computer s architecture, and they view the computer system in terms of an application. To programmers, it provides some basic utilities to assist him in creating programs, the management of files, and the control of I/O devices. Visit for further learning tools for ICT & Comp. Sc Page 2

3 I.2 Evolution of OS Operating systems, like computer hardware, have undergone a series of revolutionary changes called generations. Ther exist five main generations of OS. I.2.1 First Generation ( ): Vacuum Tubes and Plugboards - No programming language nor OS - Machine language - The use of plugboards, punched cards I.2.2 Second Generation ( ): Transistor and Batch System - Introduction of transistor - Fortran, Assembler - Batch system - Offline system: - Operating System usually used: FMS (Fortran Monitor System), IBSYS (OS for IBM 7094) - Example of FMS job structure: I.2.3 Third Generation ( ): ICs and Multiprogramming - IBM 360 for scientific calculation (i.e numerical) and commercial (i.e character-oriented) - IC (Integrated Circuit) - Introduction of multiprogramming - Introduction of SPOOLING (Simultaneous Peripheral Operation On Line) - Introduction of time-sharing - Development of computer utility Þ machine that supports hundreds of timesharing users. Eg: MULTICS (Multiplex Information and Computing Service) - Development of minicomputer. Eg: DEC PDP-1 until PDP-11 - Development of UNIX (Uniplexed Information and Computing Service) I.2.4 Fourth Generation (1980-now): LSI and PC - LSI (Large Scale Integration) circuit and chips consisting of thousands of transistor Þ birth of PC (Personal Computer) - User-friendly software - Dominant Operating System: MS-DOS, Win ME, Win NT, Unix, Window - Network Operating System - Distributed Operating System Visit for further learning tools for ICT & Comp. Sc Page 3

4 II. OPERATNG SYSTEM STRUCTURES OS structure deals with how operating systems are structured and organized. Different design issues and choices are examined and compared, and the basic structure of several popular OSes are presented. II.1 OS services An operating system provides an environment for the execution of programs. It provides certain services to programs and to the users of those programs. The specific services provided, of course, differ from one operating system to another, but we can identify common classes. One set of operating-system services provides functions that are helpful to the user. II.1.1 User Interface Almost all operating systems have a user interface (UI). This interface can take several forms. command-line interface(cli), which uses text commands and a method for entering them (say, a program to allow entering and editing of commands). Command Line Interface (CLI) or command interpreter allows direct command entry - Sometimes implemented in kernel, sometimes by systems program - Sometimes multiple flavors implemented shells - Primarily fetches a command from user and executes it Batch interface, in which commands and directives to control those commands are entered into files, and those files are executed. A graphical user interface (GUI) is used. Here, the interface is a window system with a pointing device to directi/o, choose from menus, and make selections and a keyboard to enter text. - A GUI is a User-friendly desktop interface - It usually uses mouse, keyboard, and monitor - It provides icons to represent files, programs, actions, etc - Various mouse buttons over objects in the interface cause various actions (provide information, options, execute function, open directory (known as a folder) Some systems provide two or all three of these variations. Microsoft Windows is GUI with CLI command shell Apple Mac OS X as Aqua GUI interface with UNIX kernel underneath and shells available Solaris is CLI with optional GUI interfaces (Java Desktop, KDE) Visit for further learning tools for ICT & Comp. Sc Page 4

5 II.1.2 Program execution. The system must be able to load a program into memory and to run that program. The program must be able to end its execution, either normally or abnormally (indicating error). II.1.3 I/O operations. A running program may require I/O, which may involve a file or an I/O device. For specific devices, special functions may be desired (such as recording to a CD or DVD drive or blanking a CRT screen). For efficiency and protection, users usually cannot control I/O devices directly. Therefore, the operating system must provide a means to do I/O. II.1.4 File-system manipulation The file system is of particular interest. Obviously, programs need to read and write files and directories. They also need to create and delete them by name, search for a given file, and list file information. Finally, some programs include permissions management to allow or deny access to files or directories based on file ownership. II.1.5 Communication There are many circumstances in which one process needs to exchange information with another process. Such communication may occur between processes that are executing on the same computer or between processes that are executing on different computer systems tied together by a computer network. Communications may be implemented via shared memory or through message passing, in which packets of information are moved between processes by the operating system. II.1.6 Error detection OS needs to be constantly aware of possible errors - May occur in the CPU and memory hardware, in I/O devices, in user program - For each type of error, OS should take the appropriate action to ensure correct and consistent computing - Debugging facilities can greatly enhance the user s and programmer s abilities to efficiently use the system II.1.7 Other services Another set of operating-system functions exists not for helping the user but rather for ensuring the efficient operation of the system itself. Systems with multiple users can gain efficiency by sharing the computer resources among the users. Resource allocation - When multiple users or multiple jobs running concurrently, resources must be allocated to each of them. Many types of resources - Some (such as CPU cycles, main memory, and file storage) may have special allocation code, others (such as I/O devices) may have general request and release code Visit for further learning tools for ICT & Comp. Sc Page 5

6 Accounting - To keep track of which users use how much and what kinds of computer resources Protection and security - The owners of information stored in a multiuser or networked computer system may want to control use of that information, concurrent processes should not interfere with each other Protection involves ensuring that all access to system resources is controlled Security of the system from outsiders requires user authentication, extends to defending external I/O devices from invalid access attempts II.2 Operating system concepts II.2.1 OS Kernel Fig: OS services The kernel is the central component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components). It is the part of the OS which is loaded into memory during the booting process. Its job is to regulate disk files, memory management, program objectives and tasks, and program execute and process. It is considered the operating system score because it controls a computer s hardware, and is responsible for either directly activating computer hardware or for interfacing with software that drives the hardware II.2.2 System call In computing, a system call is how a program requests a service from an operating system's kernel that it does not normally have permission to run. System calls provide the interface between a process and the operating system. Types of System Calls Six major categories, as outlined in Figure 2.8 and the following six subsections: Visit for further learning tools for ICT & Comp. Sc Page 6

7 Type Process control File Management Device Management Information maintenance Communication System calls o End, abort o Load, execute o Create process, terminate process o Get process attributes, set process attributes o Wait for time o Wait event, signal event o Allocate and free memory o Create file, delete file o Open, close o Read, write, reposition o Get file attributes, set file attributes o Request device, release device o Read, write, reposition o Get device attributes, set device attributes o Locally attach or detach devices o Get time or date, set time or date o Get system date, set system date o Get process, file or devices attributes o Set process, file or devices attributes o Create, delete communication connection o Send, receive messages o Transfer status information o Attach or detach remote devices II.2.3 System program System programs provide a convenient environment for program development and execution. They can be divided into: File manipulation create, delete, copy, rename, print, list etc. Status information Display date, time, disk space, memory size, etc. File modification Create and modify files using text editors. Programming language support Compilers, assemblers, and interpreters. Program loading and execution Loaders, linkers. Communications remote login, send and receive messages. Most users view of the operation system is defined by system programs, not the actual system calls. II.2.4 Operating system modes Many CPU modes can be implemented by an Operating System: But en general a CPU can be either in kernel mode or User mode. In kernel mode, also called master mode, supervisor mode, privileged mode, supervisor state, etc, the CPU has instructions to manage memory and how it can be accessed, plus the ability to access peripheral devices like disks and network cards. The CPU can also switch itself from one running program to another. It is an unrestricted mode Visit for further learning tools for ICT & Comp. Sc Page 7

8 In user mode, access to memory is limited to only some memory locations, and access to peripheral devices is denied. The ability to keep or relinquish the CPU is removed, and the CPU can be taken away from a program at any time. Now, all programs will be run in user mode, and this prevents them from accessing the data in other programs, as well as preventing the disk etc. II.2.5 Interrupt Generally, the mechanisms for invoking the operating system are called interrupts. They are the gateways to the operating system. Modern computers will go into system mode when they handle an interrupt. System mode provides the foundation for operating system security. The three types of interrupts are software interrupts (syscall) - invoked by software external interrupts - invoked by external devices exceptions - invoked by the processor when errors occur Interrupt Handling The code that is installed at the target address for interrupts is called an interrupt handler. The first thing that it has to do is save the state of the currently executing process. Then it calls a subprogram to deal with the specific type of interrupt. When that subprogram returns, the interrupt handler restores the state of the process that was executing when the interrupt occurred. III. TYPES OF OPERATING SYSTEMS Within the broad family of operating systems, there are generally four types, categorized based on the types of computers they control and the sort of applications they support. The categories are: III.1 Real-time operating system (RTOS) Abbreviated as RTOS, a real-time operating system or embedded operating system is a computer operating system designed to handle events as they occur. Real-time operating systems are commonly found and used in robotics, cameras, complex multimedia animation systems, communications, and has various military and government uses. Many operating systems such as Windows and Linux have embedded versions and other examples included Chimera, Lynx, MTOS, QNX, RTMX, RTX, and VxWorks. III.2 Single-user, single task As the name implies, this operating system is designed to manage the computer so that one user can effectively do one thing at a time. The Palm OS for Palm handheld computers is a good example of a modern single-user, single-task operating system. Visit for further learning tools for ICT & Comp. Sc Page 8

9 III.3 Single-user, multi-tasking This is the type of operating system most people use on their desktop and laptop computers today. Microsoft's Windows and Apple's MacOS platforms are both examples of operating systems that will let a single user have several programs in operation at the same time. III.4 Multi-user A multi-user operating system allows many different users to take advantage of the computer's resources simultaneously. Unix, VMS and mainframe operating systems, such as MVS, are examples of multi-user operating systems. III.5 Multiprocessing OS Multiprogramming OS have two or more processors for a single running process. Processing takes place in parallel and is also called parallel processing. Each processor works on different parts of the same task, or, on two or more different tasks. Linux, UNIX and Windows 7 are examples of multiprocessing OS. III.6 Time sharing Operating System: It allows execution of more than one tasks or processes concurrently. For this, the processor time is divided amongst different tasks. This division of time is also called time sharing. The processor switches rapidly between various processes. III.7 Distributed Operating System: They are also called Network Operating System(NOS). On a network data is stored and processed on multiple locations. The Distributed Operating System is used on networks as it allows shared data/files to be accessed from any machine on the network in a transparent manner. We can insert and remove the data and can even access all the input and output devices. The users feel as if all data is available on their workstation itself. Some example of network operating system are Windows NT, Novell s Netware ect. III.8 Multiprocessor Operating System: A multiprocessor operating system can incorporate more than one processor dedicated to the running processes. This technique of using more than one processor is often called parallel processing. III.9 Embedded Operating System: An embedded operating system refers to the operating system that is self-contained in the device and resident in the read-only memory (ROM). IV. FUNCTIONS OF OPERATING SYSTEM The main functions of a modern operating system are as follows: Visit for further learning tools for ICT & Comp. Sc Page 9

10 Process Management: As a process manager, the operating system handles the creation and deletion of processes, suspension and resumption of processes and scheduling and synchronization of processes. Memory Management: As a memory manager, the operating system handles the allocation and deallocation of memory space as required by various programs. File Management: The operating system is responsible for creation and deletion of files and directories. It also takes care of other file-related activities such as organizing, storing, retrieving, naming, and protecting the files. Device Management: Operating system provides input/output subsystem between process and device driver. It handles the device caches, buffers and interrupts. It also detects the device failures and notifies the same to the user. Security Management: The operating system protects system resources and information against destruction and unauthorized use. User Interface: Operating system provides the interface between the user and the hardware. The user interface is the layer that actually interacts with the computer operator. The interface consists of a set of commands or menus through which a user communicates with a program. V. PROCESS MANAGEMENT V. 1 What is a process? A process is a name given to a program instance that has been loaded into memory and managed by the operating system. Shortly, a process is a program in execution. (Program = static file (image). Process = executing program = program + execution state) V.2 Process States A Process in execution will have to pass through different stages : New: The process is being created.. Ready: The process is ready to be assigned to the processor. Running: The Process is currently using CPU to execute its instruction is in this stage. Waiting: The process is waiting for signal from some other process. Terminated: The Process that finishes its execution will be terminated. Steps followed in the Process execution: A Process when first created will be in New stage, then when it is waiting for CPU time in order to get executed will in ready stage. In Ready stage Process will be waiting for CPU time in Ready Queue (A queue where Process waits for the CPU). Once the CPU become free and process acquires it, Process will enter into Running stage where it will execute its instructions. If during this stage if any interrupt occurs then it will move back to ready stage and wait for the scheduler dispatcher. If it has Visit for further learning tools for ICT & Comp. Sc Page 10

11 I/O operation then it will move to Waiting stage where it will perform I/O operation and then move back to ready stage and waits for the scheduler dispatcher. After the process get executed it will terminate. The change of the state of the process from one form to another is called context change and this course of action is known as context switching. V.3 Threads Fig: Process states A thread is a task that runs concurrently with other tasks within the same process. This is also known as lightweight process. A thread is the simplest unit of a process. The single thread of control allows the process to perform only one task at a time. An example of a single thread in a process is a text editor where a user can either edit the text or perform any other task like printing the document. In a multitasking operating system, a process may contain several threads, all running at the same time inside the same process. Writing a program in which a process creates multiple threads is called multithread programming. V.4 Process Scheduling In a multiprogrammed system, at any given time, several processes will be competing for the CPU time. Thus, a choice has to be made which process to allocate the CPU next. This procedure of determining the next process to be executed on the CPU is called process scheduling and the module of operating system that makes this decision is called a scheduler. V.4.1 Preemptive and Non-preemptive Scheduling CPU-scheduling decisions may take place under the following four circumstances: 1. When a process switches from the running state to the waiting state (for example, as the result of an I/O request, ). 2. When a process switches from the running state to the ready state (for example, when an interrupt occurs). Visit for further learning tools for ICT & Comp. Sc Page 11

12 3. When a process switches from the waiting state to the ready state (for example, at completion of I/O, on a semaphore, or for some other reason). 4. When a process terminates. If no process is ready, a system-supplied idle process is normally run. For situations 1 and 4, there is no choice in terms of scheduling. A new process (if one exists in the ready queue) must be selected for execution. There is a choice, however, for situations 2 and 3. When scheduling takes place only under circumstances 1 and 4, we say that the scheduling scheme is nonpreemptive or cooperative; otherwise, it is pre-emptive. o o Under nonpreemptive scheduling, once the CPU has been allocated to a process, the process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state. Unfortunately, pre-emptive scheduling incurs a cost associated with access to shared data. Consider the case of two processes that share data. While one is updating the data, it is preempted so that the second process can run. The second process then tries to read the data, which are in an inconsistent state. In such situations, we need new mechanisms to coordinate access to shared data. V.4.2 Algorithm to select process to execute The scheduler uses some scheduling procedure to carry out the selection of a process for execution. 1) First-Come-First-Served: As the name suggests, in FCFS scheduling, the processes are executed in the order of their arrival in the ready queue, which means the process that enters the ready queue first, gets the CPU first. To implement FCFS scheduling procedure, the ready queue is managed as a firstin first-out (FIFO) queue. FCFS falls under nonpreemptive scheduling and its main drawback is that a process may take a very long time to complete, and thus holds up other waiting processes in the queue Process Arrival time Execute Time Service Time Wait Time : Service Time - Arrival Time P = 0 P = 4 P = 6 P = 13 Average Wait Time: ( ) / 4 = 5.55 Visit for further learning tools for ICT & Comp. Sc Page 12

13 2) Round Robin: Round robin scheduling was designed, keeping in mind the limitations of the FCFS scheduling procedure. This procedure falls under preemptive scheduling in which a process is selected for execution from the ready queue in FIFO sequence. However, the process is executed only for a fixed period known as time slicing or quantum period after which it will be interrupted and returned to the end of the ready queue. In round robin procedure, processes are allocated the CPU time on a turn basis Quantum = 3 Process Arrival time Execute Time Wait Time : Service Time - Arrival Time P0 0 5 (0-0) + (12-3) = 9 P1 1 3 (3-1) = 2 P ) + (15-9) = 10 P4 3 6 (9-3) + (18-12) = 12 Average Wait Time: ( ) / 4 = ) Shortest-Job-First Scheduling, SJF The idea behind the SJF algorithm is to pick the quickest fastest little job that needs to be done, get it out of the way first, and then pick the next smallest fastest job to do next. ( Technically this algorithm picks a process based on the next shortest CPU burst, not the overall process time. ). For example, the Gantt chart below is based upon the following CPU burst times, ( and the assumption that all jobs arrive at the same time. ) Process Arrival time Execute Time Service Time Wait Time : Service Time - Arrival Time P = 3 P = 0 P = 14 P = 5 Visit for further learning tools for ICT & Comp. Sc Page 13

14 Average Wait Time: ( ) / 4 = ) Priority Scheduling Priority scheduling is a more general case of SJF, in which each job is assigned a priority and the job with the highest priority gets scheduled first. ( SJF uses the inverse of the next expected burst time as its priority - The smaller the expected burst, the higher the priority. ) Note that in practice, priorities are implemented using integers within a fixed range, but there is no agreed-upon convention as to whether "high" priorities use large numbers or small numbers. This book uses low number for high priorities, with 0 being the highest possible priority. Processes with same priority are executed on first come first serve basis. Priority can be decided based on memory requirements, time requirements or any other resource requirement. Wait time of each process is following Process Wait Time : Service Time - Arrival Time P0 0-0 = 0 P1 3-1 = 2 P2 8-2 = 6 P = 13 Average Wait Time: ( ) / 4 = ) Shortest-Remaining-Time (SRT) Scheduling Shortest remaining time, also known as shortest remaining time first (SRTF), is the preemtive counterpart of SJF and useful in time-sharing environment. The process with the smallest estimated run-time to completion is run next, including new arrivals. Visit for further learning tools for ICT & Comp. Sc Page 14

15 A nonpreemptive scheduling algorithm picks a process to run and then just lets it run until it blocks (either on I/O or waiting for another process) or until it voluntarily releases the CPU. First-Come-First-Served (FCFS), Shortest Job first (SJF). In contrast, a pre-emptive scheduling algorithm picks a process and lets it run for a maximum of some fixed time. If it is still running at the end of the time interval, it is suspended and the scheduler picks another process to run. Round-Robin (RR), Priority Scheduling. VI. DEADLOCK VI.1 What is Deadlock? In a multiprogramming environment, several processes may compete for a limited number of resources. A process requests for the required resource and if it is not available, then the process enters in the waiting state and remains in that state until it acquires the resource. There might be a situation when the process has to wait endlessly because the requested resource may be held by other waiting process. This type of situation is known as deadlock. VI.2 Real-life Examples of deadlock 1) Bridge traffic can only be in one direction. Each entrance of the bridge can be viewed as a resource. If a deadlock occurs, it can be resolved if one car backs up (resource preemption). Starvation is possible (Processes wait indefinitely). 2) An utility program copy a file from tape to disk and print the file to printer Resources: Tape, Disk, Printer A deadlock - A holds tape and disk, then requests for a printer - Bholds printer, then requests for tape and disk Visit for further learning tools for ICT & Comp. Sc Page 15

16 VI.3 Necessary Conditions A deadlock situation arises if the following four conditions hold simultaneously on the system: Mutual Exclusion: At least one resource must be held in a non-sharable mode; If any other process requests this resource, then that process must wait for the resource to be released. Hold and Wait: In this situation, a process might be holding some resource while waiting for additional resources, which are currently being held by other processes. No Preemption: Resources cannot be preemptive, that is, resources cannot be forcibly removed from a process. A resource can only be released voluntarily by the holding process, after that process has completed its task. Circular Wait: This situation may arise when a set of processes waiting for allocation of resources held by other processes forms a circular chain in which each process is waiting for the resource held by its successor process in the chain. VI.4 Methods for Handling Deadlocks Generally speaking there are three ways of handling deadlocks: 1. Deadlock prevention or avoidance - Do not allow the system to get into a deadlocked state. 2. Deadlock detection and recovery - Abort a process or preempt some resources when deadlocks are detected. 3. Ignore the problem all together - If deadlocks only occur once a year or so, it may be better to simply let them happen and reboot as necessary than to incur the constant overhead and system performance penalties associated with deadlock prevention or detection. This is the approach that both Windows and UNIX take. VI.5 The Banker's algorithm: The Banker's algorithm is run by the operating system whenever a process requests resources. The algorithm prevents deadlock by denying or postponing the request if it determines that accepting the request could put the system in an unsafe state (one where deadlock could occur). When a new process enters a system, it must declare the maximum number of instances of each resource type that may not exceed the total number of resources in the system. Also, when a process gets all its requested resources it must return them in a finite amount of time. - This algorithm handles multiple instances of the same resource. - Force threads to provide advance information about what resources they may need for the duration of the execution. - The resources requested may not exceed the total available in the system. - The algorithm allocates resources to a requesting thread if the allocation leaves the system in a safe state. - Otherwise, the thread must wait. Safe state A state is safe if a sequence of processes exist such that there are enough resources for the first to finish, and as each finishes and releases its resources there are Visit for further learning tools for ICT & Comp. Sc Page 16

17 enough for the next to finish. The rule is simple: If a request allocation would cause an unsafe state, do not honor that request. NOTE: All deadlocks are unsafe, but all unsafe are NOT deadlocks. Example VII. MEMORY MANAGEMENT In addition to managing processes, the operating system also manages the primary memory of the computer. The part of the operating system that handles this job is called the memory manager. The major tasks accomplished by the memory manager so that all the processes function in harmony are as follows: Relocation: Each process must have enough memory to execute. Protection and Sharing: A process should not run into the memory space of another process. VII.1 Relocation Visit for further learning tools for ICT & Comp. Sc Page 17

18 When a process is to be executed, it has to be loaded from the secondary storage (like hard disk) to the main memory (RAM). This is called process loading. Since, main memory is limited and other processes also need it for their execution, an operating system swaps the two processes, which is called swapping. Once the process is 'swapped out', it is uncertain to predict when it will be 'swapped in' because of the number of processes running concurrently VII.2 Protection and Sharing In multiprogrammed systems, as a number of processes may reside in the main memory at the same time, there is a possibility that a user program during execution may access the memory location allocated either to other user processes or to the operating system. It is the responsibility of the memory manager to protect the operating system from being accessed by other processes and the processes from one another. VII.3 Memory Allocation The main challenge of efficiently managing memory comes when a system has multiple processes running at the same time. In such a case, the memory manager can allocate a portion of primary memory to each process for its own use. Different strategies are used to allocate space to processes competing for memory. Three of the most popular are: best fit, first fit and worst fit. Fig: Strategies for Memory Allocation Best Fit: In this case, the memory manager places a process in the smallest block of unallocated memory in which it will fit. For example, a process requests 12 KB of memory and the memory manager currently has a list of unallocated blocks of 6 KB, Visit for further learning tools for ICT & Comp. Sc Page 18

19 14 KB, 19 KB, 11 KB and 13 KB blocks. The best fit strategy will allocate 12 KB of the 13 KB block to the process. First Fit: The memory manager places the process in the first unallocated block that is large enough to accommodate the process. Using the same example to fulfil 12 KB request, first fit will allocate 12 KB of the 14 KB block to the process. Worst Fit: The memory manager places the process in the largest block of unallocated memory available. To furnish the 12 KB request again, worst fit will allocate 12 KB of the 19 KB block to the process, leaving a 7 KB block for future use. VII.4 Paging and segmentation 1) Paging Paging is a memory management scheme that allows the processes to be stored noncontiguously in the memory. The memory is divided into fixed size chunks called page frames. The operating system breaks the address space of the program (the collection of addresses used by the program) into fixed size chunks called pages, which are of same size as that of page frames. Generally, page size is of 4 KB. However, some systems support even larger page sizes such as 8 KB and 4 MB. When a process is to be executed, its pages are loaded into unallocated page frames (not necessarily contiguous). The main advantage of paging is that it minimizes the problem of fragmentation since memory allocated is always in fixed units and any free frame can be allocated to a process. 2) Segmentation Segmentation is a Memory Management technique in which memory is divided into variable sized chunks which can be allocated to processes. Each chunk is called a segment. A table stores the information about all such segments and is called Global Descriptor Table (GDT). A GDT entry is called Global Descriptor. 3) Difference between paging and segmentation:- Paging and segmentation are closed relative to each other but they have following difference. Paging divides the virtual memory in physical memory areas while the segmentation divides it logically. Paging divides the memory in fixed length memory areas while segmentation divides into variable length memory areas. In segmentation a full logical portion of the process in loaded, but in paging information about page is loaded. The segments are large length as compare to page. In segmentation memory is divided into segments through software and in paging the memory in divided through hardware. Visit for further learning tools for ICT & Comp. Sc Page 19

20 VII.5 Concept of Virtual Memory VII.5.1 What is virtual memory The basic idea of virtual memory is to hide the details of the real physical memory available in a given system from the user. In particular, virtual memory conceals the fact that physical memory is not allocated to a program as a single contiguous region and also conceals the actual size of available physical memory. Virtual memory is a method of using the computer hard drive to provide extra memory for the computer. Segments of memory are stored on the hard drive known as pages. When a segment of memory is requested that is not in memory it is moved from the virtual memory to an actual memory address. The operating system manages virtual address spaces and the assignment of real memory to virtual memory. Address translation hardware in the CPU, often referred to as a memory management unit or MMU, automatically translates virtual addresses to physical addresses. With virtual memory, the system can run programs that are actually larger than the primary memory of the system. Virtual memory allows for very effective multiprogramming and relieves the user from the unnecessarily tight constraints of main memory VII.5.2 Page Faults Fig: illustration of the concept of virtual memory A page fault is an interruption that occurs when a software program attempts to access an invalid page in memory. Page faults are caused by a software issue or confliction, driver issue, or a hardware related issue. A page fault occurs when a program tries to access a page that is mapped in address space, but not loaded in the physical memory (the RAM). In other words, a page fault occurs when a program can not find a page that it s looking for in the Visit for further learning tools for ICT & Comp. Sc Page 20

Operating System Tutorial

Operating System Tutorial Operating System Tutorial OPERATING SYSTEM TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Operating System Tutorial An operating system (OS) is a collection

More information

Operating Systems 4 th Class

Operating Systems 4 th Class Operating Systems 4 th Class Lecture 1 Operating Systems Operating systems are essential part of any computer system. Therefore, a course in operating systems is an essential part of any computer science

More information

CS420: Operating Systems OS Services & System Calls

CS420: Operating Systems OS Services & System Calls NK YORK COLLEGE OF PENNSYLVANIA HG OK 2 YORK COLLEGE OF PENNSYLVAN OS Services & System Calls James Moscola Department of Physical Sciences York College of Pennsylvania Based on Operating System Concepts,

More information

Computers: Tools for an Information Age

Computers: Tools for an Information Age Computers: Tools for an Information Age Chapter 3 Operating Systems: Software in the Background Objectives of Chapter 3 Describe the functions of an Operating System Explain the basics of a personal computer

More information

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont.

Objectives. Chapter 2: Operating-System Structures. Operating System Services (Cont.) Operating System Services. Operating System Services (Cont. Objectives To describe the services an operating system provides to users, processes, and other systems To discuss the various ways of structuring an operating system Chapter 2: Operating-System Structures

More information

CS3600 SYSTEMS AND NETWORKS

CS3600 SYSTEMS AND NETWORKS CS3600 SYSTEMS AND NETWORKS NORTHEASTERN UNIVERSITY Lecture 2: Operating System Structures Prof. Alan Mislove (amislove@ccs.neu.edu) Operating System Services Operating systems provide an environment for

More information

CHAPTER 15: Operating Systems: An Overview

CHAPTER 15: Operating Systems: An Overview CHAPTER 15: Operating Systems: An Overview The Architecture of Computer Hardware, Systems Software & Networking: An Information Technology Approach 4th Edition, Irv Englander John Wiley and Sons 2010 PowerPoint

More information

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems Module 9: Operating Systems Objective What is an operating system (OS)? OS kernel, and basic functions OS Examples: MS-DOS, MS Windows, Mac OS Unix/Linux Features of modern OS Graphical operating system

More information

Chapter 3. Operating Systems

Chapter 3. Operating Systems Christian Jacob Chapter 3 Operating Systems 3.1 Evolution of Operating Systems 3.2 Booting an Operating System 3.3 Operating System Architecture 3.4 References Chapter Overview Page 2 Chapter 3: Operating

More information

Chapter 5: System Software: Operating Systems and Utility Programs

Chapter 5: System Software: Operating Systems and Utility Programs Understanding Computers Today and Tomorrow 12 th Edition Chapter 5: System Software: Operating Systems and Utility Programs Learning Objectives Understand the difference between system software and application

More information

Chapter 3 Operating-System Structures

Chapter 3 Operating-System Structures Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

Operating Systems, 6 th ed. Test Bank Chapter 7

Operating Systems, 6 th ed. Test Bank Chapter 7 True / False Questions: Chapter 7 Memory Management 1. T / F In a multiprogramming system, main memory is divided into multiple sections: one for the operating system (resident monitor, kernel) and one

More information

Operating System Structures

Operating System Structures COP 4610: Introduction to Operating Systems (Spring 2015) Operating System Structures Zhi Wang Florida State University Content Operating system services User interface System calls System programs Operating

More information

Fall 2009. Lecture 1. Operating Systems: Configuration & Use CIS345. Introduction to Operating Systems. Mostafa Z. Ali. mzali@just.edu.

Fall 2009. Lecture 1. Operating Systems: Configuration & Use CIS345. Introduction to Operating Systems. Mostafa Z. Ali. mzali@just.edu. Fall 2009 Lecture 1 Operating Systems: Configuration & Use CIS345 Introduction to Operating Systems Mostafa Z. Ali mzali@just.edu.jo 1-1 Chapter 1 Introduction to Operating Systems An Overview of Microcomputers

More information

OPERATING SYSTEM SERVICES

OPERATING SYSTEM SERVICES OPERATING SYSTEM SERVICES USER INTERFACE Command line interface(cli):uses text commands and a method for entering them Batch interface(bi):commands and directives to control those commands are entered

More information

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note: Chapter 7 OBJECTIVES Operating Systems Define the purpose and functions of an operating system. Understand the components of an operating system. Understand the concept of virtual memory. Understand the

More information

Chapter 2 System Structures

Chapter 2 System Structures Chapter 2 System Structures Operating-System Structures Goals: Provide a way to understand an operating systems Services Interface System Components The type of system desired is the basis for choices

More information

How To Understand The History Of An Operating System

How To Understand The History Of An Operating System 7 Operating Systems 7.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: 7.2 Understand the role of the operating system.

More information

Example of Standard API

Example of Standard API 16 Example of Standard API System Call Implementation Typically, a number associated with each system call System call interface maintains a table indexed according to these numbers The system call interface

More information

Chapter 4. Operating Systems and File Management

Chapter 4. Operating Systems and File Management Chapter 4 Operating Systems and File Management Chapter Contents Section A: Operating System Basics Section B: Today s Operating Systems Section C: File Basics Section D: File Management Section E: Backup

More information

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson

CS 3530 Operating Systems. L02 OS Intro Part 1 Dr. Ken Hoganson CS 3530 Operating Systems L02 OS Intro Part 1 Dr. Ken Hoganson Chapter 1 Basic Concepts of Operating Systems Computer Systems A computer system consists of two basic types of components: Hardware components,

More information

Lecture 6: Operating Systems and Utility Programs

Lecture 6: Operating Systems and Utility Programs Lecture 6: Operating Systems and Utility Programs Chapter 8 Objectives Identify the types of system software Summarize the startup process on a personal computer Summarize the features of several stand-alone

More information

Chapter Contents. Operating System Activities. Operating System Basics. Operating System Activities. Operating System Activities 25/03/2014

Chapter Contents. Operating System Activities. Operating System Basics. Operating System Activities. Operating System Activities 25/03/2014 Chapter Contents Operating Systems and File Management Section A: Operating System Basics Section B: Today s Operating Systems Section C: File Basics Section D: File Management Section E: Backup Security

More information

Click to view Web Link, click Chapter 8, Click Web Link from left navigation, then click BIOS below Chapter 8 p. 395 Fig. 8-4.

Click to view Web Link, click Chapter 8, Click Web Link from left navigation, then click BIOS below Chapter 8 p. 395 Fig. 8-4. Chapter 8 Objectives Chapter 8 Operating Systems and Utility Programs Identify the the types types of of system software Summarize the the startup process on on a a personal computer Describe the the functions

More information

Operating system Dr. Shroouq J.

Operating system Dr. Shroouq J. 3 OPERATING SYSTEM STRUCTURES An operating system provides the environment within which programs are executed. The design of a new operating system is a major task. The goals of the system must be well

More information

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts Objectives Chapter 5: CPU Scheduling Introduce CPU scheduling, which is the basis for multiprogrammed operating systems Describe various CPU-scheduling algorithms Discuss evaluation criteria for selecting

More information

Chapter 8 Objectives. Chapter 8 Operating Systems and Utility Programs. Operating Systems. Operating Systems. Operating Systems.

Chapter 8 Objectives. Chapter 8 Operating Systems and Utility Programs. Operating Systems. Operating Systems. Operating Systems. Chapter 8 Objectives Chapter 8 s and Utility Programs Describe the two types of software Understand the startup process for a personal computer Describe the term user interface Explain features common

More information

Types Of Operating Systems

Types Of Operating Systems Types Of Operating Systems Date 10/01/2004 1/24/2004 Operating Systems 1 Brief history of OS design In the beginning OSes were runtime libraries The OS was just code you linked with your program and loaded

More information

Software: Systems and Application Software

Software: Systems and Application Software Software: Systems and Application Software Computer Software Operating System Popular Operating Systems Language Translators Utility Programs Applications Programs Types of Application Software Personal

More information

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines

Chapter 3: Operating-System Structures. System Components Operating System Services System Calls System Programs System Structure Virtual Machines Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines Operating System Concepts 3.1 Common System Components

More information

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc.

Technology in Action. Alan Evans Kendall Martin Mary Anne Poatsy. Eleventh Edition. Copyright 2015 Pearson Education, Inc. Technology in Action Alan Evans Kendall Martin Mary Anne Poatsy Eleventh Edition Technology in Action Chapter 4 System Software: The Operating System, Utility Programs, and File Management. Chapter Topics

More information

STUDY GUIDE CHAPTER 4

STUDY GUIDE CHAPTER 4 STUDY GUIDE CHAPTER 4 True/False Indicate whether the statement is true or false. 1. A(n) desktop operating system is designed for a desktop or notebook personal computer. 2. A(n) mirrored user interface

More information

CPU Scheduling. CPU Scheduling

CPU Scheduling. CPU Scheduling CPU Scheduling Electrical and Computer Engineering Stephen Kim (dskim@iupui.edu) ECE/IUPUI RTOS & APPS 1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling

More information

A single user ran a single program ran on a single computer there was no need for Page 1 of 6 Copyright Virtual University of Pakistan

A single user ran a single program ran on a single computer there was no need for Page 1 of 6 Copyright Virtual University of Pakistan Lecture 11 Operating Systems Focus of the last lecture: computer SW 1. We found out about the role SW plays in a computing environment 2. We learned to distinguish between SW belonging to the system &

More information

Upon completion of this chapter, you will able to answer the following questions:

Upon completion of this chapter, you will able to answer the following questions: CHAPTER 2 Operating Systems Objectives Upon completion of this chapter, you will able to answer the following questions: What is the purpose of an OS? What role do the shell and kernel play? What is the

More information

Chapter 2: OS Overview

Chapter 2: OS Overview Chapter 2: OS Overview CmSc 335 Operating Systems 1. Operating system objectives and functions Operating systems control and support the usage of computer systems. a. usage users of a computer system:

More information

This tutorial will take you through step by step approach while learning Operating System concepts.

This tutorial will take you through step by step approach while learning Operating System concepts. About the Tutorial An operating system (OS) is a collection of software that manages computer hardware resources and provides common services for computer programs. The operating system is a vital component

More information

Learning Objectives. Chapter 1: Networking with Microsoft Windows 2000 Server. Basic Network Concepts. Learning Objectives (continued)

Learning Objectives. Chapter 1: Networking with Microsoft Windows 2000 Server. Basic Network Concepts. Learning Objectives (continued) Chapter 1: Networking with Microsoft Learning Objectives Plan what network model to apply to your network Compare the differences between Windows 2000 Professional, Server, Advanced Server, and Datacenter

More information

3 - Introduction to Operating Systems

3 - Introduction to Operating Systems 3 - Introduction to Operating Systems Mark Handley What is an Operating System? An OS is a program that: manages the computer hardware. provides the basis on which application programs can be built and

More information

Operating System Software

Operating System Software Operating System Software Lecture 7 The operating system Defines our computing experience. First software we see when we turn on the computer, and the last software we see when the computer is turned off.

More information

Introduction. What is an Operating System?

Introduction. What is an Operating System? Introduction What is an Operating System? 1 What is an Operating System? 2 Why is an Operating System Needed? 3 How Did They Develop? Historical Approach Affect of Architecture 4 Efficient Utilization

More information

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Based on original slides by Silberschatz, Galvin and Gagne 1 Basic Concepts CPU I/O Burst Cycle Process execution

More information

Operating Systems. Notice that, before you can run programs that you write in JavaScript, you need to jump through a few hoops first

Operating Systems. Notice that, before you can run programs that you write in JavaScript, you need to jump through a few hoops first Operating Systems Notice that, before you can run programs that you write in JavaScript, you need to jump through a few hoops first JavaScript interpreter Web browser menu / icon / dock??? login??? CPU,

More information

Operating Systems Overview As we have learned in working model of a computer we require a software system to control all the equipment that are

Operating Systems Overview As we have learned in working model of a computer we require a software system to control all the equipment that are Session 07 Operating Systems Overview As we have learned in working model of a computer we require a software system to control all the equipment that are connected to computer and provide good environment

More information

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems Lecture Outline Operating Systems Objectives Describe the functions and layers of an operating system List the resources allocated by the operating system and describe the allocation process Explain how

More information

Chapter 8 Operating Systems and Utility Programs

Chapter 8 Operating Systems and Utility Programs Operating Systems What are the functions of an? start the computer provide a user interface manage programs Chapter 8 Operating Systems and Utility Programs administer security control a network manage

More information

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization

Lesson Objectives. To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization Lesson Objectives To provide a grand tour of the major operating systems components To provide coverage of basic computer system organization AE3B33OSD Lesson 1 / Page 2 What is an Operating System? A

More information

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum

Scheduling. Yücel Saygın. These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum Scheduling Yücel Saygın These slides are based on your text book and on the slides prepared by Andrew S. Tanenbaum 1 Scheduling Introduction to Scheduling (1) Bursts of CPU usage alternate with periods

More information

Chapter 1: Introduction. What is an Operating System?

Chapter 1: Introduction. What is an Operating System? Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems Multiprocessor Systems Distributed Systems Clustered System Real -Time Systems Handheld Systems Computing Environments

More information

Operating System Structures

Operating System Structures Operating System Structures Meelis ROOS mroos@ut.ee Institute of Computer Science Tartu University fall 2009 Literature A. S. Tanenbaum. Modern Operating Systems. 2nd ed. Prentice Hall. 2001. G. Nutt.

More information

Chapter 11 I/O Management and Disk Scheduling

Chapter 11 I/O Management and Disk Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 11 I/O Management and Disk Scheduling Dave Bremer Otago Polytechnic, NZ 2008, Prentice Hall I/O Devices Roadmap Organization

More information

Contents. Chapter 1. Introduction

Contents. Chapter 1. Introduction Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

Operating Systems. and Windows

Operating Systems. and Windows Operating Systems and Windows What is an Operating System? The most important program that runs on your computer. It manages all other programs on the machine. Every PC has to have one to run other applications

More information

CPU Scheduling Outline

CPU Scheduling Outline CPU Scheduling Outline What is scheduling in the OS? What are common scheduling criteria? How to evaluate scheduling algorithms? What are common scheduling algorithms? How is thread scheduling different

More information

Mobile Operating Systems. Week I

Mobile Operating Systems. Week I Mobile Operating Systems Week I Overview Introduction Mobile Operating System Structure Mobile Operating System Platforms Java ME Platform Palm OS Symbian OS Linux OS Windows Mobile OS BlackBerry OS iphone

More information

Chapter 6, The Operating System Machine Level

Chapter 6, The Operating System Machine Level Chapter 6, The Operating System Machine Level 6.1 Virtual Memory 6.2 Virtual I/O Instructions 6.3 Virtual Instructions For Parallel Processing 6.4 Example Operating Systems 6.5 Summary Virtual Memory General

More information

Technical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management.

Technical Properties. Mobile Operating Systems. Overview Concepts of Mobile. Functions Processes. Lecture 11. Memory Management. Overview Concepts of Mobile Operating Systems Lecture 11 Concepts of Mobile Operating Systems Mobile Business I (WS 2007/08) Prof Dr Kai Rannenberg Chair of Mobile Business and Multilateral Security Johann

More information

4.1 Introduction 4.2 Explain the purpose of an operating system 4.2.1 Describe characteristics of modern operating systems Control Hardware Access

4.1 Introduction 4.2 Explain the purpose of an operating system 4.2.1 Describe characteristics of modern operating systems Control Hardware Access 4.1 Introduction The operating system (OS) controls almost all functions on a computer. In this lecture, you will learn about the components, functions, and terminology related to the Windows 2000, Windows

More information

Overview of Operating Systems Instructor: Dr. Tongping Liu

Overview of Operating Systems Instructor: Dr. Tongping Liu Overview of Operating Systems Instructor: Dr. Tongping Liu Thank Dr. Dakai Zhu and Dr. Palden Lama for providing their slides. 1 Lecture Outline Operating System: what is it? Evolution of Computer Systems

More information

Chapter 3: Operating-System Structures. Common System Components

Chapter 3: Operating-System Structures. Common System Components Chapter 3: Operating-System Structures System Components Operating System Services System Calls System Programs System Structure Virtual Machines System Design and Implementation System Generation 3.1

More information

Operating Systems. III. Scheduling. http://soc.eurecom.fr/os/

Operating Systems. III. Scheduling. http://soc.eurecom.fr/os/ Operating Systems Institut Mines-Telecom III. Scheduling Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ Outline Basics of Scheduling Definitions Switching

More information

OPERATING SYSTEMS Software in the Background. Chapter 2

OPERATING SYSTEMS Software in the Background. Chapter 2 OPERATING SYSTEMS Software in the Background Chapter 2 Objectives Describe the functions of an Operating System Explain the basics of a personal computer operating system Describe the advantages of a graphical

More information

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study

CS 377: Operating Systems. Outline. A review of what you ve learned, and how it applies to a real operating system. Lecture 25 - Linux Case Study CS 377: Operating Systems Lecture 25 - Linux Case Study Guest Lecturer: Tim Wood Outline Linux History Design Principles System Overview Process Scheduling Memory Management File Systems A review of what

More information

System Structures. Services Interface Structure

System Structures. Services Interface Structure System Structures Services Interface Structure Operating system services (1) Operating system services (2) Functions that are helpful to the user User interface Command line interpreter Batch interface

More information

Chapter 5 Process Scheduling

Chapter 5 Process Scheduling Chapter 5 Process Scheduling CPU Scheduling Objective: Basic Scheduling Concepts CPU Scheduling Algorithms Why Multiprogramming? Maximize CPU/Resources Utilization (Based on Some Criteria) CPU Scheduling

More information

Networking Operating Systems (CO32010)

Networking Operating Systems (CO32010) Networking Operating Systems (CO32010) 2. Processes and scheduling 1. Operating Systems 1.1 NOS definition and units 1.2 Computer 7. Encryption Systems 1.3 Multitasking and Threading 1.4 Exercises 6. Routers

More information

W4118 Operating Systems. Instructor: Junfeng Yang

W4118 Operating Systems. Instructor: Junfeng Yang W4118 Operating Systems Instructor: Junfeng Yang Outline Introduction to scheduling Scheduling algorithms 1 Direction within course Until now: interrupts, processes, threads, synchronization Mostly mechanisms

More information

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture

Review from last time. CS 537 Lecture 3 OS Structure. OS structure. What you should learn from this lecture Review from last time CS 537 Lecture 3 OS Structure What HW structures are used by the OS? What is a system call? Michael Swift Remzi Arpaci-Dussea, Michael Swift 1 Remzi Arpaci-Dussea, Michael Swift 2

More information

Process Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff

Process Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff Process Scheduling CS 241 February 24, 2012 Copyright University of Illinois CS 241 Staff 1 Announcements Mid-semester feedback survey (linked off web page) MP4 due Friday (not Tuesday) Midterm Next Tuesday,

More information

Outline: Operating Systems

Outline: Operating Systems Outline: Operating Systems What is an OS OS Functions Multitasking Virtual Memory File Systems Window systems PC Operating System Wars: Windows vs. Linux 1 Operating System provides a way to boot (start)

More information

Chapter 4. System Software. What You Will Learn... Computers Are Your Future. System Software. What You Will Learn... Starting the Computer

Chapter 4. System Software. What You Will Learn... Computers Are Your Future. System Software. What You Will Learn... Starting the Computer What You Will Learn... Computers Are Your Future Chapter 4 The two major components of operating system software Why a computer isn t useful without an operating system The five basic functions of an operating

More information

lesson 1 An Overview of the Computer System

lesson 1 An Overview of the Computer System essential concepts lesson 1 An Overview of the Computer System This lesson includes the following sections: The Computer System Defined Hardware: The Nuts and Bolts of the Machine Software: Bringing the

More information

Overview and History of Operating Systems

Overview and History of Operating Systems Overview and History of Operating Systems These are the notes for lecture 1. Please review the Syllabus notes before these. Overview / Historical Developments An Operating System... Sits between hardware

More information

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run SFWR ENG 3BB4 Software Design 3 Concurrent System Design 2 SFWR ENG 3BB4 Software Design 3 Concurrent System Design 11.8 10 CPU Scheduling Chapter 11 CPU Scheduling Policies Deciding which process to run

More information

Components of a Computing System. What is an Operating System? Resources. Abstract Resources. Goals of an OS. System Software

Components of a Computing System. What is an Operating System? Resources. Abstract Resources. Goals of an OS. System Software What is an Operating System? An operating system (OS) is a collection of software that acts as an intermediary between users and the computer hardware One can view an OS as a manager of system resources

More information

Lecture 1 Operating System Overview

Lecture 1 Operating System Overview Lecture 1 Operating System Overview What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. The Major Objectives of an Operating system

More information

Lesson 06: Basics of Software Development (W02D2

Lesson 06: Basics of Software Development (W02D2 Lesson 06: Basics of Software Development (W02D2) Balboa High School Michael Ferraro Lesson 06: Basics of Software Development (W02D2 Do Now 1. What is the main reason why flash

More information

Operating System Fundamentals Robert Power & Robert Ford

Operating System Fundamentals Robert Power & Robert Ford Operating System Fundamentals Robert Power & Robert Ford School of Information Technology College of the North Atlantic-Qatar 2009 Table of Contents Introduction 5 Unit 1: Computer Architecture Review

More information

Network operating systems typically are used to run computers that act as servers. They provide the capabilities required for network operation.

Network operating systems typically are used to run computers that act as servers. They provide the capabilities required for network operation. NETWORK OPERATING SYSTEM Introduction Network operating systems typically are used to run computers that act as servers. They provide the capabilities required for network operation. Network operating

More information

Chapter 7A. Functions of Operating Systems. Types of Operating Systems. Operating System Basics

Chapter 7A. Functions of Operating Systems. Types of Operating Systems. Operating System Basics Chapter 7A Operating System Basics Functions of Operating Provide a user interface Run programs Manage hardware devices Organized file storage 2 Types of Operating Real-time operating system Very fast

More information

Operating System: Scheduling

Operating System: Scheduling Process Management Operating System: Scheduling OS maintains a data structure for each process called Process Control Block (PCB) Information associated with each PCB: Process state: e.g. ready, or waiting

More information

Discovering Computers

Discovering Computers Discovering Computers Technology in a World of Computers, Mobile Devices, and the Internet Chapter 9 Operating Systems Objectives Overview Define an operating system Describe the start-up process and shutdown

More information

Functions of NOS Overview of NOS Characteristics Differences Between PC and a NOS Multiuser, Multitasking, and Multiprocessor Systems NOS Server

Functions of NOS Overview of NOS Characteristics Differences Between PC and a NOS Multiuser, Multitasking, and Multiprocessor Systems NOS Server Functions of NOS Overview of NOS Characteristics Differences Between PC and a NOS Multiuser, Multitasking, and Multiprocessor Systems NOS Server Hardware Windows Windows NT 4.0 Linux Server Software and

More information

Principles of Operating Systems CS 446/646

Principles of Operating Systems CS 446/646 Principles of Operating Systems CS 446/646 1. Introduction to Operating Systems a. Role of an O/S b. O/S History and Features c. Types of O/S Mainframe systems Desktop & laptop systems Parallel systems

More information

OS OBJECTIVE QUESTIONS

OS OBJECTIVE QUESTIONS OS OBJECTIVE QUESTIONS Which one of the following is Little s formula Where n is the average queue length, W is the time that a process waits 1)n=Lambda*W 2)n=Lambda/W 3)n=Lambda^W 4)n=Lambda*(W-n) Answer:1

More information

A LECTURE NOTE ON CSC 322 OPERATING SYSTEM I DR. S. A. SODIYA

A LECTURE NOTE ON CSC 322 OPERATING SYSTEM I DR. S. A. SODIYA A LECTURE NOTE ON CSC 322 OPERATING SYSTEM I BY DR. S. A. SODIYA 1 SECTION ONE 1.0 INTRODUCTION TO OPERATING SYSTEMS 1.1 DEFINITIONS OF OPERATING SYSTEMS An operating system (commonly abbreviated OS and

More information

4003-440/4003-713 Operating Systems I. Process Scheduling. Warren R. Carithers (wrc@cs.rit.edu) Rob Duncan (rwd@cs.rit.edu)

4003-440/4003-713 Operating Systems I. Process Scheduling. Warren R. Carithers (wrc@cs.rit.edu) Rob Duncan (rwd@cs.rit.edu) 4003-440/4003-713 Operating Systems I Process Scheduling Warren R. Carithers (wrc@cs.rit.edu) Rob Duncan (rwd@cs.rit.edu) Review: Scheduling Policy Ideally, a scheduling policy should: Be: fair, predictable

More information

Virtual Machines. www.viplavkambli.com

Virtual Machines. www.viplavkambli.com 1 Virtual Machines A virtual machine (VM) is a "completely isolated guest operating system installation within a normal host operating system". Modern virtual machines are implemented with either software

More information

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching

Multiprogramming. IT 3123 Hardware and Software Concepts. Program Dispatching. Multiprogramming. Program Dispatching. Program Dispatching IT 3123 Hardware and Software Concepts Operating Systems II October 26 Multiprogramming Two or more application programs in memory. Consider one CPU and more than one program. This can be generalized to

More information

Operating Systems Concepts: Chapter 7: Scheduling Strategies

Operating Systems Concepts: Chapter 7: Scheduling Strategies Operating Systems Concepts: Chapter 7: Scheduling Strategies Olav Beckmann Huxley 449 http://www.doc.ic.ac.uk/~ob3 Acknowledgements: There are lots. See end of Chapter 1. Home Page for the course: http://www.doc.ic.ac.uk/~ob3/teaching/operatingsystemsconcepts/

More information

The Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example

The Deadlock Problem. Deadlocks. Deadlocks. Bridge Crossing Example The Deadlock Problem Deadlocks A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 tape drives. P 1 and P 2 each

More information

Operating Systems Lecture #6: Process Management

Operating Systems Lecture #6: Process Management Lecture #6: Process Written by based on the lecture series of Dr. Dayou Li and the book Understanding 4th ed. by I.M.Flynn and A.McIver McHoes (2006) Department of Computer Science and Technology,., 2013

More information

Operating System Today s Operating Systems File Basics File Management Application Software

Operating System Today s Operating Systems File Basics File Management Application Software Lecture Content Operating System Today s Operating Systems File Basics File Management Application Software Operating Systems and File Management 2 Operating Systems and File Management 3 Operating System

More information

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances: Scheduling Scheduling Scheduling levels Long-term scheduling. Selects which jobs shall be allowed to enter the system. Only used in batch systems. Medium-term scheduling. Performs swapin-swapout operations

More information

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System? Management Challenge Managing Hardware Assets What computer processing and storage capability does our organization need to handle its information and business transactions? What arrangement of computers

More information

Operating Systems Introduction

Operating Systems Introduction Operating Systems Introduction Chester Rebeiro IIT Madras Webpage : http://www.cse.iitm.ac.in/~chester/courses/15o_os/index.html The Layers in Systems Applications Operating Systems Computer Organization

More information

Chap-02, Hardware and Software. Hardware Model

Chap-02, Hardware and Software. Hardware Model Philadelphia University School of Business Administration INFO-101 Information Systems Prof London Chap-02, Hardware and Software Hardware Components Central processing unit (CPU) Arithmetic/logic unit

More information

Operating Systems: Basic Concepts and History

Operating Systems: Basic Concepts and History Introduction to Operating Systems Operating Systems: Basic Concepts and History An operating system is the interface between the user and the architecture. User Applications Operating System Hardware Virtual

More information

EUCIP IT Administrator - Module 2 Operating Systems Syllabus Version 3.0

EUCIP IT Administrator - Module 2 Operating Systems Syllabus Version 3.0 EUCIP IT Administrator - Module 2 Operating Systems Syllabus Version 3.0 Copyright 2011 ECDL Foundation All rights reserved. No part of this publication may be reproduced in any form except as permitted

More information

International Engineering Journal For Research & Development

International Engineering Journal For Research & Development Evolution Of Operating System And Open Source Android Application Nilesh T.Gole 1, Amit Manikrao 2, Niraj Kanot 3,Mohan Pande 4 1,M.tech(CSE)JNTU, 2 M.tech(CSE)SGBAU, 3 M.tech(CSE),JNTU, Hyderabad 1 sheyanilu@gmail.com,

More information