OPERATING SYSTEMS CONCEPTS

LECTURE NOTES

COURSE CODE: CSYS2402

Compiled by Mrs. G. Campbell
Copyright @ 2010

TABLE OF CONTENTS
COURSE OUTLINE .............................................................................................................. 7 LECTURE 1 – INTRODUCTION (1/2 HOUR) .................................................................. 14 DEFINE OPERATING SYSTEM.................................................................................................. 14 TYPES/CATEGORIES OF OPERATING SYSTEMS ....................................................................... 15 Stand-alone ...................................................................................................................... 15 Network ............................................................................................................................ 15 Embedded ........................................................................................................................ 16 TUTORIAL QUESTIONS .......................................................................................................... 16 PRACTICE MCQS ................................................................................................................. 16 THE HISTORY AND DEVELOPMENT OF THE OPERATING SYSTEM ............................................... 18 TUTORIAL QUESTIONS .......................................................................................................... 21 PRACTICE MCQS ................................................................................................................. 21 LECTURE 2 - OPERATING SYSTEMS FUNCTIONS (1 HOUR) .................................. 23 FUNCTIONS .......................................................................................................................... 23 WHAT IS A USER INTERFACE? ............................................................................................... 24 SERVICES ............................................................................................................................. 25 Buffering .......................................................................................................................... 25 Spooling (Simultaneous Peripheral Operation On-Line) .................................................. 25 Other Services .................................................................................................................. 26 TUTORIAL QUESTIONS .......................................................................................................... 27 PRACTICE MCQS ................................................................................................................. 27 LECTURE 3 - SOFTWARE AND FIRMWARE (1/2 HOUR) ........................................... 29 SYSTEM SOFTWARE.............................................................................................................. 29 APPLICATION SOFTWARE ...................................................................................................... 29 FIRMWARE ........................................................................................................................... 31 TUTORIAL QUESTIONS .......................................................................................................... 31 PRACTICE MCQS ................................................................................................................. 32 LECTURE 4 - FILE CONCEPTS (1 HOUR) ..................................................................... 34 FILE ATTRIBUTES ................................................................................................................. 34 FILE OPERATIONS ................................................................................................................. 35 What the Operating System must do for each of the 5 basic file operations ...................... 35 TUTORIAL QUESTIONS .......................................................................................................... 36 PRACTICE MCQS ................................................................................................................. 36 LECTURE 5 - DIRECTORY SYSTEMS (2 HOURS)........................................................ 38 DIRECTORY OPERATIONS ..................................................................................................... 38 DIRECTORY SYSTEMS TYPES OF DIRECTORIES/DIRECTORY STRUCTURES ................................ 38 TUTORIAL QUESTIONS .......................................................................................................... 41
Operating System Concepts Mrs. G. Campbell Copyright @ 2010 Updated Jan 2010

1

PRACTICE MCQS ................................................................................................................. 41 LECTURE 6 - MULTI-PROGRAMMING AND TIMESHARING (1 HOUR) ................ 42 MULTI-PROGRAMMING ......................................................................................................... 42 TUTORIAL QUESTIONS .......................................................................................................... 43 PRACTICE MCQS ................................................................................................................. 43 TIME SHARING ..................................................................................................................... 44 TUTORIAL QUESTIONS .......................................................................................................... 44 LECTURE 7 - SCHEDULING CONCEPTS, CRITERIA, ALGORITHMS (6 HOURS) 45 SCHEDULING CONCEPTS ....................................................................................................... 45 TUTORIAL QUESTIONS .......................................................................................................... 46 PRACTICE MCQS ................................................................................................................. 46 SCHEDULING CRITERIA ......................................................................................................... 48 TUTORIAL QUESTIONS .......................................................................................................... 48 PRACTICE MCQS ................................................................................................................. 48 SCHEDULING ALGORITHMS ................................................................................................... 49 First Come First Served or First In First Out (FCFS/FIFO) ............................................. 49 Shortest Job First (SJF).................................................................................................... 49 Priority ............................................................................................................................ 50 Round robin (RR) ............................................................................................................. 50 Pre-emptive ...................................................................................................................... 50 Multilevel queues ............................................................................................................. 51 TUTORIAL QUESTIONS .......................................................................................................... 51 PRACTICE MCQS ................................................................................................................. 52 LECTURE 8- MULTIPLE PROCESSOR SCHEDULING (2 HOURS) ........................... 54 ASYMMETRIC MULTIPROCESSING .......................................................................................... 54 SYMMETRIC MULTIPROCESSING ........................................................................................... 54 HOMOGENOUS AND HETEROGENOUS SYSTEMS ...................................................................... 55 TUTORIAL QUESTIONS .......................................................................................................... 55 PRACTICE MCQS ................................................................................................................. 55 LECTURE 9 - MEMORY MANAGEMENT (1 HOUR).................................................... 57 INTRODUCTION .................................................................................................................... 57 TUTORIAL QUESTIONS .......................................................................................................... 57 PRACTICE MCQS ................................................................................................................. 58 MEMORY HIERARCHY........................................................................................................... 59 TUTORIAL QUESTIONS .......................................................................................................... 59 PRACTICE MCQS ................................................................................................................. 60 LECTURE 10 - BASIC MEMORY HARDWARE – BASE REGISTER, LIMIT REGISTER (1 HOUR) ......................................................................................................... 61 WHAT IS A REGISTER?........................................................................................................... 61 TYPES OF REGISTERS ............................................................................................................ 61 TUTORIAL QUESTIONS .......................................................................................................... 62 LECTURE 11 - LOGICAL VS. PHYSICAL ADDRESS SPACE (1 HOUR) .................... 63
Operating System Concepts Mrs. G. Campbell Copyright @ 2010 Updated Jan 2010

2

................................TUTORIAL QUESTIONS ...................................................................................................................................................................... 81 PRACTICE MCQS ................................................................................... 82 DISADVANTAGES .......................... 64 LECTURE 12 – SWAPPING (1 HOUR) ......................................................................................................................................................... 80 OPTIMAL REPLACEMENT ........................................................................................ 67 CONTIGUOUS ALLOCATION .................................................................................................................................................................................................. 69 MEMORY ALLOCATION STRATEGIES – FIRST FIT.........DEMAND PAGING (2 HOURS) .................................................................. 76 TUTORIAL QUESTIONS ................................................................. 75 PRACTICE MCQS ...................................... 80 LEAST FREQUENTLY USED (LFU) ..................................... 67 NON-CONTIGUOUS ALLOCATION ......................................................... 79 TUTORIAL QUESTIONS .................................................................................................................. 72 TUTORIAL QUESTIONS ..................................................................................................................................................................................................................................................................................................................................... 65 PRACTICE MCQS .......................................................................................................................................................................................................... 76 VIRTUAL ADDRESS SPACE ................................................... 63 PRACTICE MCQS ....................................................................................................................................................................... BEST-FIT............................................................................CONTIGUOUS VS NON CONTIGUOUS MEMORY ALLOCATION (4 HOURS) ................. 65 LECTURE 13 ............................................................................... 72 PARTITIONS........................................ 70 TUTORIAL QUESTIONS ............................ 70 PRACTICE MCQS .. 80 FIFO ....................... 76 PRACTICE MCQS ........................................................... 81 LECTURE 18 ...................................................... 82 ADVANTAGES ................................................ 79 LECTURE 17 ..................................................................................... 79 DISADVANTAGES: ....................................................................................................................................................................................................................................................................................................................................................................................................... WORST-FIT ........PAGE REPLACEMENT (3 HOURS) ............................................................................................................................................................................................ EXTERNAL.............INTRODUCTION TO VIRTUAL MEMORY (1 HOUR) ..................................................... Campbell Copyright @ 2010 Updated Jan 2010 3 ............... 80 MOST FREQUENTLY USED (MFU)........ 67 TUTORIAL QUESTIONS ........................................................PURE PAGING (2 HOURS) ..................................................................... 76 LECTURE 16 .............................................. 74 PRACTICE MCQS ............................................. 82 Operating System Concepts Mrs....................... 68 PRACTICE MCQS .......................................................................................................................................................... 80 TUTORIAL QUESTIONS ...... 74 FRAGMENTATION – INTERNAL............................................. 75 TUTORIAL QUESTIONS .......................................................... 80 ALLOCATION ALGORITHMS .................... G..... 65 TUTORIAL QUESTIONS ...................................... 75 LECTURE 15 ........ 70 LECTURE 14 – PARTITIONS AND FRAGMENTATION (1 HOUR).. 80 LEAST RECENTLY USED (LRU) ................................................................................................................................................... 78 ADVANTAGES: .........................................................................................................................

..................................... 83 TUTORIAL QUESTIONS ............................ 93 Shortest seek time first (SSTF) ....................................................................................................................................................................MOVING-HEAD DISK STORAGE (2 HOURS) ........FILE SERVER SYSTEMS (1 HOUR) .................................................. 88 BLOCKS .......................................... 91 OPERATIONS ON MOVING-HEAD DISK STORAGE ............................................................................................................................................ 100 PRACTICE MCQS ................................................ 99 TUTORIAL QUESTIONS ......................... 95 RAID LEVELS ............................................................................................................................................................... 83 LECTURE 19 – SEGMENTATION (1 HOUR) .................................................DISTRIBUTED FILE SYSTEMS (1 HOUR) ..................................................................................................................... 91 PRACTICE MCQS ............................................................... 93 TUTORIAL QUESTIONS ................................................................................. 94 LECTURE 22 – RAID (2 HOURS) .....AUXILIARY STORAGE MANAGEMENT (1 HOUR) ......... 100 LECTURE 24 ..................................................................................................................................... FATHER............................................................................................................................................................................. 92 PRACTICE MCQS ...... 88 INTRODUCTION ...................................... 89 TUTORIAL QUESTIONS .......................................................... 88 TUTORIAL QUESTIONS ..... 103 Operating System Concepts Mrs.................................................................................................................................. 89 DISK CACHING ..................................................................................... 90 LECTURE 21 ............................................................................................................ 91 MEASURES OF MAGNETIC DISK PERFORMANCE ................ 88 RAM AND OPTICAL DISKS ............................................................................................................................................................................ 94 PRACTICE MCQS ....................................................... 93 First come first served (FCFS) ................................................................................................................................................................................................ 102 TUTORIAL QUESTIONS ........................................................................ G.................................................................................................. 101 LECTURE 25 .................................................................................... 86 PRACTICE MCQS ..................................................................................................... 92 TUTORIAL QUESTIONS ..................................................................................................................................................................................................... 83 PRACTICE MCQS ..... 99 GRAND FATHER................. 101 TUTORIAL QUESTIONS ......................................................... Campbell Copyright @ 2010 Updated Jan 2010 4 .................................................................................................................................................................. 95 TUTORIAL QUESTIONS ................................ 103 PRACTICE MCQS .................... SON TECHNIQUE FOR MAGNETIC TAPE ................ 98 LECTURE 23 – BACKUP AND RECOVERY METHODS (1 HOUR) .................................. 88 TUTORIAL QUESTIONS .................................................................................................. 99 BACKUP TIPS ........................................................................................................................................................... 93 SCAN and C-SCAN ................................................. 87 LECTURE 20 ..................................................................................................... 93 LOOK and C-LOOK .................................................................................................... 85 TUTORIAL QUESTIONS ...........................................................................................................................................................................................THRASHING............................................................... 88 TUTORIAL QUESTIONS ................. 92 DISK SCHEDULING ........................................

.............................................................................. VIRUS PROTECTION...........................................CO-PROCESSORS (1/4 HOUR)....................................................................................................... 120 Microsoft Windows ............. 106 Advantages of RISC ................................................ 109 CISC ....... 112 CRISC...................................... 104 ADVANTAGES ............................................................................................................................................................................................................................................................................................................................................ 117 Authentication ........................................ 116 Logic bomb .................. 120 MacOS ...... 107 Disadvantages of RISC...................................... 119 OS/400 .......................................................................................................... 118 CASE STUDIES ............................................................................................................................................................................................................................................................................................ 112 SUMMARY/CONCLUSION ......... 116 Denial-of-service..................... 111 Disadvantages of CISC ................................................................................................................................................................................................................................................................................................ 104 PRACTICE MCQS ...................................................................................... 117 Firewall............................................................................................. 111 Examples of CISC Processors/Chips ...................................................... 104 TUTORIAL QUESTIONS .......................................................................................... 110 Advantages of CISC ................................................... 117 AUTHENTICATION......................................................................................RISC/CISC (3/4 HOUR) ..................... 106 RISC (REDUCED INSTRUCTION SET COMPUTING) .......................................................... 115 DEFINITION OF SECURITY.................................................................................. 113 LECTURE 28 – SECURITY (1 HOUR) ............ 116 Trojan Horse ........................ 115 PURPOSE OF SECURITY .............................................................................................................................................................................................................................. 120 Novell Netware ............................................................................ 116 Worm ............................................................................. 117 Encryption ..............................................................................LECTURE 26 ................................................................................. 117 PRACTICE MCQS ....................................................................................................................................................................................................... 104 MATH CO-PROCESSORS .......................... FIREWALL ... 113 PRACTICE MCQS ........................................ ENCRYPTION........................................................... 115 SECURITY THREATS AND ATTACKS .................................................... 119 UNIX.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 117 Virus protection.................................................................................... 105 LECTURE 27 ............... 119 MS-DOS............................................ 117 TUTORIAL QUESTIONS ......................................................................... 116 Virus .............................................. 119 OS/2 ........................................................................................................................................... 115 FORMS OF SECURITY VIOLATION ............................................................................................................................................ 104 DISADVANTAGES ........................................ Campbell Copyright @ 2010 Updated Jan 2010 5 ........................................................................................... 121 Operating System Concepts Mrs.................. 113 TUTORIAL QUESTIONS ....................................................................... 108 Examples of RISC Processors..................................................................................................................................................................................................................................................... G..........

TUTORIAL QUESTIONS ..................... Campbell Copyright @ 2010 Updated Jan 2010 6 ............................. 121 REFERENCES ................................................................ 122 Operating System Concepts Mrs............. G...............................................................................................

Campbell Copyright @ 2010 7 . device and memory management. 4. students should be able to: 1. 2. G. GENERAL OBJECTIVES: Upon successful completion of this course. Topics that will be examined include processes and interprocess communication/synchronization. 5. 3. virtual memory. process scheduling. define operating system describe the historical development of operating systems describe at least six (6) functions and services of an operating system explain the difference between application and system software define firmware Updated Jan 2010 Operating Systems Concepts CSYS2402 3 45 (45 hours theory) None None (2 hours) Operating System Concepts Mrs. understand the fundamental concepts of modern operating systems 2. deadlock and the tradeoffs in the design of large-scale multitasking operating systems. appreciate the wide variety of operating systems within diverse platforms 3.COURSE OUTLINE THE COUNCIL OF COMMUNITY COLLEGES OF JAMAICA COURSE NAME: COURSE CODE: CREDITS: CONTACT HOURS: PRE-REQUISITE(S): CO-REQUISITE(S): SEMESTER: COURSE DESCRIPTION: This course presents the basic concepts of operating systems. use system tools to execute various computer functions UNIT I . interrupt handling. program loading and linking system calls and system programs. manipulate operating systems 4.Introduction Specific Objectives: Upon successful completion of this unit. students should: 1.

2. list and describe at least five (5) file attributes describe at least five (5) file operations list at least five (5) directory operations describe at least four (4) directory structures compare and contrast the directory structures Content: 1. d. Tree-Structured. Program execution. 4. System Software b.Content: 1. students should be able to: a. User Interface. Storage. Communications. f. System Startup. File Concepts – File Attributes. File-system manipulation. Introduction: a. Protection and Security. I/O – (Buffering. G. Define operating system. Software and Firmware: a. h. Operating Systems Functions: a. Two-level. e. File Operations 2. 3. students should be able to: 1. g. Application Software c. Utilities UNIT II – Directory Systems Specific Objectives: (3 hours) Upon successful completion of this unit. explain multiprogramming explain timesharing describe the CPU – I/O burst cycle distinguish between preemptive and non-preemptive scheduling state the functions of the dispatcher list and explain at least three (3) scheduling criteria describe at least four (4) scheduling algorithms given a table with process data: Updated Jan 2010 Operating System Concepts Mrs. Spooling). c. b. 2. Error Detection 3. 5. b. The history and development of the operating system. Directory Systems – Single-level. Campbell Copyright @ 2010 8 . Resource Allocation. Acyclic-Graph UNIT III – CPU Scheduling Specific Objectives: (9 hours) Upon successful completion of this unit.

Scheduling criteria 4. students should be able to: 1. Memory hierarchy Basic memory hardware – base register. worst-fit Partitions Fragmentation – internal. describe the memory hierarchy describe the basic hardware used in memory management distinguish between logical and physical addresses explain swapping distinguish between contiguous and non-contiguous memory allocation explain partitioning describe the three (3) memory allocation strategies given a list of free holes and a list of processes.i. Campbell Copyright @ 2010 9 . G. Calculate the average wait time for each scheduling algorithm c. 2. correctly allocate the processes to holes using the three (3) memory allocation strategies 9. 4. 8. 5. Multiple processor scheduling – Asymmetric & symmetric multiprocessing UNIT IV – Memory Management Specific Objectives: Upon successful completion of this unit. Calculate the turnaround time for each process for each scheduling algorithm. 3. external (9 hours) Updated Jan 2010 (9 hours) UNIT V – Virtual Memory Operating System Concepts Mrs. Time Sharing 2. a. Draw the GANTT chart for each process scheduling algorithm explain the advantages and disadvantages of each scheduling algorithm describe multiprocessor scheduling Content: 1. Dispatcher 3. j. Scheduling concepts – CPU – I/O Burst cycle. 7. 6. distinguish between internal and external fragmentation Content: 1. 2. b. Scheduler. 7. limit register Logical vs. Shortest Remaining Time. Round Robin. Priority. Shortest Job First 5. 6. Multiprogramming. physical address space Swapping Contiguous vs. Scheduling algorithms – FIFO. non-contiguous memory allocation Memory allocation strategies – first-fit. 8. 4. best-fit. Preemptive scheduling. 3. 5.

G. explain disk caching 7. MFU f. Thrashing UNIT VI – Auxiliary Storage Management Specific Objectives: Upon successful completion of this unit.Specific Objectives: Upon successful completion of this unit. LFU e. explain the term “virtual address space” 2. Page replacement a. 4. create the correct schedule to satisfy all requests 6. page table. LRU d. Allocation algorithms 4. address structure. students should be able to: 1. define frame 4. Segmentation – segment table. Campbell Copyright @ 2010 Updated Jan 2010 (5 hours) 10 . define block describe the structure of a RAM disk describe the structure of an optical disk describe at least four (4) disk scheduling algorithms given a disk scheduling algorithm and a list of disk requests. use a diagram to explain and illustrate address translation in segmentation 10. Pure paging – pages. define page 3. address translation 6. explain the purpose of the page table 5. explain segmentation 9. 2. state the advantages of disk caching 8. explain thrashing Content: 1. address translation 3. Demand paging 5. students should be able to: 1. 3. frames. distinguish between pure and demand paging 8. describe the various RAID levels Operating System Concepts Mrs. Virtual address space 2. Optimal replacement c. 5. describe at least two (2) page replacement algorithms 7. use a diagram to explain and illustrate address translation in paging 6. FIFO b.

SCAN. students should be able to: 1. 2. 4. Disk caching 7. seek time rotational latency 5. write. explain the purpose of co-processors describe the characteristics of RISC architecture describe the characteristics of CISC architecture explain one advantage of RISC architecture explain one advantage of CISC architecture Content: Operating System Concepts Mrs. 3. 3. RAID 1. location independence UNIT VIII – Co. Distributed file systems – naming. Disk scheduling – FCFS. incremental backup. Campbell Copyright @ 2010 Updated Jan 2010 11 . explain at least two (2) backup techniques explain at least one (1) recovery technique describe file-server systems describe distributed file systems explain the advantages and disadvantage of a distributed file system Content: 1. 3. 5. G. Backup and recovery methods – full backup. File server systems – client-server computing 3. UNIT VII – File System Specific Objectives: (3 hours) Upon successful completion of this unit. 4. positioning Measures of magnetic disk performance – transfer rate. 2.Content: Blocks RAM and Optical disks Operations on moving-head disk – read. 4. students should be able to: 1. SSTF. 5. 2.Processor and RISC and CISC Specific Objectives: (1 hours) Upon successful completion of this unit. C-SCAN 6. LOOK. log-structured systems 2. positioning time. location transparency.

4. Virus protection. Firewall Case Studies – MS-DOS. UNIX. A. Denial-of-service Authentication. Advantages and disadvantages of co-processors 2. Encryption.B. 3. 3. (8th ed). Internal Tests 20% 3.1. NJ: John Wiley Operating System Concepts Mrs. students should be able to: 1. Operating systems concepts. OS/2. disadvantage UNIT IX – Operating Systems Security Specific Objectives: Upon successful completion of this unit. Galvin. Final Examination 60% (40MCQ’s 1 mark each and 5 Structured Questions 20 marks each to choose any 3) RESOURCE MATERIAL: Prescribed: Silberschatz. & Gagne. Lectures Demonstrations Discussions Presentations METHODS OF ASSESSMENT AND EVALUATION: 1. 4. Apple Macintosh. Purpose of security Forms of security violation Security threats and attacks – Trojan Horse. 2. 5.. G. Common Coursework 20% 2. logic bomb. discuss various ways in which operating systems handle security threats or attacks Content: 1. worm. RISC / CISC – development. virus. Campbell Copyright @ 2010 Updated Jan 2010 12 . Windows (1hours) METHODS OF DELIVERY: 1. 2. P. define security 2. (2008). describe at least four (4) security threats and/or attacks 3. G. advantage.

W. (2007). A. (1999). G. Modern operating systems (3rd ed.) OH: McGraw-Hill Stallings. W.). Operating System Concepts Mrs.(6th ed.).Recommended: Tanenbaum. NJ: Prentice Hall. Operating systems: internal design principles (5th ed. An introduction to operating systems. (2005).S. NJ: Prentice Hall Shay. Campbell Copyright @ 2010 Updated Jan 2010 13 .

MacOS. play a game. We use the computer because we want to type a document. DOS. I/O devices etc. Campbell Copyright @ 2010 Updated Jan 2010 14 . Without an operating system the user would have to communicate with the computer in binary form which would be very tedious and inconvenient.CPU. The layers of a computer system Operating System Concepts Mrs. We would however not be able to do these things on our computers without an operating system installed. do our budget etc. other computers etc. The operating system provides an environment in which a user may execute programs. it typically has an operating system already installed. As new versions of the operating system are released. Define operating system An operating system (O/S) is a program which acts as an interface between a user of a computer and the computer hardware.people. surf the internet. These are all examples of operating systems. business programs. When you purchase a new computer. G.database systems. word processors. • users .Lecture 1 – Introduction (1/2 hour) Microsoft Windows 7. users upgrade their existing computers to the new version. Unix. • operating system (type of system software) • application software/programs . An upgrade usually costs less than purchasing the entire operating system. video games. We do not use the computer because of these software. machines. Its primary goal therefore. is to make the computer convenient to use. Linux. memory. spreadsheets etc. A computer system is roughly divided into four (4) parts:• hardware .

Types/Categories of Operating Systems Operating systems fall mainly in 3 categories: Stand-alone. computers. so no need to know which sector. The hardware is capable of carrying out a wide variety of decisions and tasks in order to do this it needs to be given a set of instructions in a form that it can understand. data management (control of I/O devices.g. Examples of network O/Ses include: Novell Netware. Some stand-alone operating systems are called client operating systems because they work in conjunction with a network operating system. UNIX. Network A network operating system organizes and coordinates how multiple users access and share network resources. filing system. A network administrator uses the network O/S to add and remove users. command language. A network administrator also uses the network O/S to administer network security. 200 Professional. Operating System Concepts Mrs. 98. Microsoft Windows Server 2003. • kernel/monitor/supervisor/executive • concerned with the allocation and sharing of resources • interfacing to the hardware such as interrupt handling. Campbell Copyright @ 2010 Updated Jan 2010 15 . or mobile computing device. and Linux. UNIX. mapping logical file structures onto physical devices. and Linux. Stand-alone A stand-alone operating system is a complete operating system that works on a desktop computer. block) and job control. Early Microsoft Windows Server versions (NT Server. Mac OS X. processor scheduling • always resident in memory once the computer is turned on • has a special area in memory reserved for it • superstructure • concerned with everything else • provides a user environment/interface that is convenient • basis of services to the user e. Windows XP. They can therefore be called multi-user operating systems. G. OS/2 Warp Client. Early Microsoft Windows versions (e.x. 2000 Server). track. Based on the diagram above it is clear that in order for the user to direct the hardware it does so through different layers. and other devices to and from the network. the hardware is of as much use as a CD player without CDs. 3.By itself. An operating system is divided into the kernel and the superstructure. OS/2 Warp Server for e-business. 95. Network and Embedded. storage management. ME).g. notebook computer. Stand-alone operating systems include DOS. NT Workstation.

Is no longer essential Operating System Concepts Mrs. Palm OS. Give the name of five (5) operating systems. Popular embedded operating systems include Windows CE . 10. Define operating system. in such a way that each user thinks he has a machine to himself. One (the foreground) interacts with the terminal and runs as long as it is able. Gives instructions to the hardware b. 8. 7. research its new features and comment on them.a single user system in which two programs are multiprogrammed. • General Purpose . Pocket PC 2002. G. time sharing and possibly transaction processing in a single system. what does this mean? 9.a multi-user system that combines batch processing. in order to improve CPU utilization. Operating systems can also be categorized in the following ways” • Multi-programming . 5. If no. • Time sharing . airline reservation system. each associated with a remote interactive terminal.resembles a time sharing system in that it serves a number of remote terminals. Differentiate between multi-user and multi-programming. 2.Embedded Most PDAs and small devices have an embedded operating system that resides on a ROM chip. Research the features of the operating systems mentioned.g. What are the main purposes of an operating system? What is the difference between the kernel and the superstructure? Describe the different categories of operating systems. Practice MCQs 1. Campbell Copyright @ 2010 Updated Jan 2010 16 . What operating systems are you familiar with? Have you ever used Windows 7? If yes. comment on its new features.shares the processor and memory among a number of programs. • Transaction processing . An operating system is a program that a. • Foreground background . E. all the terminals are connected to the same program. 4. Tutorial Questions 1.NET. 6. the background program is assigned to the processor whenever the foreground program is unable to proceed.the available processor(s) is shared among several programs coresident in main memory. Most modern operating systems are event/interrupt driven. Is there a difference between a multi-programming O/S and a multi-tasking O/S? 11. Is controlled by application software d. However. and Symbian OS. 3. Controls the user c.

application software. application software. system software 3. application software d. Executive 4. User. Hardware. Operating System D. Users Operating System Concepts Mrs. Segment b. _____________ is an important part of a computer system that provides the means for the proper use of the computer resources. G. hardware c. Superstructure c. Select the correct sequence a. Fence d. hardware. system software b. Which of the following is TRUE for an operating system? a) It performs word processing tasks b) It is controlled by application software c) It provides a user interface d) It is inconvenient to use 5. hardware. Hardware B. user. The part of the operating system that is always resident in RAM is called a. Campbell Copyright @ 2010 Updated Jan 2010 17 . User. User. system software.2. A. Application programs C. application software. system software.

mounting magnetic tapes etc. Initially when the computer was turned on. In the early days machines were hand operated. I/O devices were slow. The output from each job would be sent back to the appropriate programmer. E. There were still problems however. control of the computer resided with the resident monitor. an operator could start the next job. If errors occurred then the programmer would halt the program. making the operator distinct from the user and batching similar jobs. the operator would have to notice this by observing it on the console. In those days machines were slow. but take 60 seconds to be read by the card reader). that is.g. the operator was slow. would run each batch. to process some cards by the CPU may take 4 seconds. Control cards were set up by the operator in order for the monitor to know the order in which jobs were to be run. it would return control to the resident monitor. During the time that tapes were being mounted or the programmer was operating the console. G. and left the programmer with a much more difficult debugging problem.usually the programmer set up a job by loading the card reader.. (E. then load the card reader or paper tape reader with the next job and restart the computer. then started the program by manipulating switches on the console. which would then go on to the next program. as soon as one job was finished. Also as computer speed increased the ratio of set-up time to run time grew unacceptably out of proportion and the need arose to efficiently automate the job to job transition. Eventually the programmer was replaced by professional computer operators. To overcome this: • automatic job sequencing was introduced. the CPU sat idle.g. During this transition from one job to the next the CPU sat idle.The history and development of the operating system Operating systems first began to appear in the late 1950s. the operator . A small program called a resident monitor was created to automatically transfer control from one job to the next. This monitor is always resident in memory. When a job was done. he would unload tapes. The operators would sort them into batches with similar requirements and as the computer became available. These changes. At that time computer time was very expensive (about $45. improved utilization quite a bit.66 per hour). which would transfer control to a program. when the program terminated. The relative slowness of the I/O devices meant that the CPU is often waiting on I/O. Another way of saving time was to batch the jobs together and run them through the computer as a group. and with it the first rudimentary operating systems were created. examine the contents of memory and registers and debug the program directly from the console. remove the listing from the printer then set up the next job. Campbell Copyright @ 2010 Updated Jan 2010 18 . Efforts to remove the mismatch led to 2 developments: • introduction of I/O channel Operating System Concepts Mrs. determine why the program stopped. Programmers would leave their programs with the operators. when a job stopped. take a dump (printout of errors in hexadecimal) if necessary.

time sharing and data communications (network operating systems) were introduced. Problems arose when a user wanted to switch computer models or manufacturers. Time sharing allowed immediate access to all of the application programs that were running. WYLBUR. input was transcribed from cards to magnetic tape and the program got its input by reading card images to tape and these were later transcribed to punch cards or the printer. was the Dartmouth Time-Sharing System (DTSS) which was first implemented at Dartmouth College in 1964 and eventually formed the basis of General Electric's computer bureau services. high level user oriented programming languages. when manufacturers introduced a new computer or model. A distributed operating system is one that appears to its users as a traditional uni-processor system. Once started the channel ran independent of central processor. Proprietary software is privately owned and limited to a specific vendor or computer model.a piece of hardware to control I/O devices in an autonomous manner. The mid 1980s also introduced distributed operating systems. this allowed the simultaneous processing of more than one program at a time. Multics. (i. no changes need to be made to the application program to change from direct to offline I/O operation. Historically. even though it is actually composed of multiple processors. A devicedependent program is one that runs only on a specific type or make of computer. Operating System Concepts Mrs. IBM Time Sharing Option (TSO). in which the CPU switches to another job instead of sitting idle waiting on I/O. By the mid 1960s multiprogramming was introduced. The trend today. This was achieved by job/CPU scheduling. however. In addition. Most of the first operating systems were device dependent and proprietary. On into 1980s came interactive real-time systems that enabled on-line communication between the user and the computer.e. • introduction of the technique of “off-lining” I/O instead of the computer using the slow peripheral devices directly. The first commercially successful time-sharing system. and the one which became the most widespread in the late 1960s and early 1970s. Some operating systems still are device dependent. is toward deviceindependent operating systems that run on computers provided by a variety of manufacturers. The main computer was therefore no longer constrained by the speed of the card readers and line printers. MUSIC/SP. Having several jobs in memory at one time requires memory management. Time sharing used CPU scheduling and multiprogramming to accomplish this. but only by the speed of the magnetic tape units. The user could now give instructions via commands instead of control cards. By 1970 multiprocessing. Michigan Terminal System. Other early time sharing systems include: IBM CMS (part of VM/CMS). Only the device driver must be changed. This ability to run a program with different I/O devices is called device independence. Campbell Copyright @ 2010 Updated Jan 2010 19 . G. they often produced an improved and different proprietary operating system. The user’s application software often would not work on the new computer because the programs were designed to work with a specific operating system. read data from tape and not from card). The users should not be aware of where their programs are being run or where their files are located.

Decade 1950s Year 1954 1955 1956 1960s 1960 1961 1964 1965 1966 1967 1969 1970s 1970 1972 1975 1976 1980s 1980 1981 1983 1984 1986 1987 1988 1990s 1990 1991 1992 1993 1995 Operating System Concepts Mrs.The advantage of device-independence is that you can retain existing application software and data files even if you change computer models or vendors.1 Novell NetWare 4 Windows 95 Updated Jan 2010 20 .0 SunOS 3. GE. The following table lists some of the operating systems that have been developed over the years.0 Windows NT 3. based on General Motors Operating System IBSYS (IBM) CTSS (MIT) MCP (Burroughs) OS/360 (IBM) Dartmouth Time Sharing System Multics (MIT. This feature usually represents a sizable savings in time and money.0) OS/400 BeOS (v1) Linux Mac OS (System 7) Solaris 2. G. Campbell Copyright @ 2010 Sample of Operating Systems MIT's operating system made for UNIVAC 1103 General Motors Operating System made for IBM 701 GM-NAA I/O for IBM 704.0 Mac OS (System 1.0 OS/2 (1. Bell Labs) DOS/360 (IBM) CP/CMS (IBM) Unics (later Unix) (AT&T) DOS-11 (PDP-11) VM/CMS CP/M Cray Operating System Xenix PC-DOS MS-DOS Novell NetWare (S-Net) SunOS 1.0) AIX 1.

04 Windows Vista Ubuntu 7.2 FreeBSD 8.1996 1998 1999 2000s 2000 Mac OS 7. Describe the features of as many operating systems as you can. Who invented it? Describe the situation that most impacted the development of operating systems. Which of the following greatly impacted the development of the operating system? a) The CPU was slow compared to the operator Operating System Concepts Mrs. 2.0 2001 2002 2003 2005 2006 2007 2008 2009 Tutorial Questions 1. G. 3. Discuss the first operating system. 4. 5.5 Solaris 10 5/08 SUSE Linux 11. What generation do the different operating systems belong to? Practice MCQs 1. In your description include the names and features of the older operating systems. Describe the historical development of operating systems. 6. One factor that led to the development of operating systems was that a) The CPU was often idle b) The I/O devices were too fast c) Programmers could not debug problems d) The CPU was overworked 2.10 Mac OS X v 10.6 Windows NT 4. Describe the historical development of operating systems from 1980 to the present.0 Windows 7 Windows Server 2008 R2 openSUSE 11. Campbell Copyright @ 2010 Updated Jan 2010 21 .0 Palm OS Windows 98 Mac OS 9 RISC OS 4 Windows 2000 Solaris 8 Windows ME Mac OS X Windows XP SUSE Linux Windows Server 2003 Ubuntu 5.

Campbell Copyright @ 2010 Updated Jan 2010 22 .b) The CPU was often idle c) The CPU was overworked d) The CPU was slow compared to I/O devices 3. First Generation B. In what time period was the first operating systems developed? A. All of the following describe ways in which designers dealt with the difference in speed between the CPU and I/O devices EXCEPT: a) Multi-programming b) I/O channel c) Off-lining I/O d) Buffering 4. Second Generation C. G. Fourth Generation Operating System Concepts Mrs. Third Generation D.

A multiprocessing operating system is where more than one processor is used to run more than one program at the same time.Operating Systems Functions (1 hour) Functions Most operating systems perform familiar functions that include the following: • Start up or boot up the computer • Provide an interface between the hardware and the user that is more convenient than that presented by the bare machine. An operating system can be single user/single tasking. or multiprocessing. the operating system may use virtual memory. which is firmware with the computer’s startup instructions. an operating system can support at one time. This is done on a network. A single tasking operating system can run one program at a time. Finally. the power supply sends a signal to the system unit. Campbell Copyright @ 2010 Updated Jan 2010 23 . and displays the desktop. Memory management optimizes the use of RAM. which allocates a portion of a storage medium to function as additional RAM. The BIOS performs the power-on self test (POST) to check system components and compares the results with data in a CMOS chip. A single user operating system allows only one person at a time to use the computer. When a user turns on a computer. single user/multitasking. requests any necessary user information. If the POST completes successfully. the operating system loads configuration information. If memory is insufficient. The processor chip finds the ROM chip(s) that contains the BIOS. Booting is the process of starting or restarting a computer. Operating System Concepts Mrs. Managing programs refers to how many users. A multi-user operating system allows more than one person to use the computer at a time. and how many programs.Lecture 2 . A multitasking/multiprogramming operating system can run more than one program at the same time by scheduling the processor’s time. and loads them into memory from storage. G. • Manage other programs • Manage memory • Control/Co-ordinate/Configure the various hardware devices • Manage the sharing of resources (such as two persons trying to print at the same time on a network) • Schedule jobs • Establish an internet connection • Monitor performance • Provide file management and other utilities Some operating systems also allow users to control a network and administer security. the BIOS searches for the system files and the kernel of the operating system. which manages memory and devices. multiuser.

menu-driven interface. Configuring devices involves loading each device’s driver when a user boots the computer. Campbell Copyright @ 2010 Updated Jan 2010 24 . a menu is a list of items from which you may choose and option. grammar and punctuation. Three types of user interfaces are command-line interface. manage resources and troubleshoot network connections. Command-line interfaces however. give a user more control over setting details. A performance monitor is an operating system program that assesses and reports information about computer resources and devices. What is a Graphical user interface (GUI)? Most users today work with a graphical user interface. Command line interfaces often are difficult to use because they require exact spelling. delete files and create folders. What is a User Interface? The user interface controls how data and instructions are entered and how information is displayed. G. Establishing an Internet connection sets up a connection between a computer and an Internet service provider. and graphical user interface. generate an error message. What is a Command driven or command line interface? To configure devices. you interact with menus and visual images such as icons. What is a Menu driven interface? A menu-driven interface provides menus as a means of entering commands.Scheduling jobs determines the order in which jobs are processed. As in a restaurant. A command line interface is where a user types commands or presses special keys on the keyboard (such as function keys) to enter data and instructions. With a graphical user interface (GUI). network administrators and other advanced users work with a command-line interface. Operating System Concepts Mrs. Menu driven interfaces are easier to learn than command line interfaces because users do not have to learn the rules of entering commands. All hardware devices are managed and scheduled among the various jobs or programs that are run. When working with a command-line interface the set of commands entered into the computer is called the command language. File management utilities (such as Windows Explorer [Do not confuse this with Internet Explorer – a web browser]) allows the user to copy files. Scheduling is done via a scheduling algorithm. A driver is a program that tells the operating system how to communicate with a specific device. buttons and other graphical objects to issue commands. move files. Many current GUI operating systems incorporate features similar to those of a Web browser. A job is an operation the processor manages. Minor errors such as a missing full stop.

Requests for card reader input. The location of the card is recorded in a table and is kept by the operating system. The O/S provides certain services to programs and the users of the programs. the print line is copied into a system buffer and written to the disk. Similarly when a job requests printer output. Output devices are slow compared to processing so in order to keep the CPU busy with processing and not waiting on an output device to finish before it can move on. The CPU and input devices are therefore both busy. G. cards are read directly from the card reader onto the disk. It puts the output to the disk in the form of a spool file instead of to the printer. Operating System Concepts Mrs. The problem with tape systems is that the card reader could not write onto one end of the tape while the CPU read from the other. An input buffer accepts data from a slow speed device at a slow speed but releases it at high speed to the CPU. A buffer can be a reserved section of primary storage or can be located on the I/O device itself. It therefore uses the disk as a very large buffer. Buffering is therefore the solution to the slowness of I/O devices. The CPU is therefore free to carry on with other work while the spool file is being created. An output buffer accepts data at a high (electronic) speed from the CPU and releases it at the slower speed of the output device. Spooling (Simultaneous Peripheral Operation On-Line) This method was invented at Manchester University in England.Services An operating system provides an environment for the execution of programs. It attempts to keep both the CPU and the I/O devices busy all the time. Disk systems eliminated that problem. In disk systems. By moving the read/write head from one area of the disk to the other. the disk can rapidly switch from one card to another. Services provided differ from one operating system to the other. When the job/program is completed then the output is actually printed. the data is put in a buffer (in fraction of the time) rather than being put straight to a slow output device. Data is put into a buffer (memory) until the output device can accept it. the entire tape had to be written before it was rewound and read. This section deals with some of the common services provided by operating systems. The CPU can then move on to do other things. These services are functions that are provided for the convenience of the programmer. An area in memory being used for data awaiting processing or output is called a buffer area. Buffering A buffer is high speed storage (memory). After data is read and the CPU is about to operate on it the input devices are instructed to begin the next input immediately. is satisfied by reading from the disk. Campbell Copyright @ 2010 Updated Jan 2010 25 .

Deadlock prevention . • Input/Output Operations A user program cannot execute I/O operations directly. the operating system should allow creation and deletion of such files. Example:. 1. • Deadlock Prevention/Recovery This is a situation where waiting processes stay permanently in a wait state because other waiting processes are holding the resources that they have requested.must hold for non sharable resources (e. Pre-emption of resources. All 4 conditions must exist for deadlock to occur. Processes currently holding resources granted earlier can request new resources. Another protocol allows a request from a job only when it has no resources. The program must be able to end its execution. • File System Manipulation Programs need to read from and write to files. the operating system may take resources from a job (i. or recover from one.If there are 4 tape drives and 2 processes and each process holds 2 tape drives but needs 3. Operating System Concepts Mrs. either normally or abnormally. Hold and wait . To prevent deadlock. the operating system must provide some means to do so. G. mutual exclusion .when a process requests a resource it does not hold another resource. then each will wait for the other to release its tape drives. One protocol is that the job requests all the resources that it needs at the start.e.Other Services • Program execution The operating system loads a program into memory and runs it.g. terminate process). Campbell Copyright @ 2010 Updated Jan 2010 26 . A printer cannot be shared simultaneously). (a read only file is sharable) 2.ensure that at least one of the following conditions does not hold. Each resource is either currently assigned to exactly one process or is available. which will never happen unless the operating system steps in.

G. Circular wait . 3. each of which is waiting for a resource held by the next member of the chain. 6.each process can request resources only in increasing order). What are some of the services provided by an operating system? Practice MCQs 1. jam in the card reader etc. name and discuss a method by which the operating system is able to correct the imbalance between the speed of the CPU and the I/O devices. They must be explicitly released by the process holding them. Describe the conditions for deadlock. With the aid of a diagram.each job is assigned a number as to who gets a resource next (linear ordering . 4.3. To reconcile conflicting demands. All of the following are services provided by an operating system EXCEPT: a) File system management b) Buffering c) CPU scheduling Operating System Concepts Mrs. All of the following are conditions for deadlock except: a) Circular wait b) Pre-emption c) Hold and wait d) Mutual exclusion 2. • Error Detection/Troubleshooting The operating system constantly needs to be aware of possible errors. Tutorial Questions 1. The operating system should be able to take the appropriate action. How does buffering differ from spooling? 4. No pre-emption (No taking away) . Describe how the banker’s algorithm works. State three (3) functions of an operating system. Resources previously granted cannot be forcibly taken away from a process. 2.of resources that have already been allocated. Errors may occur in the CPU. • Resource Allocation This is due to multiple users or multiple jobs running at the same time. There must be a circular chain of two or more processes. Campbell Copyright @ 2010 Updated Jan 2010 27 . • Accounting To keep track of which users use how much of what kinds of computer resources. List examples of deadlock which are not related to a computer system environment. 5. memory. 7. • Protection So that one job does not interfere with the others.

cache D. G. Campbell Copyright @ 2010 Updated Jan 2010 28 . RAM B. What is deadlock? a) A user is locked out of a program due to insufficient authority levels b) A job recovers from hanging and reboots slowly c) A job is in a permanent wait state due to another job holding a needed resource d) A computer hangs because the kernel is overwritten 4. Scheduling 5. buffer C. Paging C. A. ____________ allows you to send a second job to the printer without waiting for the first job to finish printing. Thrashing D. Spooling B. A __________ is an area of memory or storage in which data and information is placed while waiting to be transferred to or from an input or output device. A. One of the services provided by an operating system is deadlock prevention. registers Operating System Concepts Mrs.d) Record management 3.

Unix. Example of a logical problem – corrupted file. System Software There are two types of system software: operating system and utility. when to do it. Application software is the user’s reason for using the computer. The software that allow us to do these things are application software. Application software Application software is designed to fulfil a specific set of activities. We do not use the computer because we want to use Microsoft Windows 7. As mentioned before. Examples include: accounting.g. The following are examples of types of application software: Operating System Concepts Mrs. create graphs.g. MSBACKUP. detects. Software is a collection of machine interpretable instructions that define the activities related to performing a specific task by computer. E. E. Trend Micro PC-cillin. Scandisk. we use the computer to type documents. Utilities provide a useful service to the user by providing facilities for performing common tasks. • File compression – Reduces the size of a file usually to a ZIP extension.Software and Firmware (1/2 hour) This topic is mostly revision as it was already covered in the course Fundamentals of Information Technology. Quickview in Windows. play games etc. spreadsheet.g. Norton disk doctor. Norton Anti-virus.g.g.g. banking. enter data into a database. E. an operating system consists of the programs that control or coordinate the operations of a computer and its devices. PKZIP. E. database management. The opposite RESTORE utility should also exist in order to recover the files in case of loss/damage. Linux. There are two types of software: system software and application software. McAfee. E. WinRAR.Lecture 3 . word processing. Campbell Copyright @ 2010 Updated Jan 2010 29 . Operating systems tell the computer what to do and how to do it. In other words software is any instruction that tells the computer what to do. Example of a physical problem – scratch on disk. graphics. It alerts you if an additional disk is needed. do our accounting. OS/2. G. draw pictures. removes viruses from a computer system. Examples include: Microsoft Windows XP. WinZip. E. • Diagnostic utility – Compiles technical information about your computer hardware and reports physical and logical problems. NovaBACKUP • Anti-virus – Prevents. DOS etc. AVG etc. defrag in Windows • Backup – Copies selected files to another disk/tape. • Defragmenter – Reorganizes files and unused space on a disk so that data can be accessed quickly and programs run faster. The following are examples of utilities: • File viewer – Displays the contents of a file.

COBOL etc. G. Network Operating Systems (NOS). posters. Foxpro. editing. instructions. Lotus 1-2-3. Features include:. People called programmers use programming languages to tell the computer what to do. Pascal. C++. Monopoly. Microsoft Excel. Corel Draw. mail merge. correction. AmiPro • Spreadsheets Designed to manipulate numeric data in a tabular form. Can sort. Windows Media Player.g. print. A database is a collection of organized of information stored in a way that makes it easy to find and present. Outlook (Email).• Word-processing Allow easy creation.g. E. Outlook Express. font size and type. Microsoft Word. E.g. Campbell Copyright @ 2010 Updated Jan 2010 30 . formulas. justify. Requires a lot of main memory and usually special circuit board (graphics card) and a high resolution screen. newsletters. Operating System Concepts Mrs. printing of documents. save. User can enter numbers. C. fieldtype. Visual Basic. Symphony. However. E. Dbase. Combine word processing and graphics packages. Visi-Calc. Page Maker. Multiplan • Database Management Information is vital to business. Microsoft Access • Desktop Publishing To produce documents. Wordstar. which means that they will run on different computers.g.g. Adobe Photoshop • Programming languages/program development software Used to create programs. E. • Entertainment software These software include games.g.g. keys. E. Web Browsers.a large piece of paper divided into columns and rows into a grid of cells. margins. Communication software allows users to send messages and files from one location to another. Foxpro.Bold. Most were developed for writing specific types of applications. many companies insist on using the most common languages so they can take advantage of programs written elsewhere and to ensure that their programs are portable. page number. footnotes. fieldsize. E. Oracle. spell check. etc.g. Chess. Microsoft Publisher • Graphics Provide facilities that allow user to do various kinds of computer graphics. WordPad. query. Database management software allows you to create and maintain a database. Hundreds of programming languages or language variants exist today. E. WordPerfect. text in each cell. Quattro Pro. E. table of contents. underline. software that allows you to listen to music of watch movies. Netscape Navigator. This is the electronic equivalent to accountant’s ledger . Solitaire etc. • Communication Software This is any program that a) helps users establish a connection to another computer or network or b) manage the transmission of data. Field. and information or c) provide an interface for users to communicate with one another.

Microsoft Office. The reset control signal takes place as part of the switching on operation. How does a word processor (e. cd-rom drive. serial ports (modem) • Loads operating system (usually independent of the machine) must look at particular address (ie goes to booting device) For PCs operating system must be on track 0. mouse. Normally a special control program is loaded which in turn loads and runs a program called a command interpreter or shell. Give examples of the type chosen. This is made with CMOS (complementary metal-oxide semiconductor) technology. When you turn on a computer: • Run BIOS programs (basic input output system) checks hardware . sector 0 of boot disk.g. memory. Notepad)? Operating System Concepts Mrs. They are stored permanently in ROM and are ready when the computer is switched on. diskette drive. On a small microcomputer based system the firmware ROM normally containing a special ‘loader program’ to load a program into memory from the floppy disk. For mainframes etc. The processor immediately starts to execute the instruction in firmware. Spreadsheet data might be easily fed into a database or displayed in a diagrammatic form using a graphics package. Campbell Copyright @ 2010 Updated Jan 2010 31 . This is software embedded in hardware. When you turn on a computer the first thing that tells the computer what to do is firmware. hard-coded in the hardware). MS-Word) differ from a text editor (e.g.g. e) A publishing house who wants to produce a magazine. Identify the type of application software that would be best suited in the following situations. E. keyboard. On smaller machines the 2 programs may be combined into a single program called a monitor. the area on device is specific to the manufacturer. hard disk. a) Preparing a letter to a customer. Firmware are programs held in ROM (i. Differentiate between system software and application software. Tutorial Questions 1. location 0. Open Office. Corel Wordperfect Suite. Lotus Smartsuite. Firmware Firmware is also known as micro-code or micro-program.g. When the computer is switched on a control signal is sent to the microprocessor which causes it to reset its current instruction register to the location address of a firmware instruction. 2. b) A teacher calculating student grades.monitor. c) A financial controller making a speech to the shareholders of a company. d) A human resource manager who wants to perform various queries on employee data. Firmware therefore facilitates booting.e. E.• Integrated Packages Collections of packages which have been designed to be used together. 3. E. G.g. printer port.

What are the utilities that you have used? Comment on them. G.4. Which of the following types of system software provides a maintenance function? a) Application software b) Utility c) Operating system d) Special purpose 5. A. Antivirus software Operating System Concepts Mrs. The utility that is always provided with a backup utility is a. Utilities D. Which of the following is TRUE about application software? a) It provides a user interface b) It allows the user to perform a specific task c) It is in charge of the utility programs d) It controls the hardware 3. Application software B. System software C. 8. Research the various web browsers. 7. Campbell Copyright @ 2010 Updated Jan 2010 32 . Scandisk b. How does software differ from firmware? Give examples of how firmware is used. All of the following are TRUE statements about firmware EXCEPT: a) Assists in the booting process b) Programs held in the boot sector c) Forms a part of the operating system d) Programs held in ROM chips 6. ______________ consists of programs that control the operations of the computer and its functions. What are the two types of system software? a) Application software and operating system b) Utility and application software c) Utility and operating system d) Special purpose and general purpose 4. [Make sure that you include the ones made for mobile devices] Practice MCQs 1. Do some research and describe other popular utilities. Restore c. Defrag 2. 5. 6. Anti-virus d.

Disk defragmenter B.7. ____________ is a utility that reorganizes the files and unused space on a computer’s hard disk so that data can be accessed more quickly and programs can run faster. Disk scanner C. Disk defragmenter D. A. Diagnostic 9. A. Disk cleanup B. ____________ utility compiles technical information about a computer’s hardware and certain system software programs and then prepares a report outlining any identified problems. Campbell Copyright @ 2010 Updated Jan 2010 33 . Diagnostic utility D. G. Disk scanner C. Disk cleanup Operating System Concepts Mrs.

sequence of words organized into loader record blocks – EXE. The operating system abstracts from the physical properties of its storage devices to define a logical storage unit. compressed. write. A file is a logical entity which represents a named piece of information. last accessed • Protection – access control – who is allowed to read. TIF database file – MDB. A read-only file can be viewed. Examples include read-only.Lecture 4 . Operating System Concepts Mrs. A read-only file is any file with the read-only attribute turned on. A file with the readonly attribute turned on can be opened and accessed normally by your computer. In MS-DOS. It is a characteristic of a file. DBF etc. its length etc. A file is a collection of related information.sequence of subroutines and functions object/executable file . BMP. execute • Ownership – who owns the file. Campbell Copyright @ 2010 Updated Jan 2010 34 . It has other properties such as its type. archive. G. A file is a named collection of related information usually saved on secondary storage. the file. but not changed. Common File types:text file . A file is named and is referred to by its name. msdos. bytes. io. A file attribute (or just attribute) is a specific condition in which a file or directory can exist. File Attributes A file has the following attributes: • Name – a string of characters that identifies the file.sequence of characters organized into lines (and possibly pages) . but Windows will prompt you with a special dialog box asking you to confirm that you want to move or delete the read-only file. The owner decides on the file operations allowed and by whom.File concepts (1 hour) Files store data and programs. Files are normally organized into directories (folders) for ease of use. File attributes are maintained in the directory structure. • Type – some operating systems support different file types and handles them differently • Location – information on the device and location of the file data • Size – current size of the file (in bytes) • Various dates – date created. It is a sequence of bits. last modified. For convenient use the operating system provides a uniform logical view of information storage. records. hidden. Read-only files can be deleted and moved. date and time of creation. abstracting out the physical properties of the storage device. "writing" to the file is disabled. OS/2 and Microsoft Windows the attrib command can be used to change and display file attributes. COM graphics files . The operating system implements the abstract concept of a file by managing storage devices such as tapes and disks.JPG.sys. In other words. system. Some common files that are readonly by default in Windows include boot. It is a logical storage unit. It is mapped onto a physical device.TXT source file .sys.ini.

Return error code if not. File Operations A file is a means of storing information for later user. Return integer (file descriptor) if permitted. A system file is any file with the system attribute turned on. A compressed file is any file with the compressed attribute turned on. This way. Open a file Check permissions. The archive attribute is used for backup. G. however. Campbell Copyright @ 2010 Updated Jan 2010 35 . io. The most popular system files you might encounter on a Windows computer include msdos. The archive attribute is usually turned on when a file is created or modified. 2. Setting the compressed file attribute on a file will reduce the size of the file but will allow Windows to use the file just as any other. Creating a file Operating System Concepts Mrs. 1. Some of the things we would want to do are:• create a file. Before you can use a file you must Open it. ntdetect. Most Windows computers are configured by default not to display system files in normal file searches or in folder views. Most Windows computers are configured by default to display compressed files in blue text in normal file searches and in folder views.com and ntldr. However. Most Windows powered computers are configured by default not to display hidden files in normal file searches. Many files that you'll encounter in normal computer use will likely have the archive attribute turned on. compression isn't usually recommended.A hidden file is any file with the hidden attribute turned on. To avoid constant searching most operating systems keep a table of open files.sys. Any file can be marked as Hidden. Since most computers have plenty of hard disk space. delete the file • edit/modify the file.ini.sys. the archive attribute is turned off. An archive file is any file with the archive attribute turned on. Files marked Hidden and System do not normally display unless the file manager option to display them is selected. Once the file is backed up by a backup program.sys and boot. display). The most popular hidden files you might encounter in a Windows system include msdos. io. working with a file that is compressed will use more processor time than working with an uncompressed file because Windows has to decompress and then recompress the file during use. What the Operating System must do for each of the 5 basic file operations NB.sys. operating system and other control program files are marked as System files as a means of identification. When finished with a file Close it. rename a file etc. read from the file. append new information to the file • create a copy of a file. especially since the trade off is an overall slower computer thanks to the extra processor usage needed. write to the file. rewind the file. copy file to an I/O device (printer. the backup program can use the archive attribute to determine which files have changed and need to be backed up and which have not changed and do not need to be backed up.

Make an entry in the directory (directory entry records name/location of file) 3. bmp). 3.g. Tutorial Questions 1. exe. Campbell Copyright @ 2010 Updated Jan 2010 36 . Practice MCQs 1. then the write pointer is updated.Find space on the file system. Truncate Maintains file attributes but erases the content of the file. A file is a) A collection of directories Operating System Concepts Mrs. Discuss the advantage and disadvantage of this scheme as compared to the scheme when the user has to explicitly open and close the file. 2. Describe five file operations. Delete Release file space and erase the directory entry so that it can be reused by other files. 3. Reading a file (open as input) specify name. System specifies where in memory the next block of the file should be put. Other file operations include: Rewind (only with tapes) Current file position pointer is reset to the beginning of the file. Seek Repositions the location pointer for the file. 5. G. Describe the type of file. system searches directory to find location of file. jpg. 4. Append Writes information to the end of the file. Suppose systems automatically open a file when it is referenced for the first time and close the file when the job terminates. directory entry has stored a pointer to current end of file using this pointer the address for the next block is computed and the information can be written. Describe five file attributes. com. doc. Writing to a file (must be opened as output) 1. Make a list of as many file types that you can (e. When the next block is to be read the pointer to next block is updated. system call must specify name of file and the information to be written. 4. 2.

Truncated D. Name B. Location Operating System Concepts Mrs. Identifier C.b) A group of application programs c) A mapping of the physical properties of a storage device to a logical storage unit d) A group of related databases with minimum duplication and redundancy 2. G. Which of the following is NOT a file attribute? A. Campbell Copyright @ 2010 Updated Jan 2010 37 .

To handle this problem. A directory is therefore similar to a table of content or index in a text book. Directory structure provides a mechanism for organizing the many files on the file system.Directory Systems (2 hours) Early file systems were tape based. Studies showed that most files were small. The following describes the different directory systems: Operating System Concepts Mrs. creation date. not physical. Just think of all of the things that you can do in MyDocuments or Windows Explorer.400 feet). G. This allows the file to be easily located. Directory Systems Types of directories/directory structures The term directory system can also be referred to as type of directory or directory structure. therefore they would take up a small amount of tape. Campbell Copyright @ 2010 Updated Jan 2010 38 . systems were created to store multiple files on one tape. but it suffers from some inefficiency. The advantage of this approach is simplicity.Lecture 5 . They include the following: • • • • • • • • Search for a particular file Create a file Delete a file Rename a file Create directory List directory Traverse the file system Backup Nowadays. Directory Operations Directory operations are those actions performed on a directory by a user. To solve this problem a directory was added to the tape. directories are known as folders and are identified by a folder icon . These are all directory operations. A file can be on more than 1 disk. The device directory records information such as name. There was a problem in determining which files were on which tape. size and type for all files on that device. but the user only has to worry about logical directory and file structure. 2.g. since physical tape reels are quite large (e. The directory lists the name and location of each file on the tape. A directory structure organizes and provides information about files on the system. location. Each file was implemented by mapping it onto its own reel of tape. The table of content or index is used to location specific chapters or topics.

system files and grouping files. G. In normal use. All files must have unique names. There are limitations in terms of sharing files with other users.Single level . grouping and other operations such as deleting. It however has significant limitations in terms of the naming of a large number of files as well as supporting different users and topics (groups). This structure is efficient for searching. Each entry in the master file directory points to a user file directory. Operating System Concepts Mrs. Users may also create their own subdirectories. each user has a current directory. Two level – There is one master file directory but a separate directory per user. Every file has a unique path name. A path name is the path from the root through all the subdirectories. Allows users to create their own subdirectories and organize their files accordingly. It is easy to support and understand. When a user lists the directory he sees only his files.g. This isolates one user from another. Windows. The tree has a root directory.e. If a file is needed which is not in the current directory. Campbell Copyright @ 2010 Updated Jan 2010 39 . to a specified file. then the user must either specify a path name or change the current directory. A file name is prefixed by user name. DOS. Tree. All files are in the same directory. The current directory should contain most of the files that are of current interest to the user.the simplest directory structure.structures . UNIX.

Note that files have multiple path names.e. therefore distinct file names may refer to the same file. NB. This occurs in cases where two users need to use a common directory as their own directory. This directory system therefore allows for the sharing of directories and files. Changes made by one user to the file are viewed immediately by the other user. Campbell Copyright @ 2010 Updated Jan 2010 40 . The following is an example using Unix. G.EXAMPLE OF A TREE DIRECTORY STRUCTURE The diagram shows that the path to file D is ROOT\DIRECTORY2\DIRECTORY2A Acyclic Graph . can be access through more than one path). Symbolic links Operating System Concepts Mrs. It is not the same as two copies. EXAMPLE OF AN ACYCLIC GRAPH DIRECTORY STRUCTURE The diagram shows that file D has multiple paths which are:ROOT\DIRECTORY2\DIRECTORY2A and ROOT\DIRECTORY1 There are different ways in which acyclic graphs (shared files and directories) are implemented.A shared directory or file exists in the file system in two (or more) places at once. The same file may be in two different directories (i.

Campbell Copyright @ 2010 Updated Jan 2010 41 . Practice MCQs 1. HPFS. Research on the various filing systems (such as FAT.• • • • A different type of a directory entry (other than a file or a directory) Specifies the name of the file that this link is pointing to Can be relative or absolute. Compare and contrast FAT with NTFS. Differentiate between the tree structure and the acyclic structure. 3. Problem: What happens when the original file is deleted? Duplicate directory entries (also called hard links) • The original and copy entries are the same • Problem: What happens when one deletes the original or copy entries? Tutorial Questions 1. G. All of the following are TRUE for the tree structure EXCEPT: a) Files are organized into directories and sub-directories b) Changes made by one user of the file is viewed immediately by the other user c) Every file has a unique path name d) Duplicate file names are seen as different files Operating System Concepts Mrs. 4. NTFS). Research the General-Graph directory. Which of the following directory systems allow files to be in more than one directory at the same time? a) Single level b) Two level c) Tree d) Acyclic 4. How does it deal with the problems of the acyclic graph directory? 2. Which of the following directory systems have a separate directory for each user? a) Single level b) Two level c) Tree d) Acyclic 3. A two-level directory structure a) Has a root directory and two subdirectories b) Is the most complex directory structure c) Has two files in each directory d) Has a separate directory per user 2.

a tape. The operating system picks one of the jobs in the job pool (ready queue) and begins to execute it. Normally the CPU would sit idle. Multiprogramming or multi-tasking is an attempt to increase CPU utilization by always having something for the CPU to execute. for an I/O device).Multi-programming and TimeSharing (1 hour) Multi-programming A single user cannot keep either the CPU or the I/O devices busy at all times.g. the current instruction.Lecture 6 . but in a multi-programmed environment the CPU will switch to another job. The basis of the multi-programmed operating system is that by switching between jobs the CPU becomes more productive.g. Memory management software keeps track of the jobs being run. Campbell Copyright @ 2010 Updated Jan 2010 42 . Eventually the job may have to wait for something (e. Process images) so that movement between the disk and main memory is Operating System Concepts Mrs. In a multi-programmed environment the operating system would switch to another job. Eventually the job may have to wait for something. another job can be using the CPU.). This is also called concurrent processing. The basic idea is that the operating system picks one of the jobs in the job pool and begins to execute it. addresses etc. file pointers. Process State Diagram Updated Process State Diagram While one job is waiting (e. By switching between processes the operating system can make the computer more productive. G. keyboard input etc.e. normally the CPU would sit idle. (i. variables.

New B. The location of current instructions. Which of the following process states indicates that the process is waiting to be assigned to the processor? A. Differentiate between a process and a program. This communication is called interprocess communication (message passing). values in variables. Practice MCQs 1. form part of a) Interprocess communication b) Kernel c) Ready queue d) Process image 2.transparent to the user and so that the job can be restarted at the same state at which it was stopped. and I/O status information. What are the main advantages of multi-programming? 2. Campbell Copyright @ 2010 Updated Jan 2010 43 . 3. G. CPU scheduling information. What is the purpose of multi-programming? a) To improve the process state b) To prevent deadlock c) To perform aging d) To increase CPU utilization 3. accounting information. file pointers etc. memory management information. Memory management software should also protect the operating system and the Job in that the Process/Job should not be placed in an area in memory reserved for the kernel. Waiting D. information associated with each process. Describe the operation of the PCB. CPU registers. Tutorial Questions 1. The Process Control Block (PCB) has the process state. Ready Operating System Concepts Mrs. Running C. Related processes that are co-operating to get some job done often need to communicate with one another and synchronize their activities. program counter. In other words.

and giving processor time to another process. Computers capable of providing time-sharing services would usually operate in batch mode overnight. however. or network input could be granted to other users. regardless of the number of users. Similarly. small slices of time spent waiting for disk. tape. This required a hardware interrupt system capable of pausing a running process. Time-sharing. In order to provide smooth service to multiple users. a time-sharing system needed a way to deal with multiple processes that did not frequently pause for input/output. But because computers in interactive use often spend much of their time idly waiting for user input. while multitasking more broadly encompasses the simultaneous execution of multiple processes. Because early mainframes were extremely expensive. Differentiate between multi-programming and time sharing. G. Campbell Copyright @ 2010 Updated Jan 2010 44 . Operating System Concepts Mrs.Time Sharing Time-sharing is an approach to interactive computing in which a single computer is used to provide apparently simultaneous interactive general-purpose computing to multiple users by sharing processor time. refers to a computer supporting multiple simultaneous users. it was suggested that multiple users could share a machine by using one user's idle time to service other users. it was not possible to allow a single user exclusive access to the machine for interactive use. Time-sharing is related to multitasking in that both systems involve a single computer processor executing multiple processes in an apparently simultaneous manner. Tutorial Questions 1. These solutions alone were not sufficient to build a fully functional time-sharing system.

Process execution that consists of a cycle of CPU execution and I/O wait. G. An example is shown in the diagram below. The programs therefore have to be scheduled. algorithms (6 hours) Scheduling concepts In order for multi-programming to take place.8 Store z CPU burst Wait for I/O I/O burst . Operating System Concepts Mrs.Lecture 7 . Scheduling is done via scheduling algorithms which will be discussed later. .Scheduling concepts.determines which jobs are admitted to the system for processing and loads them into memory. . CPU – I/O Burst Cycle . Campbell Copyright @ 2010 Updated Jan 2010 45 . . . criteria. . Ready Queue/Job Queue – holds a list of jobs/processes which are ready and waiting to execute. Long Term Scheduler/Job Scheduler . the different programs need to take turns in using the processor. The following defines various scheduling concepts. Read from file add x to amount } } } } } } CPU burst Wait for I/O I/O burst Store y Write to file CPU burst Wait for I/O I/O burst Multiply by 16.

switches from wait state to ready or iv. __________ selects processes from the pool and loads them into memory for execution.Non-preemptive means that once the CPU is given to a job it cannot be pre-empted (stopped) until it completes its CPU burst. CPU scheduler Operating System Concepts Mrs. terminates. 5. Medium Term Scheduler . The short term scheduler must select a new process for the CPU quite often. Differentiate between pre-emptive and non-pre-emptive scheduling. Non pre-emptive scheduling . 4. 3. What is the role of the dispatcher? What is the difference between an I/O bound and CPU bound process? How does the long-term scheduler relate to CPU and I/O bound processes? Practice MCQs 1. 2. It controls the degree of multiprogramming (the number of processes in memory). CPU scheduling decisions may take place when a job either i. switches from an active to wait state or ii. it therefore must be very fast. Dispatch latency is the time that it takes for the dispatcher to stop one process and start another. switches from an active to a ready state or iii. b) switching to user mode c) jumping to the proper location in the user program to restart the program. At some time later the process can be reintroduced into memory and continued where it left off. Pre-emptive scheduling . Research alternate names for the various schedulers.selects from among the jobs in memory which are ready to execute and allocates the CPU to one of them. Medium term scheduler D.Some systems introduce an additional. Short term scheduler C. Differentiate between the short term and the long term scheduler. Tutorial Questions 1. This involves a) switching context.If a new job arrives with certain criteria then the current job will be pre-empted (stopped) for the other. 6. The distinction between these two schedulers is the frequency of their execution. This scheme is called swapping. Swapping may be necessary to free up memory. A.Short Term Scheduler/CPU Scheduler . Long term scheduler B.This is the module which gives control of the CPU to the process selected by the short term scheduler. intermediate level of scheduling. G. Dispatcher . It removes processes from memory and thus reduces the degree of multiprogramming. The long term scheduler executes much less frequently. Campbell Copyright @ 2010 Updated Jan 2010 46 .

G.2. Campbell Copyright @ 2010 Updated Jan 2010 47 . Which of the following is true for the high level scheduler? a) It ensures a good mixture of CPU bound and I/O bound jobs b) Its selects which job gets to use the processor next c) It removes jobs from memory d) It uses a processor scheduling algorithm Operating System Concepts Mrs.

how busy you keep CPU.how long it takes to execute a job • waiting time – the amount of time that a job spends in the ready queue • response time . turnaround time B. • throughput . Practice MCQs 1. Describe the various scheduling criteria. Campbell Copyright @ 2010 Updated Jan 2010 48 . response time D. CPU scheduling algorithms can be rated on which of the following criteria? a) Pre-emption b) Blocking c) Throughput d) SJF 2. Tutorial Questions 1. The criteria for selecting/comparing CPU scheduling algorithms are:• CPU utilization . waiting time C. The number of processes that are completed per unit of time is called a: A. G. throughput Operating System Concepts Mrs.time from submission of request until the first response is produced. The aim is to keep the CPU as busy as possible.Scheduling criteria Different scheduling algorithms have different properties and may favour one class of processes over another.work done/number of jobs completed per unit of time • turnaround time .

P3. for P3 = 3. P3. P2. Campbell Copyright @ 2010 Updated Jan 2010 49 . G. This is a non-preemptive algorithm. Example: Process P1 P2 P3 P4 Arrival Time 0 2 4 5 Burst Time 7 4 1 4 The Gantt chart would be as follows: Operating System Concepts Mrs. the jobs/processes are executed in the order in which they enter the system. for P2 = 0. For example: Process P1 P2 P3 Burst Time 24 3 3 Suppose the processes arrive in the order P1. P1. First Come First Served or First In First Out (FCFS/FIFO) For this type of scheduling. The operating system has to predict the CPU time that will be used. Then the Gantt chart would be as follows: P1 0 24 P2 27 P3 30 Suppose the processes arrive in the order P2. The average waiting time would therefore be (6+0+3)/3 = 3 Shortest Job First (SJF) In SJF scheduling when the CPU is available the job that is the shortest gets the CPU next.Scheduling algorithms The purpose of a scheduling algorithm is to select and allocate the CPU to a waiting process. SJF is optimal in that it gives minimum average waiting time for a given set of jobs. Then the Gantt chart would be as follows: P2 0 3 P3 6 P1 30 The waiting time for P1 = 6.

G. A priority number is associated with each job. Blocking/starvation occurs when a job is constantly being passed over because of its low priority. Campbell Copyright @ 2010 Updated Jan 2010 50 . Usually the smaller number is the highest priority. If the time quantum is small then overload would be too high. Round robin (RR) In RR scheduling (also called circular queue) each job gets a time quantum or time slice (e. memory requirements.g. If the time quantum is large then RR equates to FIFO. Examples of pre-emptive algorithms are: Operating System Concepts Mrs. 100 msec).P1 0 The average waiting time = (0+6+3+7)/4 = 4 7 P3 8 P2 12 P4 16 Priority In priority scheduling the job with the highest priority gets the CPU next. The operating system may increase the priority the longer the job is in the queue.by a person (e. If there are n jobs in the ready queue and the time quantum is q. Example of RR with time quantum 20 Process P1 P2 P3 P4 Burst Time 53 17 68 24 The Gantt chart would be as follows: P1 0 20 P2 37 P3 57 P4 77 P1 97 P3 117 P4 121 P1 134 P3 154 P3 162 Pre-emptive A pre-emptive algorithm stops a job in middle of the job running if a job that satisfies a criteria comes along. Priority can be defined:• internally – based on time limits.g. then each job gets 1/n of the CPU time in chunks of at most q time units at once. No job waits for more than (n-1)q time units. After this time has elapsed the job is pre-empted and added to the end of the ready queue. number of open files etc. • externally . This process is called aging. system administrator).

Given the information in the table below: Job A B C D E Copyright @ 2010 CPU Burst time (sec) 10 1 2 1 5 Priority 3 1 (highest) 3 4 2 Updated Jan 2010 Operating System Concepts Mrs. a common division is made between foreground (interactive) jobs and background (batch) jobs. In other words. Campbell 51 . Example: Process P1 P2 P3 P4 Arrival Time 0 2 4 5 Burst Time 7 4 1 4 The Gantt chart would be as follows: P1 0 2 P2 4 P3 5 P2 7 P4 11 P1 16 Average waiting time = (9+1+0+2)/4 = 3 • Pre-emptive priority – stops the highest priority job if a job with a higher priority enters the system.g. In addition. Jobs are permanently assigned to one queue. G. if a new job arrives with CPU burst length that is less than the remaining time of the current job then the current job will be pre-empted for the other. Each queue has its own scheduling algorithm. Tutorial Questions 1. What is the purpose of a CPU scheduling algorithm? 2. These two types of jobs have quite different response time requirements. generally based on some property of the job. E. foreground jobs may have priority over background jobs. A multi-queue scheduling algorithm partitions the ready queue into separate queues. and so might have different scheduling algorithms. Multilevel queues Another class of scheduling algorithms has been created for situations in which jobs are easily classified into different groups. such as memory size or job type.• Shortest remaining time first (SRTF) – stops the shortest job if an even shorter job enters the system.

RR (timeslice = 2sec) b) Which algorithm gives the best throughput after 10 secs. which algorithm is the most efficient? Why? 4. Campbell Copyright @ 2010 Updated Jan 2010 52 . Priority iv. What advantage is there in having different quantum sizes on different levels of a multi-level queuing system? Practice MCQs 1. A multilevel feedback queue a) Allows jobs to move between queues of different priority b) Have one common queue for batch and interactive jobs c) Assign jobs permanently to a queue d) Allows a job to be in more than one queue at the same time 3. Priority. FCFS ii. SJF. All of the following affect the degree of multiprogramming except: a) Job scheduler b) Number of partitions c) Medium term scheduler Operating System Concepts Mrs. SJF iii. G. CPU Burst Time (secs) Priority A 6 4 B 2 3 C 9 1 (Highest) D 3 2 a) Use Gantt charts to illustrate the order of execution of these processes using:i.a) What is the turnaround time and waiting time of each job for FIFO. How does a multi-level feedback queue differ from a multilevel queue? 5. Distinguish between Shortest Job First and Shortest Remaining Time. Round Robin (Time quantum of 2 seconds) b) What is the throughput after 13 seconds for each of the scheduling algorithms? c) What is the turnaround time for each process for each of the scheduling algorithms? d) In this situation. 3. Given the following information (Taken from CCCJ Aug 2003 exam) Job Id. 4. The problem of starvation can be solved by a) Blocking b) Dispatching c) Multilevel queues d) Aging 2.

Round robin scheduling 10. Which scheduler reduces the degree of multiprogramming? a) Short term b) Medium term c) Intermediate term d) Long term 9. Starvation C. Which of the following indicates that a low priority process does not get access to an available resource due to the fact that the system is always busy? A. First come first served C. Paging Operating System Concepts Mrs. Priority scheduling D. Campbell Copyright @ 2010 Updated Jan 2010 53 . G.d) CPU scheduler 4. Which scheduler uses a processor scheduling algorithm? a) Short term b) Medium term c) Intermediate term d) Long term 7. How does a multi-level feedback queuing system carry out aging? a) Swaps jobs out of memory b) Improve the scheduling strategies c) Move jobs to a higher priority queue d) Use longer time slices in RR scheduling 8. The amount of time that a job gets to use the CPU in round robin scheduling is called a) Circular queue b) Time slice c) Aging d) Priority 5. Aging B. Shortest job first B. Which of the following indicates that the process that requests the CPU first is allocated first? A. What is the purpose of a processor scheduling algorithm? a) To manage multiple CPUs b) To select and allocate the CPU to a waiting job c) To prevent starvation d) To increase the average waiting time 6. Fragmentation D.

Asymmetric multiprocessing Asymmetric multi-processing (ASMP) is where only one processor accesses the system data structures. The main difference is in how the processors operate. The remainder of the processors run user applications. the whole computer can go down. Campbell Copyright @ 2010 Updated Jan 2010 54 . independent executable components of applications) of execution. As a result. Multiple-processor computers are commonly used as high-end server platforms. Operating System Concepts Mrs. Because the operating system threads can run on any processor. a multiprocessing operating system actually does so. Symmetric Multiprocessing Symmetric multi-processing (SMP) is used to get higher levels of performance. Any processor can run any type of thread. one thread for each processor in the computer. A thread is a part of a program that can run independently of other parts.Multiple processor scheduling (2 hours) In a multiprocessing system tasks are handled simultaneously. All processors are allowed to run a mixture of application and operating system code. SMP is more complex than ASMP. This forces the applications to wait while the operating system catches up. hosts for multiuser interactive sessions. Multi-processing involves a computer having more than one CPU. all running at the same time. alleviating the need for data sharing. A multitasking operating system only appears to execute multiple threads at the same time. and single-user systems for running resource intensive desktop applications. The operating system typically sets aside one or more processors for its exclusive use. The processors communicate with each other through shared memory. If the processor that fails is an operating system processor. which reduces the overall throughput of the system. SMP systems provide better load-balancing and fault tolerance. Multiprocessing operating systems can be either asymmetric or symmetric. For this reason. the chance of hitting a CPU bottleneck is greatly reduced. SMP systems are usually designed and written from the ground up. Multitasking is an operating-system technique for sharing a single processor among multiple threads (small.Lecture 8. A processor failure reduces the computing capacity of the system. Multithreading operating systems allow programmers to design programs that have threaded parts that can run concurrently. A multiprocessing computer can execute multiple threads simultaneously. G. A large amount of coordination must take place to keep everything synchronized. the single processor running the operating system can fall behind the processors running user applications.

• Homogenous system (all processors identical – e. Parallel processor C. Multiprogramming 2. Coprocessor B. 6. Multiprocessing C. A. ___________ method uses multiple processors simultaneously to execute a program. 1 AMD. A. 5. the multiple processors involved are full-fledged general purpose CPUs. Tutorial Questions 1. Campbell Copyright @ 2010 Updated Jan 2010 55 . Multithreading D. Practice MCQs 1. • Heterogenous system (different processors – e. 4. all Pentium 4) – There is a separate queue for each processor or they all use a common queue. Multitasking Operating System Concepts Mrs. Multiprogramming B. multiprocessing C. multiuser D. 2. G. 3. Multitasking D. In parallel processing.g.Homogenous and Heterogenous systems Multiprocessing can also be categorized as being homogenous or heterogenous. 3 Pentium II. They are tightly integrated so that they can work together on a job by sharing memory. How does multi-programming differ from parallel processing? What is a thread? What is the difference between user threads and kernel threads? What is the dining philosopher’s problem? What is a semaphore? Describe busy waiting and the critical section problem? Differentiate between symmetric and asymmetric multiprocessing. 2 Motorola 68030) Each processor has its own queue and its own scheduling algorithm. Jobs are typed by their structure and must be run on a particular processor. A. which is the most sophisticated and fastest type of multiprocessing. ________________ is the ability of an operating system to execute different parts of a program at the same time. multitasking B. A ____________ operating system can support two or more CPUs running programs at the same time. multiprogramming 3.g.

4. symmetric multiprocessing C. G. Campbell Copyright @ 2010 Updated Jan 2010 56 . multiprocessing D. asymmetric multiprocessing B. multiprogramming Operating System Concepts Mrs. When one processor accesses the system data structure and therefore reduces data sharing this is known as: A.

Find out the different memory requirements of different modern operating systems. 4. and if such a program is simultaneously part of two or more process images it may be desirable to keep a single physical copy of the code segment. we must share memory. it will be sharing the memory with the kernel/monitor. It is therefore necessary to have another layer of software in the operating system that stores process images on disk. If the process had to be put on the disk and then reloaded into a different memory location. stack and system data. though the code. 2. There are four requirements of a memory management system:1. Memory mapping . If more than one process is in memory at any one time there is an additional need to enforce mutual protection between them. data. and arranges for the appropriate images to be present in main memory when they are required. Operating System Concepts Mrs. Multiple Segments The process is logically composed of a number of segments: code. 3. It should not matter where in memory the process has been placed. Transparency Memory allocation should be invisible to the process.Distinguish between the logical address seen by the executing program and the physical address of the actual memory. Code sharing If the code of a program is invariant (not altered by the program). it still should not matter. which appears logically in all the appropriate process images. Protection Even if only one process is in memory at a time. and it is imperative that a malfunction of the process should not overwrite kernel code or data. This is done in such a way that the process is not aware of the movement between disk and main memory . 2. Campbell Copyright @ 2010 Updated Jan 2010 57 . It may be required to have these segments in physically disjoint memory areas. If we must keep several processes in memory. G.Lecture 9 . stack and data segments must appear to be logically contiguous.the memory management software presents an interface that simulates an apparently infinite memory. Research the MMU or PMMU.Memory Management (1 hour) Introduction Multi-programming causes processes to have to share memory. Everything cannot hold in this limited space at any one time. Each machine has a certain amount of memory. Tutorial Questions 1.

Campbell Copyright @ 2010 Updated Jan 2010 58 . All of the following are requirements for a memory management system except: a) Protection b) Transitivity c) Multiple Segments d) Code Sharing Operating System Concepts Mrs. G.Practice MCQs 1.

5. with a small amount of very fast. 2. Make sure you find out some of the precautions that you need to take. non-volatile disk storage. medium priced volatile main memory (RAM) and a large amount of slow. It is the job of the operating system to co-ordinate how these memories are used. but very fast. The higher levels are expensive. G. while the access time increases and the amount of storage at each level increases. some medium speed. Describe the different types of RAM. 4. Campbell Copyright @ 2010 Updated Jan 2010 59 . Research how to increase the RAM in a computer. Operating System Concepts Mrs. expensive. Describe the different types of cache. MEMORY HIERARCHY Tutorial Questions 1. Research the cost of different types and sizes of RAM as well as the cost of different types and sizes of hard disks. The part of the operating system that manages this hierarchy is called the memory manager. which can be organized in a hierarchy. If another reference is made to this location. Compare and contrast them. When a memory access is made. cheap. volatile cache memory.Memory hierarchy Most computers have a memory hierarchy (storage hierarchy). There is a wide variety of storage in a computer system. plus its neighbours are copied to the cache. 3. Discuss the different secondary (auxiliary) storage device. they can be fetched directly from the cache without having to go to the slower speed main memory. As we move down the hierarchy the cost per bit decreases. the contents of the accessed location.

register. cache b) Cache. Which of the following storage device is the slowest? A. cache 3. RAM. register.Practice MCQs 1. What are the characteristics of memory at the bottom of the hierarchy? a) Cheaper and larger in capacity b) Cheaper and smaller in capacity c) Faster and larger in capacity d) Faster and smaller in capacity 5. G. Main Memory 6. Electronic Disk C. Which of the following is the fastest and MOST expensive type of storage? A. Magnetic Disk Operating System Concepts Mrs. hard disk d) Hard disk. Registers C. Cache B. RAM. hard disk c) Register. Campbell Copyright @ 2010 Updated Jan 2010 60 . Main memory D. a) Hard disk. Magnetic Disk B. RAM. register. cache. Memory that is at the top of the hierarchy is a) Slower and more expensive b) Non-volatile and slower c) Non-volatile and more expensive d) Faster and more expensive 2. RAM. Select the correct ordering of memory in the storage hierarchy. What are the characteristics of memory at the top of the hierarchy? a) Cheaper and larger in capacity b) Cheaper and smaller in capacity c) Faster and larger in capacity d) Faster and smaller in capacity 4. Cache D.

For example a 32-bit CPU is one in which each register is 32 bits wide. Intel chips have 6 general purpose registers. and even to programmers. In high-level languages. and flags. and some addressing registers. these include a program counter. RAM is much slower than registers and there is a lot more RAM than registers. Effective addresses are calculated by adding the contents of the base or segment register to the rest of the effective address computation. if the base register holds 300020 and the limit register holds 120800. flags register. limit register (1 hour) What is a register? A register (or memory register) temporarily stores one computer word in the main internal memory of a digital computer. high-speed storage area within the CPU. To do this there needs to be a way to determine the range of legal addresses that the program may access. program counter. Operating System Concepts Mrs. is located external to the CPU and holds the instructions and the data that the program requires. registers are storage locations internal to the processor. There are also registers that are reserved for certain tasks. G. memory management software ensures that memory is shared among different programs. It is a special. There are generally only a few registers available on a processer. then the program can legally access all addresses from 300020 to 420820 (inclusive).Lecture 10 . The operating system needs to ensure that each program has its own memory space. Campbell Copyright @ 2010 Updated Jan 2010 61 . Base registers or segment registers are used to segment memory. In general. Only assembly language programs can manipulate registers. In other words. For example. stack register. CPU instructions operate on these values directly. The base register holds the smallest legal physical memory address. Memory. data has to be loaded into a CPU register from memory before the CPU can process it. This can be done by using two registers: a base register and a limit register. Therefore. Types of registers As previously stated. or RAM.Basic memory hardware – base register. the movement of data in and out of registers is completely transparent to users. In other words it holds the data that the CPU is currently working on. Usually. the compiler is responsible for translating high-level operations into low-level operations that access registers. whereas the limit register specifies the size of the range. each CPU instruction can manipulate 32 bits of data. stack. and several specialized registers including a base register. The number of registers that a CPU has and the size of each (number of bits) help determine the power and speed of a CPU.

and the number of words available to that segment. G. the so-called base. Find out the processors that have 32-bit registers. A base-bound register (base-limit register) is hardware used for virtual-memory allocation. 2. the so-called bound or limit (or alternatively the physical memory address of the next word after the end of the segment. in which case it is a bounds register). Operating System Concepts Mrs. A base-bound register is associated with each segment of data or code and defines the position in physical memory of word zero for that segment.A bounds register is a device which stores the upper and lower bounds on addresses in the memory of a given computer program. Campbell Copyright @ 2010 Updated Jan 2010 62 . Tutorial Questions 1. Discuss the other types of registers.

Segment Base Length 0 219 600 1 2300 14 2 90 1000 3 1327 586 4 1952 196 What are the physical addresses for the following logical addresses (segment. This is known as relocation mapping or memory mapping. 2. but the first address beyond the fence. b) placed in a fence register. It is possible to place the monitor into either low memory or high memory.Lecture 11 .Logical vs. G. the first address of the user program is not 00000. Consider the segment table. Monitor < Fence address User Memory We can protect the monitor code and data from changes (accidental or malicious) by using a fence address. The fence register is a type of bounds register. Campbell Copyright @ 2010 Updated Jan 2010 63 . This arrangement may affect the addresses that the user program uses. Physical address space (1 hour) Memory is divided into two sections. logical address)? See if you can come up with a formula. The logical address is also known as the virtual address. The user never sees the real physical address but only the logical address. User programs are run in their own area of memory. Operating System Concepts Mrs. The physical address space is therefore an address as seen by the memory unit. The fence address is added to the address generated by the user process at the time that it is sent to memory. Differentiate between a logical and a physical address. while a logical address space is an address generated by the CPU. The logical address space is used by user programs. one for the user and one for the resident monitor. Tutorial Questions 1. The fence address can be a) built into the hardware. Although the address space of the computer starts at 00000.

11 0. 10 1. G. 400 4. 430 2. 500 3.a) b) c) d) e) f) 1. 112 Practice MCQs 1. Adding the fence address to a user program in RAM is a) Relocation mapping b) Code sharing c) Blocking d) Compaction Operating System Concepts Mrs. Campbell Copyright @ 2010 Updated Jan 2010 64 .

Swapping on a virtual memory computer is therefore the transfer of program segments (pages) into and out of memory. Describe the concept of swapping. In extreme cases. Swapping therefore attempts to put only currently running processes in memory. as the CPU and I/O loads that can be generated in such a situation can quickly outweigh the load imposed by a system's real work. 2. The advantage of swapping is that more processes can use memory more efficiently. Practice MCQs 1. Thrashing is extremely detrimental to system performance. Swapping maximizes available memory. Discus the concept of the swap file in Windows. over and over again: • • • Pages from a process are swapped The process becomes runnable and attempts to access a swapped page The page is faulted back into memory (most likely forcing some other processes' pages to be swapped out) A short time later. It is not necessary to keep inactive processes in memory. The disadvantage however is the time taken to perform swapping (overhead). This is done in order to free up sufficient physical memory to meet the RAM allocation requirements of the requestor. Operating System Concepts Mrs. Tutorial Questions 1. the system may actually do no useful work. Swapping (writing modified pages out to the system swap space) is a normal part of a system's operation. spending all its resources moving pages to and from memory. Why would swapping be necessary? 3. The reason to be wary of excessive swapping is that the following situation can easily occur. it is possible to experience too much swapping. Campbell Copyright @ 2010 Updated Jan 2010 65 . G.Lecture 12 – Swapping (1 hour) When a process running on a computer attempts to allocate more memory than the system has available. It should also be noted that not all processes can be swapped so care must be taken. ___________ consists of bringing in each process in its entirety. excessive paging is not desirable. it is known as thrashing and is indicative of insufficient RAM for the present workload. the page is swapped out again • If this sequence of events is widespread. running it for a while. It occurs when a process needs to be in memory to execute and can be swapped to a backing store (temporarily) then brought back into memory for continued execution. the kernel begins to swap memory pages to and from the disk. Although paging is the primary mechanism for virtual memory.

Paging C. Fragmentation Operating System Concepts Mrs.then putting it back on the disk. Scheduling B. Swapping D. Campbell Copyright @ 2010 Updated Jan 2010 66 . G. A.

worst fit. The difficulty with contiguous allocation is finding space for a new file. The directory contains a pointer to the first (and last) blocks of the file. since all blocks are linked together. For direct access to block n of a file which starts at block b. This solves the fragmentation problem. Another problem of contiguous allocation is to know how much free space (holes) to give to a file. linked. The algorithms suffer from fragmentation. G. There is no need to declare the size of a file when it Operating System Concepts Mrs. then the file cannot be extended/made larger. If the file to be created is n blocks long. Disk addresses define a linear ordering on the disk. For sequential access.Contiguous vs non contiguous memory allocation (4 hours) In almost every case. Three major methods of allocating disk space are in use: contiguous. Thus both sequential and direct access can be supported by contiguous allocation. Contiguous allocation This requires each file to occupy a set of contiguous addresses on the disk. Each method has its advantages and disadvantages. Compaction . Non-contiguous allocation a) Linked allocation Each file is a linked list of disk blocks. To read a file. many files will be stored on the same disk. Each block contains a pointer to the next block. If too little space is allocated. the file system remembers the disk address of the last block and when necessary reads the next block. The blocks chosen for the file are chosen by one of three memory allocation strategies or algorithms: first fit.This re-allocates the files to allow all free space to be one contiguous space. Contiguous allocation of a file is defined by the disk address of the first block and its length. There is no external fragmentation with linked allocation. External fragmentation exists when enough total disk space exists to satisfy a request but it is not contiguous. indexed. the disk blocks may be scattered anywhere on the disk. Overestimating the file size also wastes space. Any free block can be used to satisfy a request. we must search for n free contiguous blocks. we can immediately access block b + n. Accessing a file. Campbell Copyright @ 2010 Updated Jan 2010 67 . simply read blocks by following the pointers from block to block. best fit. Free disk space gets broken into little pieces as files are allocated and deleted.Lecture 13 . which has been contiguously allocated is fairly easy. The main problem is how to allocate space to these files so that disk space is effectively utilized and files can be quickly accessed.

Any free block anywhere on the disk may satisfy a request for more space. needs to work with certain files. It is never necessary to compact disk space. In order to conserve on space. a programmer. Some operating systems support direct access files by using contiguous allocation and sequential access files by using linked allocation. 5. Another problem is reliability. added at the end. A file currently consists of 100 blocks. 4. removed from the middle. Brown use? Give reasons for your choice. If the index block is damaged then the entire file is lost. Since the files are linked together by pointers scattered all over the disk. The nth entry in the index block points to the nth block of the file. Another disadvantage is the space required for the pointers. b) Indexed allocation Each file has its own index block. consider what would happen if a pointer is lost or damaged. List the advantages and disadvantages of each storage allocation method. Mr. The pointer overhead of the index block is generally worse that the pointer overhead of linked allocation. Brown needs fast and easy access to the files using both sequential and direct access methods. removed from the end? Operating System Concepts Mrs. It also does not suffer from wasted space. we must start at the beginning of that file and follow the pointers until we get to the nth block. The major problem with linked allocation is that it can only be used effectively for sequential access files. The directory contains the address of the index block. The sizes of the files are known from the start and will not grow in size. which is an array of disk block addresses. Campbell Copyright @ 2010 Updated Jan 2010 68 . the files should use memory space in an optimal manner. How many disk I/O operations are involved with contiguous. we use the pointer in the nth index block entry to find and read the desired block. The pointers are however not scattered all over the disk. John Brown. Each access to a pointer requires a disk read. To read the nth block.is created. Which storage allocation method would you recommend that Mr. A file can continue to grow as long as there are free blocks. added in the middle. To find the nth block of a file. Discuss the criteria that should be used in deciding which storage allocation strategy should be used for a particular file. Index allocation supports direct access without suffering from external fragmentation. How would you represent each with a diagram? 2. Hence we cannot support a direct access capability for linked allocation files. link and indexed allocation methods if one block is: added at the start. 3. Tutorial Questions 1. Explain three (3) storage allocation methods. G. removed from the start.

Practice MCQs 1. Which of the following is true about linked allocation? a) It can be used only for sequential files b) It requires compaction c) It is very reliable d) There is external fragmentation 2. A disadvantage of contiguous allocation is a) It allows access to sequential files only b) It allows any free block to be used c) It is unreliable d) It suffers from fragmentation 3. Which storage allocation method requires compaction utilities? a) Contiguous b) Linked c) Indexed d) All of the above 4. Which storage allocation method requires de-fragmentation utilities? a) Contiguous b) Indexed c) Linked d) Listed 5. Which of the following is TRUE for a contiguous storage allocation scheme? a) The directory points to the first and last block b) The access method is limited to sequential only c) The directory points to the first block d) There is no need for compaction 6. All of the following are TRUE for indexed storage allocation EXCEPT: a) The directory points to the index block b) Only sequential access is allowed c) It does not suffer from fragmentation d) All of the pointers are in one block 7. Which of the file allocation methods is not randomly accessed? A. Contiguous allocation B. Linked Allocation C. Indexed allocation D. Addressed allocation

Operating System Concepts Mrs. G. Campbell Copyright @ 2010

Updated Jan 2010

69

Memory allocation strategies – first fit, best-fit, worst-fit The memory allocation strategies or algorithms are used to find space for a new file in contiguous memory allocation. The free contiguous blocks for placement of the file are chosen by one of three memory allocation strategies. The strategies are as follows: • first fit - allocate the first set of blocks that is big enough. • best fit - allocate the smallest set of blocks that is big enough. We must search the entire list, unless the list is ordered by size. • worst fit - allocates the largest set of blocks. Tutorial Questions 1. Given a computer with 33 blocks of memory with block sizes 512KB and a file size of 2519KB. Place the file in memory using contiguous allocation – a) first fit, b) best fit and c) worst fit. Please note that blocks 1-4, 7-14, 16-24 and 28-33 are free. 2. Given a computer with 14 blocks of memory with blocks 1-3, 5-6, 9-12 free. a) If a 2 block file is to be saved in blocks 5-6, which storage allocation algorithm was used? b) If a 2 block file is to be saved in blocks 1-2, which storage allocation algorithm was used?

Practice MCQs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Figure 1 1. Using Figure 1. If a two block file is to be placed in blocks 7 and 8, then the allocation algorithm used is a) First fit b) Best fit c) Worst fit d) Just fit 2. Using Figure 1. If a two block file is to be placed in blocks 13 and 14, then the allocation algorithm used is
Operating System Concepts Mrs. G. Campbell Copyright @ 2010 Updated Jan 2010

70

a) b) c) d)

First fit Best fit Worst fit Just fit

3. Which type of contiguous storage allocation uses the smallest set of blocks that is large enough? a) Best fit b) Least fit c) Smallest fit d) Worst fit 4. Given memory that has 10 blocks with blocks 3 and 8 in use. Where would you place a 2block file using the worst-fit algorithm? a) Blocks 1 and 2 b) Blocks 4 and 5 c) Blocks 9 and 10 d) All of the above

Operating System Concepts Mrs. G. Campbell Copyright @ 2010

Updated Jan 2010

71

Partition sizes vary dynamically. However. External fragmentation can be dealt with in the following ways: • Coalescing – this is where adjacent free blocks are merged into one large block. a program is selected from the job queue and loaded into the free region. partition sizes vary depending of the size of the jobs being run. Campbell Copyright @ 2010 Updated Jan 2010 72 . No space is wasted initially. G. thereby protecting each partition from interference by other jobs. This leaves holes too small for new processes and eventually no holes will be large enough for new processes. Operating System Concepts Mrs. external fragmentation (see next section) can occur when processes are removed from memory.Lecture 14 – Partitions and Fragmentation (1 hour) Partitions Memory is divided into a number of regions or partitions. In variable partition multi-programming. When a region is free. Bounds registers keep track of the upper and lower boundaries of each partition. However this is sometimes not enough to reclaim significant amount of memory • Compaction (garbage collection) – this is where memory is rearranged into a single contiguous block of occupied space and a single contiguous block of free space. This method suffers from internal fragmentation (see next section). Jobs are scheduled to go to the different partitions based on the size. The degree of multiprogramming is therefore dependent on the number of partitions. These are also called base and limit registers (or low and high). Each region may have one program to be executed. This however comes with a lot of overhead. the partition sizes are set and do not change. The operating system does this by keeping a table indicating which parts of the memory are available and which are occupied by the different programs. Internal fragmentation is not possible as partitions are the exact size. Another drawback is that there may be a process that does not fit in any partition. Partitioned memory Types of partitioning In fixed partition multi-programming.

Campbell Copyright @ 2010 Updated Jan 2010 73 . G.Example of fixed partition multi-programming with absolute translation and loading Example of fixed partition multi-programming with relocatable translation and loading Operating System Concepts Mrs.

Campbell Copyright @ 2010 Updated Jan 2010 74 . What are the names of the two (2) types of partitions? A. What are they? Practice MCQs 1.Example of variable partition multi-programming Tutorial Questions 1. The degree of multi-programming is dependent on a number of things. Single and variable Operating System Concepts Mrs. G. Single and multiple D. Fixed and variable C. Multiple and fixed B.

G. Compaction is the a) Compression of sizes of files b) Rearrangement of the location of files c) Deletion of files d) Fragmentation of files Operating System Concepts Mrs. Differentiate between internal and external fragmentation. In the diagram below only part of a memory partition is being used by the job but the free space cannot be used by any other job free Used < Wasted space Memory partition Example of internal fragmentation External fragmentation – this occurs when a region of memory is unused and available but is still too small for any waiting job. Campbell Copyright @ 2010 Updated Jan 2010 75 . external Fragmentation is wasted memory space (available but cannot be used). Practice MCQs 1. 2. The diagram below shows a waiting job that cannot fit into memory even though space is available free used free used Memory Example of external fragmentation Waiting job Compaction – this is where the operating system shuffles the memory contents to place all free memory together in one large block. Internal fragmentation – this occurs when a job is in a region of memory that is larger than the job needs. Tutorial Questions 1. Use diagrams to depict both internal and external fragmentation.Fragmentation – internal. the extra space wasted.

Register C. However they all require the entire process to be in memory before the process can execute. Virtual memory D. G. Virtual memory/storage is the use of secondary storage (disk) to simulate the presence of primary storage. swapping are necessary because the entire logical address space of a process must be in physical memory before the process can execute. partitioning. Tutorial Questions 1. tables are often allocated more memory than they need. Campbell Copyright @ 2010 Updated Jan 2010 76 . This limits the size of a program to the size of physical memory. and not the amount of physical memory that must be dedicated to the program at any given time. Practice MCQs 1. Virtual means that this is the total number of uniquelyaddressable memory locations required by the program. It allows the execution of processes that may not be completely in memory. These had the goal of keeping many processes in memory simultaneously to allow multiprogramming. Cache B. Memory management procedures such as paging. But if you look at a program it shows in many cases that the entire program is not needed. The main advantage is that user programs can be larger than physical memory. Virtual memory allows the execution of processes that may not be completely in memory. List the various virtual memory strategies. 1) code to handle errors. Even where the entire program is needed it may not need all of it at the same time.Introduction to Virtual Memory (1 hour) We have just looked at memory management strategies. A. segmentation.Lecture 15 . Why is virtual memory necessary? 3. _____________ is a portion of a storage medium. E. usually the hard disk. 2) arrays lists. What is virtual memory? 2. Virtual memory is the separation of user logical memory from physical memory. Operating System Concepts Mrs. Buffer Virtual Address Space The virtual address (VA) space of a program refers to how much memory the program would need if it needed all the memory at once. which functions as additional memory.g.

but pages are not kept in contiguous blocks. G.1). Campbell Copyright @ 2010 Updated Jan 2010 77 . offset> where the page is determined by dividing each process into fixed size pages. the offset is a number in the range 0 . VA has two components: the page number and the address in page (or offset or displacement) An example of Virtual Address to Physical Address Mapping Operating System Concepts Mrs. VA is determined from the compiled address.(page size . In pure paging systems the entire VA space of a process must reside in physical memory during execution. The physical address (PA) then is (block_number * page_size + offset). Memory is divided into fixed size blocks (or page frames) and accommodates a process’ pages.A virtual address is represented as <page.

sometimes called a memory management unit. In pure paging the total program is kept in memory as sets of (non-contiguous) pages. Campbell Copyright @ 2010 Updated Jan 2010 78 . It does this by mapping contiguous logical space on to small disjoint areas of physical memory. which looks up the real address (from the page table) corresponding to a virtual address and passes the real address to the parts of the CPU which execute instructions. a CPU fetches an instruction located at a particular virtual address. Paging is to solve the problem of fragmentation. or fetches data from a specific virtual address or stores data to a particular virtual address. in the following diagram. Operating System Concepts Mrs. The user program believes that memory is one contiguous space. the other is in memory location 4. the program is scattered throughout physical memory. A Page table (set of dedicated registers) has a bit indicating whether page is resident (gives memory address) or non-resident (gives disk address). The basic idea of paging is to divide the memory into page frames of fixed size (typically between 512 and 2048 bytes). For example.Pure paging (2 hours) Paging is the most common virtual memory system. They are therefore scattered in memory. the hardware raises a page fault exception (special internal signal) which invokes the paging supervisor component of the operating system. The page table organizes the pages. If the page tables indicate that the virtual memory page is not currently in real memory. a file is made up of 4 pages.page size is 4K blocks by default). (E. Virtual memory is used to increase the degree of multiprogramming. Page 0 Page 1 Page 2 Page 3 Logical Memory 0 1 2 3 1 4 3 7 Page Table 0 1 2 3 4 5 6 7 Page 0 Page 2 Page 1 Page 3 Physical Memory Dynamic address translation If during the execution of an instruction. the virtual address must be translated to the corresponding physical address. containing only this one program. Programs or processes are divided into fixed size pieces called pages and main memory is divided into fixed size partitions called page frames or blocks. which also holds other programs.g. therefore in logical memory the pages seem to be placed one after the other in the proper sequence. the next in memory location 3 and the last is in memory location 7. In reality. This is due to the fact that you have more space in memory because all the pages would not be there to take up space.Lecture 16 . This is done by a hardware component. Some of the pages are stored on disk and brought into memory when required. The first page is in memory location 1. The page table maps logical memory to physical memory. G. Novell Netware .

Explain the concept of a page table. Advantages: • Efficient memory usage • Simple partition management due to is contiguous loading and fixed partition size • No compaction necessary • Easy to share pages Disadvantages: • Job Size <= Memory Size • Internal fragmentation (half the page size on the average) • Need special hardware for address translation • Some main memory space used for page map tables (PMT's) • Address translation lengthens memory cycle times Tutorial Questions 1. 4. Campbell Copyright @ 2010 Updated Jan 2010 79 . 2. G. Describe paging. Discuss PTBR and TLB.Paging solves the problem of external fragmentation. Operating System Concepts Mrs. Differentiate between a page and a page frame. 3.

This method never suffers from the anomaly. Allocation algorithms When several processes are running in memory it is possible that the different processes could be allocated different amounts of memory. A version of this algorithm is LRU approximation . The algorithms are FIFO. This has the lowest page fault rate. the page that has already been used the most. LRU. Allocation algorithms therefore are used to decide the number of page frames that a particular process receives. the page that has been used the least so far.uses number of reference bits to know if page was recently used. Optimal replacement. Locked pages cannot be replaced. This algorithm suffers from Belady’s anomaly which is where the page fault rate may increase as the number of page frames increase. This is hardware and overhead intensive. Least recently used (LRU) The O/S replaces the page which has not been used for the longest period of time. which may be difficult.Page replacement (3 hours) Page replacement algorithms decide which page is overwritten when a new page needs to be brought into memory.Lecture 17 . G. NB. FIFO The O/S chooses the oldest page. Optimal replacement The O/S replaces the page that will not be used for the longest period of time. In other words. MFU. In other words. A page fault occurs when a required page is not currently in memory and has to be loaded in. Least frequently used (LFU) The O/S replaces the page with the smallest count. Therefore the operating system needs to estimate when next it will be used. Campbell Copyright @ 2010 Updated Jan 2010 80 . The allocation algorithms are as follows:• split them equally – memory is equally divided up among the processes Operating System Concepts Mrs. LFU. In general you want the one with the lowest page fault rate. This does not suffer from the anomaly. Most frequently used (MFU) The O/S replaces the page with the highest count.

LRU? 2. Least recently used page replacement C. 4. Last recently used Operating System Concepts Mrs. LRU stands for: A. 8. LFU. 5. Counting based page replacement D. 2. 6. 2. Likely regularly used D. 5. Memory on John’s computer is made up of 10 blocks each 1MB. Optimal page replacement B. LFU. 3. 2. 8. 3. First-in-first-out algorithm 2. Least recently used B. Given the following table of jobs to be run. FIFO. If the following pages were used in the following order: 8. how many blocks would the operating system give to each job using each allocation algorithm? Job A B C D Memory Requirement (MB) 10 20 5 10 Priority 2 1 (highest) 3 4 4. 7.• proportional allocation – each process is allocated memory based on the amount of memory that each process will use • by priority of process – higher priority processes will be allocated more memory and lower priority processes will be allocated less memory Tutorial Questions 1. Campbell Copyright @ 2010 Updated Jan 2010 81 . 3. 8. Research the second-chance and any other page replacement algorithms. 1. 8. 5. If the following pages were used in the following order: 7. Practice MCQs 1. 9. What is a page fault? 5. 2. 4. 8. 3. 9. 4. A. 4. G. LRU? 3. What page would be replaced next using MFU. ___________ algorithm associates each page with the time when the page was brought into memory. FIFO. 2. 5. 9. What page would be replaced next using MFU. 9. 3. Least regularly used C.

the pager guesses which pages will be used prior to the process being swapped out again. more processes can be loaded reducing context switching time which utilizes large amounts of resources. Campbell Copyright @ 2010 82 . Locked pages cannot be replaced until a process is complete. Compare demand paging to pure swapping. To do this a lock bit is associated with each page. since protection fault can be used to get page fault. When demand paging is used it is sometimes necessary to allow some of its pages to be locked in memory.Lecture 18 . as opposed to loading all pages immediately: • • Only loads pages that are demanded by the executing process. This process avoids loading pages that are unlikely to be used and focuses on pages needed during the current process execution period. This is known as demand paging. where all memory for a process is swapped from secondary storage to main memory during the process startup. not only is unnecessary page load during swapping avoided but we also try to preempt which pages will be needed and avoid loading pages during execution.Demand Paging (2 hours) The operating system may try to predict the pages that will be needed next and load them into memory so that they are ready when needed. As there is more space in main memory. So demand paging may have lower performance than anticipatory paging algorithms such as prepaging. The pager will only load these pages into memory. Demand paging is the characteristic of a virtual memory system which retrieves only that part of a user's program which is required during execution. Easy to share pages Can run a program larger than physical memory • • • • Disadvantages • Individual programs face extra latency when they access a page for the first time. as less information is accessed from secondary storage and less information is brought into main memory. G. Advantages Demand paging. Does not need extra hardware support than what paging needs. Less loading latency occurs at program startup. or you can load in the page when required. When a process is to be swapped into main memory for processing. Therefore. Repaging is an attempt to bring in all of the pages that will be needed at one time. Updated Jan 2010 Operating System Concepts Mrs.

G. Practice MCQs 1. Tutorial Questions 1. A process is thrashing if it is spending more time paging than executing. Memory management with page replacement algorithms becomes slightly more complex. Internal fragmentation Needs special address translation hardware • • • • Thrashing Thrashing occurs if the currently active pages are habitually removed from memory unto disk. The generation of needless traffic to and from disk is known as thrashing. including vulnerability to timing attacks. High paging activity thrashing can occur if the number of pages/frames are too small. Thrashing can cause severe performance problems. Predicting the page that will be needed next and loading it into RAM is a) Page replacement b) Multiprogramming c) Demand paging d) Optimal replacement 3. Continuously removing the same page from RAM is a) Thrashing b) Most frequently used c) Page table d) Segmenting 4. Possible security risks. A page that cannot be replaced until the job has been completed is a a) Demand page b) Locked page c) Priority page d) Virtual page 2. Campbell Copyright @ 2010 Updated Jan 2010 83 .• Programs running on low-cost. How does pure paging differ from demand paging? 2. Research methods used by operating systems to reduce thrashing. The problem of the page fault rate increasing as the number of pages increase is called Operating System Concepts Mrs. low-power embedded systems may not have a memory management unit that supports page replacement.

Paging The following refers to questions 8 & 9. A. What is a page fault? a) There is something wrong with the page b) The page size needs to be increased c) The required page is not currently in memory d) The page has encountered fragmentation 6.a) b) c) d) Newton’s Law Virtual Storage Belady’s Anomaly Starvation 5. _____________ indicates that the operating system spends much of its time paging instead of executing application software. G. 23 D. 4 000 bytes B. 3 670 bytes D. Frame allocation D. Buffering C. When the page fault increases as the number of allocated frames increases is known as: A. Thrashing B. If a page size is 4KB and a process is 97856 bytes. 25 9. How much space would be wasted if a file of size 36 KB were to be saved? a) 0KB b) 4KB c) 28KB d) 288KB 7. 40 B. 3 648 bytes 10. Page allocation Operating System Concepts Mrs. How much is the internal fragmentation? A. Belady’s anomaly C. Spooling D. Campbell Copyright @ 2010 Updated Jan 2010 84 . How many pages does it need? A. 26 C. Paging B. Given a paging scheme in which pages are 8KB. 8. 4 096 bytes C.

This virtual memory strategy provides a 2 dimensional addressing system. we access the sth entry in the segment table to get base physical address k and the length l of that segment. A virtual address consists of a segment number and a displacement or an offset within the segment.d). segments can be of arbitrary length to suit the situation. Campbell Copyright @ 2010 Updated Jan 2010 85 .Lecture 19 – Segmentation (1 hour) Some systems do not use paging to implement virtual memory. which are of fixed size. offset) = (s. Instead. A segment table is maintained for each process. The segment table contains the starting physical address of the segment as well as the size of the segment for protection. The physical address is obtained by adding d to k. This method is similar to paging but unlike pages. G. Given a logical address (segment. so that an application's virtual address space is divided into variable-length segments. Example of Segmentation Operating System Concepts Mrs. they use segmentation. The hardware also compares the offset d with the length l to determine if the address is valid. A CPU register holds the starting address of the segment table.

Address Translation in Segmentation Based on the diagrams above: • The Logical address consists of a two items: <segment-number. Why are paging and segmentation sometimes combined into one scheme? 6. We need a segment replacement algorithm (just like a page replacement algorithm). each table entry has: – base – contains the starting physical address where the segments reside in memory. Use a diagram to explain the concept of a segment table. offset>. 4. • Segment-table length register (STLR) indicates number of segments used by a program. • Segment-table base register (STBR) points to the segment table’s location in memory. Segmentation has no internal fragmentation but has external fragmentation if a segment is too large to fit into a slot. Discuss the strategy that allows Jane to do this. Operating System Concepts Mrs. Jane is able to create a program that is larger than her computer’s RAM i. Discuss the ways in which this strategy is implemented. segment-number s is legal if s < STLR. What problems could arise with segment replacement that would not occur with page replacement? 5. 2. Campbell Copyright @ 2010 Updated Jan 2010 86 . G. Describe the use of overlays as a virtual storage strategy. 7. Describe a reasonable segment replacement algorithm. Tutorial Questions 1. 3. • Segment table – maps two-dimensional physical addresses. – limit – specifies the length of the segment. How does segmentation differ from paging? Just as paging can be demand paging. List the names of operating systems that use segmentation. so segmentation can be demand segmentation. ii.

what is the physical address for the logical address 12? a) 0012 b) 5500 c) 5511 d) 5512 Operating System Concepts Mrs. If a paging scheme has pages of 4KB and segmentation scheme has a maximum segment size of 32KB. How does paging differ from segmentation? a) In paging blocks are of a fixed size whereas in segmentation blocks vary in size b) In paging blocks vary in size whereas in segmentation blocks are of a fixed size c) Paging blocks are contained within segmented blocks in memory d) There is no difference between them 2. Campbell Copyright @ 2010 Updated Jan 2010 87 . b) segmentation? Practice MCQs 1.8. Given a segment that starts at memory area 5500. G. How much space is wasted if a 6KB file is saved in a) paging.

another name for main storage. Engineers are always trying to provide additional storage capacity. A block on a disk is the sector. G. What is auxiliary storage? How does it differ from primary storage? 2. so that the location is known. It is treated as a single unit in data transfer.A physical unit of transfer between tape (secondary) and internal (primary) storage. numbered from 0. To improve the performance of a disk. Discuss the different auxiliary storage media. Tutorial Questions 1. Campbell Copyright @ 2010 Updated Jan 2010 88 . The physical address of each block is mapped to a logical address in RAM. memory mapping) Tutorial Questions 1. each one with its own address. Operating System Concepts Mrs. Each location has a 0 or 1. The head therefore did not have to move to a specific track.e. Once data is placed in each box it remains until replaced by more.Lecture 20 . size and speed. One approach was to improve recording density (reflected by the number of tracks per inch and hence the total number of tracks). Use diagrams to show blocks on different types of secondary storage. The essential property of a block device is that it is possible to read or write each block independently of all the other ones. but the data can be read immediately. Disk capacity therefore doubled. RAM is arranged like a series of boxes. 2. Another approach was to have separate heads on each side of the platter. RAM is volatile which means that information is lost if the power is switched off. some disks (called fixed head disks) have a read/write head for each track. Blocks I/O devices can be roughly divided into two categories: block devices and character devices.random access memory . (i.Auxiliary storage management (1 hour) Introduction Disks were originally designed for file storage so the primary design criteria were cost. Explain the terms ‘blocking factor’ and inter-block gap. A block device is one that stores information in fixed size blocks. RAM and Optical disks RAM . Block . The kernel of the operating system gets loaded here when you boot up the machine.

This allows fast access to data that might be needed in the future. Caching – This is the process of reading something into memory. read many) EO (erasable optical) . It holds data that was recently accessed from secondary storage in anticipation of use in the near future. The primary use is to allow a part of memory to be reserved for used like an ordinary disk. Operating System Concepts Mrs. the internet via a phone line is slow compared to disk access. How does a Blu-Ray disc differ from the regular DVD? 4. calculators. Discuss RAM disks.RAM disks A RAM disk is commonly used in data banks. Optical disk These are made up of a thin metal polymer compound. It is small hardware memory . They are used to store both video and audio files. Data is recorded by laser burns and read by another laser of lower intensity detecting the pattern of light reflected from beam by surface of disk. Tutorial Questions 1. if it is needed there is no need to read from the disk again as it is already in memory. Differentiate between magnetic disk and optical disk. Campbell Copyright @ 2010 Updated Jan 2010 89 . DVD-ROM (digital video/versatile disk – read only memory – used to store movies.magnetic molecules in disk surface aligned when heated by a laser beam. Disk caching – This is the process of placing data onto the disk so that possible future access to this data is faster. DVD R+. therefore the web page is downloaded to disk and used from the disk instead of viewing the data over the phone line. G. palm tops. Disk caching Cache – a special area of memory available to the processor.sometimes called associative registers. Cache memory works at the high speed of the processor. Types of optical disks:CD-ROM (compact disc . Subsequent access if they occur will be fast. DVD R-? 3.g. What is the difference between DVD R. Optical disks have more storage capacity than magnetic disks and are less susceptible to damage. How do they differ from other disks? 2.4 1/2" 700MB/80 minutes WORM (write once. but once files have been copied to this area they can be accessed extremely quickly. E.read only memory) . This does not provide permanent storage.

Operating System Concepts Mrs. Describe disk caching. What is a cookie? What is its purpose? 2. Campbell Copyright @ 2010 Updated Jan 2010 90 .Tutorial Questions 1. G.

The read/write head is therefore positioned over the appropriate data in order to access it. is this an input or output operation? 2. Sectors are pie-sliced sections (blocks) that are read all at once.Lecture 21 . cylinder. the head scrapes the recording media off the disk therefore destroying the data. When a process needs I/O to or from disk it issues a system call to the operating system. due to power-cut). Thus the disk itself is cheaper to produce and use. surface. In order to access data from moving-head magnetic disk storage. The request specifies pieces of necessary information:1. amount of information to be transferred Practice MCQs 1. Floppy disks have a hard coated surface so that the read/write head can sit directly on it without destroying the data. sector etc.Moving-head disk storage (2 hours) Operations on moving-head disk storage In Fundamentals of Information Technology.if the read/write head touches the disk surface (e. It is important that the disk be as fast as possible. The coating however will wear after enough use. you learnt about tracks and sectors on magnetic disk. designers did all of the following EXCEPT: a) Properly schedule the use of the disk b) Create fixed head disks c) Double disk capacity d) Eliminate seek time Operating System Concepts Mrs. the read/write head has to move to the appropriate track. To improve the performance of a disk. Head crash . The disk also has to rotate to the appropriate sector. G. Campbell Copyright @ 2010 Updated Jan 2010 91 .) 3. Tracks are concentric circles on which data is stored. The operating system can improve on the average disk service time by scheduling the requests for disk access. the disk address (drive. memory address 4.g.

Is there a relationship between the speed of the disk and the price? Practice MCQs 1. • Transfer time – the time taken for data to move between the disk and main memory. What is the time taken for a disk’s read/write head to move to the appropriate track? a) Seek time b) Transfer time c) Latency time d) Track time Operating System Concepts Mrs.Measures of magnetic disk performance Disk speed composed of 3 parts:• Seek time – the time taken for the read/write head to move to the appropriate track • Latency time – the time taken for the disk to rotate to the desired sector (block). This is also known as rotational latency or rotational delay.The time required for a storage medium such as a disk to be positioned and for read/write heads to be properly located so that the desired data can be read or written. Other definitions • Positioning time . G. This is also known as transfer rate. Research the speeds of various brands of hard disks. Campbell Copyright @ 2010 Updated Jan 2010 92 . Tutorial Questions 1.

This policy aims to minimise response time with little regard for throughput. In other words. No requests are serviced on the reverse direction. the drive sweeps across the surface of the disk. SCAN and C-SCAN The read/write head starts at one end of disk (outermost cylinder) and moves toward the other end (innermost cylinders). Disk scheduling algorithms include:First come first served (FCFS) The disk controller processes the I/O requests in the order in which they arrive. As soon as the disk is available the user job to use the disk next will be selected by a disk scheduling algorithm. It however may cause starvation of some requests. For example.Disk scheduling In multi-programming environment different processes may want to use the system's resources simultaneously. Since no reordering of request takes place the head may move almost randomly across the surface of the disk. Shortest seek time first (SSTF) This is the most common algorithm. The movement across the surface of the disk is still apparently random but the time spent in movement is minimised. sharing the resource between the processes fairly and efficiently. thus moving backwards and forwards across the surface of the disk to get to the next requested location each time. servicing requests as it reaches each track. until it gets to other end of disk. in alternating directions. It services jobs that require data closest to the current head position. a sweep out towards the outer edge of Operating System Concepts Mrs. For example. otherwise the request will be queued. This method is fair but suffers from wild swings from one area of disk to another. The movement time should be less than FCFS but the policy is fairer than SSTF. Campbell Copyright @ 2010 Updated Jan 2010 93 . G. However the drive now makes use of the information it has about the locations requested by the waiting requests. At the other end it reverses direction. If the disk drive is available it will service a user’s request immediately. satisfying requests. when the read/write head reaches the end of the disk it goes immediately to the start of the disk. This policy will have better throughput than FCFS but a request may be delayed for a long period if many closely located requests arrive just after it. The disk drive needs some mechanism to resolve this contention. processes will contend to access an auxiliary storage device such as a disk. LOOK and C-LOOK LOOK is similar to SCAN. Circular Scan or C-SCAN is similar to SCAN but I/O requests are only satisfied when the read/write head is travelling in one direction across the surface of the disk. Each time an I/O request has been completed the disk controller selects the waiting request whose sector location is closest to the current position of the head.

Circular LOOK (C-LOOK) is based on C-SCAN. 22. The drive is currently servicing a request at cylinder 143 and the previous request was at cylinder 125. As in LOOK the drive makes use of the location of waiting requests in order to determine how far to continue a sweep. 73.3. 73. Campbell Copyright @ 2010 Updated Jan 2010 94 . 48. Suppose the read/write head of a moving head disk with 100 tracks numbered 0 to 99 is currently servicing a request at track 62 and has just finished track 70. Which algorithm is known as the elevator algorithm? Why? 6. if that is the most central one for which a sector is currently requested. Suppose a disk drive has 200 cylinders. 80. Sector queuing is an algorithm for fixed-head devices. C-LOOK involves the drive head sweeping across the disk satisfying requests in one direction only. Thus it may curtail a sweep towards the outer edge when there are locations requested in cylinders beyond the current position. Suppose the read/write head of a moving head disk with 10 tracks numbered 0-9 is currently servicing a request at track 9. If the queue of requests is 8. 46. and where to commence the next sweep. which is in great demand. 46 d) 73. 35. 22. Practice MCQs 1. what is the head movement to satisfy the SSTF disk scheduling algorithm? a) 22. 17. 80. 91. If the queue of requests is 80. 80 c) 73. 5.1: what is the head movement to satisfy the SCAN algorithm? 3. Explain two (2) methods that can be used by the operating system to schedule the usage of a hard disk on a server. 60. 80 b) 46. What is the difference between SCAN and C-SCAN? Answer tutorial question # 2 using CSCAN. Tutorial Questions 1. SCAN and SSTF algorithms? 4. and commence its next sweep at a cylinder which is not the innermost one. The queue of pending requests in FIFO order is 86.5. 147. Starting from its current head location what is the disk arm movement to satisfy the requests using FCFS. 73. numbered 0 to 199. 22 Operating System Concepts Mrs. 2. Explain how it works. 46. 46. 22.the disk will be reversed when there are no waiting requests for locations beyond the current cylinder. G.

Lecture 22 – RAID (2 hours)
RAID was first defined in 1987 to describe a redundant array of inexpensive disks. This technology allowed computer users to achieve high levels of storage reliability from low-cost and less reliable PC-class disk-drive components, via the technique of arranging the devices into arrays for redundancy. Marketers representing industry RAID manufacturers later reinvented the term to describe a redundant array of independent disks as a means of dissociating a "low cost" expectation from RAID technology. RAID is now used as an umbrella term for computer data storage schemes that can divide and replicate data among multiple hard disk drives. The different schemes/architectures are named by the word RAID followed by a number, as in RAID 0, RAID 1, etc. RAID's various designs involve two key design goals: increase data reliability and/or increase input/output performance. When multiple physical disks are set up to use RAID technology, they are said to be in a RAID array. This array distributes data across multiple disks, but the array is seen by the computer user and operating system as one single disk. RAID levels The standard RAID levels are a basic set of RAID configurations and employ striping, mirroring, or parity. A RAID 0 (also known as a stripe set or striped volume) splits data evenly across two or more disks (striped) with no parity information for redundancy. RAID 0 was not one of the original RAID levels and provides no data redundancy. RAID 0 is normally used to increase performance, although it can also be used as a way to create a small number of large virtual disks out of a large number of small physical ones. A RAID 0 can be created with disks of differing sizes, but the storage space added to the array by each disk is limited to the size of the smallest disk. For example, if a 120 GB disk is striped together with a 100 GB disk, the size of the array will be 200 GB. A RAID 1 creates an exact copy (or mirror) of a set of data on two or more disks. This is useful when read performance or reliability are more important than data storage capacity. Such an array can only be as big as the smallest member disk. A classic RAID 1 mirrored pair contains two disks (see diagram), which increases reliability geometrically over a single disk. Since each member contains a complete copy of the data, and can be addressed independently, ordinary wear-and-tear reliability is raised by the power of the number of self-contained copies.

Operating System Concepts Mrs. G. Campbell Copyright @ 2010

Updated Jan 2010

95

A RAID 2 stripes data at the bit (rather than block) level, and uses a Hamming code for error correction. The disks are synchronized by the controller to spin in unison. Extremely high data transfer rates are possible. This is the only original level of RAID that is not currently used. The use of the Hamming(7,4) code (four data bits plus three parity bits) also permits using 7 disks in RAID 2, with 4 being used for data storage and 3 being used for error correction. RAID 2 is the only standard RAID level, other than some implementations of RAID 6, which can automatically recover accurate data from single-bit corruption in data. Other RAID levels can detect single-bit corruption in data, or can sometimes reconstruct missing data, but cannot reliably resolve contradictions between parity bits and data bits without human intervention. (Multiple-bit corruption is possible though extremely rare. RAID 2 can detect but not repair double-bit corruption.) All hard disks soon after implemented an error correction code that also used Hamming code, so RAID 2's error correction was now redundant and added unnecessary complexity. Like RAID 3, this level quickly became useless and it is now obsolete. There are no commercial applications of RAID 2. A RAID 3 uses byte-level striping with a dedicated parity disk. RAID 3 is very rare in practice. One of the side effects of RAID 3 is that it generally cannot service multiple requests simultaneously. This comes about because any single block of data will, by definition, be spread across all members of the set and will reside in the same location. So, any I/O operation requires activity on every disk and usually requires synchronized spindles. In the example shown, a request for block "A" consisting of bytes A1-A6 would require all three data disks to seek to the beginning (A1) and reply with their contents. A simultaneous request for block B would have to wait. However, the performance characteristic of RAID 3 is very consistent, unlike higher RAID levels, the size of a stripe is less than the size of a sector or OS block so that, for both reading and writing, the entire stripe is accessed every time. The performance of the array is therefore identical to the performance of one disk in the array except for the transfer rate, which is multiplied by the number of data drives (i.e., less parity drives).

Operating System Concepts Mrs. G. Campbell Copyright @ 2010

Updated Jan 2010

96

This makes it best for applications that demand the highest transfer rates in long sequential reads and writes, for example uncompressed video editing. Applications that make small reads and writes from random places over the disk will get the worst performance out of this level. The requirement that all disks spin synchronously (in lockstep), added design considerations to a level that did not give significant advantages over other RAID levels, so it quickly became useless and is now obsolete. Both RAID 3 and RAID 4 were quickly replaced by RAID 5. However, this level has commercial vendors making implementations of it. It's usually implemented in hardware, and the performance issues are addressed by using large disk caches. A RAID 4 uses block-level striping with a dedicated parity disk. This allows each member of the set to act independently when only a single block is requested. If the disk controller allows it, a RAID 4 set can service multiple read requests simultaneously. RAID 4 looks similar to RAID 5 except that it does not use distributed parity, and similar to RAID 3 except that it stripes at the block level, rather than the byte level. Generally, RAID 4 is implemented with hardware support for parity calculations, and a minimum of 3 disks is required for a complete RAID 4 configuration. In the example, a read request for block A1 would be serviced by disk 0. A simultaneous read request for block B1 would have to wait, but a read request for B2 could be serviced concurrently by disk 1. Unfortunately for writing the parity disk becomes a bottleneck, as simultaneous writes to A1 and B2 would in addition to the writes to their respective drives also both need to write to the parity drive. In this way RAID example 4 places a very high load on the parity drive in an array. The performance of RAID 4 in this configuration can be very poor, but unlike RAID 3 it does not need synchronized spindles. However, if RAID 4 is implemented on synchronized drives and the size of a stripe is reduced below the OS block size a RAID 4 array then has the same performance pattern as a RAID 3 array. Both RAID 3 and RAID 4 were quickly replaced by RAID 5. A RAID 5 uses block-level striping with parity data distributed across all member disks. RAID 5 is popular because of its low cost of redundancy. This can be seen by comparing the number of drives needed to achieve a given capacity. RAID 1 or RAID 1+0, which yield redundancy, give only s / 2 storage capacity, where s is the sum of the capacities of n drives used. In RAID 5, the yield is
Operating System Concepts Mrs. G. Campbell Copyright @ 2010 Updated Jan 2010

97

while mdadm supports a fully-functional (non-degraded) RAID 5 setup with two disks . but it does have a performance penalty on write operations because of the overhead associated with parity calculations. A simultaneous read request for block B1 would have to wait. G.which function as a slow RAID-1. Although RAID 5 is commonly implemented in a disk controller. Discuss the term RAID. 4. A minimum of three disks is required for a complete RAID 5 configuration. Tutorial Questions 1. but can be expanded with further volumes. a read request for block A1 would be serviced by disk 0.. 2. Describe the non-standard RAID levels. Campbell Copyright @ 2010 Updated Jan 2010 98 . RAID 6 does not have a performance penalty for read operations. Describe the failure rate and performance of each RAID level. Describe the standard RAID levels. As an example. firmware or by using firmware and specialized. Operating System Concepts Mrs. but a read request for B2 could be serviced concurrently by disk 1. using Windows Dynamic Disks or with mdadm in Linux. some with hardware support for parity calculations (hardware RAID cards) and some using the main system processor (motherboard based RAID controllers). four 1TB drives can be made into a 2-TB redundant array under RAID 1 or RAID 1+0. 3.where Smin is the size of the smallest disk in the array.g. In some implementations a degraded RAID 5 disk set can be made (three disk set of which only two are online). In the example. it can also be done at the operating system level. but the same four drives can be used to build a 3-TB array under RAID 5. Performance varies greatly depending on how RAID 6 is implemented in the manufacturer's storage architecture – in software. e.

then each incremental backup in the same sequence. regardless of whether or not the files have changed since the last backup Grandfather.save to CD 1 (Grandfather) • Day 2 . father. Differential – backup that copies only the files that have changed since the last full backup Selective – backup that allows a user to choose specific files to back up.cool. Incremental – backup that copies only the files that have changed since the last full or last incremental backup. Disadvantage . then changes since (incremental backup). Each time that you backup you reuse the oldest backup medium. If your computer fails you can restore from the backup. Campbell Copyright @ 2010 Updated Jan 2010 99 . G. • • Full – backup that copies all of the files in a computer (also called archival backup).Lecture 23 – Backup and recovery methods (1 hour) Backup is the key – the ultimate safeguard Regardless of the precautions that you take. A backup is a duplicate of a file. the son becomes the father and the new backup becomes the son. In order to recover you restore all files. Father. then the entire backup is useless.save to CD 3 (Son) • Day 4 . This method allows you to have the last 3 backups at all times. The following describes the different types of backup. or destroyed. things can still go wrong. Operating System Concepts Mrs. Restore newest/last tape/disk Backup of changes to audit files. The oldest backup is called the grandfather. Restore changes from audit. The father then becomes the grandfather.save to CD 1 etc.save to CD 2 (Father) • Daye 3 . clean location • Do not put disks in the sun • Do not put magnetic backup media near magnets • Restore data every now and again to ensure disk/tape still good and backup will be available in emergency.if one change is messed up.restore the main backup first. • • • • Grand father. To restore . Backup all files (main backup). son technique for magnetic tape • Keep 3 tapes/CDs/DVDs etc • You will always have the last 3 days backups • Day 1 . damaged. Backup is therefore the main risk management solution. dry. Son (or Three-generation backup) – backup method in which you recycle 3 sets of backups. or disk that can be used if the original is lost. the middle backup is the father and the latest backup is called the son. It is laborious to restore at a point in time. Backup Tips • Always Label backups with a felt tip pen • Store disk/tape in proper place .

how often do you back up? If not. Do you backup? If yes. John would like to create a CD with all of his lecture notes for the semester. How would you recover using a generation backup? a) Use the oldest backup b) Use the latest backup c) Use the last full backup and the oldest backup d) Use the last full backup and the latest backup 5. 2. Did you have to type everything over)? 5. Campbell Copyright @ 2010 Updated Jan 2010 100 .• Keep a backup offsite in case something happens to the current location such as a fire. 4. How would you recover from an incremental backup? a) Use the last full backup first.g. Describe how to restore based on the different backup methods. Which backup method should John use? a) Differential b) Generation c) Incremental d) Selective 4. Practice MCQs 1. Tutorial Questions 1. why did you have to? Have you ever lost valuable data because you did not have a backup? Describe the situation. 3. why not? What type of backup do you perform? What backup medium do you use? Have you ever had to restore a backup? If yes. G. Discuss the time limit for thumb drives. 6. Which backup method copies only the files that have changed since the last full backup? a) Differential b) Generation c) Incremental d) Selective 3. How did you solve the problem (e. then each incremental backup in sequence b) Use the last full backup first then the last incremental backup c) Use the last generation backup then the previous backup d) Use the last incremental backup Operating System Concepts Mrs. A backup procedure that saves only files that have changed is a) Main backup b) Preferential backup c) Differential backup d) Incremental backup 2.

In this scheme. mail server. Detail the specifications of a server that would be required by the college in order to adequately service the students using the labs. database server. A file server is a high-performance computer attached to a network that has the primary purpose of providing a location for the shared storage of computer files that can be accessed by the workstations that are attached to the computer network. Differentiate between the peer-to-peer and the client-server architecture? 2. 3. but requests a server's content or service function.) 4. G. The term server highlights the role of the machine in the client-server scheme. All shared files reside at this single centralized site. It runs one or more server programs which share its resources with clients. The main problem with this scheme is that the file server may become a bottleneck.File server systems (1 hour) Client-server computing or networking is a distributed application architecture that partitions tasks or workloads between service providers (servers) and service requesters. Often clients and servers operate over a computer network on separate hardware. and does not run any programs on behalf of the clients. Every access to a remote file may require a considerable amount of message transfer overhead. who access remote files in the same way as local files. The files can be downloaded or manipulated in some manner by a client. the open request is channelled to the file server. Discuss the other types of servers (e. Discuss the concept of a file server. It is designed primarily to enable the rapid storage and retrieval of data where the heavy computation is provided by the workstations. If a user opens a non-local file. Tutorial Questions 1. the location of a file is transparent to users.g. A file server is usually not performing any calculations. Clients therefore initiate communication sessions with servers which await (listen to) incoming requests. The operating system automatically converts accesses to shared (non-local) files into messages to the file server.Lecture 24 . called clients. Operating System Concepts Mrs. A client does not share any of its resources. Campbell Copyright @ 2010 Updated Jan 2010 101 . where the clients are the workstations using the storage. print server etc.

read. • This is a convenient way to share data. Campbell Copyright @ 2010 Updated Jan 2010 102 . G. There are two major issues that dominate the design criteria in a distributed file system:o Transparency . • Separates the naming hierarchy from the storage devices hierarchy.Distributed file systems (1 hour) A Distributed File System (DFS ) is simply a classical model of a file system distributed across multiple machines. is hidden. When data are requested. on files. Naming is the mapping between logical and physical objects. • Better file abstraction. the data does not all have to reside in one place as in a centralized system. A local file can be accessed by a user residing on any site in the system. A file system provides a service for clients. • In a transparent DFS. • In a conventional file system. • Promotes sharing the storage space itself. The resources on a particular machine are local to itself. Location independence • The name of a file does not need to be changed when the file's physical storage location changes. it's understood where the file actually resides. The server interface is the normal set of file operations: create. somewhere in the network. set of physical disk blocks. the system and disk are known. Resources on other machines are remote. although hidden.Lecture 25 . Location transparency • The name of a file does not reveal any hint of the file's physical storage location. the location of a file. • File name still denotes a specific. mapping returns a SET of locations for the replicas. • Example: A user filename maps to <cylinder. sector>. Operating System Concepts Mrs.Where do files reside in the system? Each site maintains its own local file system. A distributed file system (DFS) consists of software that keeps track of files stored across multiple servers or networks. You may also split the files by rows/columns on different servers. regardless of where they reside? o Locality .Does a user access all of the files in a system in the same manner. The purpose is to promote sharing of dispersed files. a DFS converts the file names into the physical location of the files so they can be accessed. Dynamic. The file location may or may not be transparent to the user. the data can exist on various file servers on the network. • Can expose correspondence between component units and machines. one-to-many mapping. • File replication means multiple copies of a file. etc. In a networked environment users want to share data files.

2. Campbell Copyright @ 2010 Updated Jan 2010 103 . G.) • Files are permanently associated with specific disk blocks. Tutorial Questions 1. Distinguish between a centralized versus a distributed system.Most DFSs today: • Support location transparent systems. Research and give examples of various DFSs. reveals the file’s physical storage location B. does not reveal the file’s physical storage location D. reveals the file’s logical storage location Operating System Concepts Mrs. includes the file’s logical storage location C. Discuss the advantages and disadvantages of a distributed file system. (automatic movement of a file from machine to machine. Practice MCQs 1. • Do NOT support migration. In the naming structure of a file if location transparency is used what happens? File name: A. 3.

and keyboard operations. the time taken to perform an entire job will be largely constrained by the CPU. so that customers who do not need the extra performance need not pay for it. -3 = characteristic or exponent. 2.001375 = 1. E. execute program flow control instructions. resulting in far greater speeds for the computer as a whole. What is the co-processor used to do in this particular computer. display . manage memory etc. At any point in time two or more processors within the system unit may be performing work simultaneously. where they added additional "optional" functionality such as floating point math support. E.Lecture 26 . Coprocessors were first seen on mainframe computers. Operating System Concepts Mrs. do input/output operations. Campbell Copyright @ 2010 Updated Jan 2010 104 . Disadvantages • Some co-processors cannot fetch instructions from memory. These processors require the host main processor to fetch the coprocessor instructions and handle all other operations aside from the coprocessor functions • Co-processors carry out only a limited range of functions Tutorial Questions 1.375 x 101 (1. G.screen graphics.75 = 1. coprocessors can accelerate system performance.375 x 10-3 (1. Many Micro-computers today have slave processors that handle tasks such as high speed mathematical computation. • By offloading processor-intensive tasks from the main processor. A more common use was to control input/output channels.Co-processors (1/4 hour) A single CPU works in conjunction with specialized “slave” processors that perform dedicated chores/tasks. Math Co-processors This is a separate processor that handles floating point (real numbers). 10 = base/radix. Describe the different types of co-processors in use in modern computers.g. However.375E -3) . 13.375E +1) .g. • Co-processors allow a line of computers to be customized. Advantages • The co-processor is often designed to do certain tasks more efficiently than the main processor. The decimal point is moved/floated along the digits to a position in between first or second non-zero most significant digit. Identify a computer that uses a co-processor. A co-processor is therefore a microprocessor that performs specialized functions that the central processing unit cannot perform or cannot perform as well and as quickly.375 = mantissa/argument.

3. Explain the concepts: ‘pipelining’. What is a co-processor? a) A processor that works for another processor b) A processor that is in charge of another processor c) A processor that works alongside another processor d) The main processor in a micro-computer Operating System Concepts Mrs. Practice MCQs 1. G. ‘superscalar’. Discuss the advantages and disadvantages of co-processors. ‘dual-core’. 4. Campbell Copyright @ 2010 Updated Jan 2010 105 .

The machine language typically has between 50 and 300 instructions mostly for moving data around the machine. They take many clock cycles to complete one instruction. Two basic computer design philosophies predominant in the market today are the complex instruction set and the reduced instruction set.g. A RISC program is therefore longer than the equivalent CISC and takes up more storage space. is usually located in ROM (read only memory). Operating System Concepts Mrs. RISC (Reduced instruction set computing) A RISC processor is a type of microprocessor that recognizes a relatively limited number of instructions. In other words. doing arithmetic. it lists the things that the processor can do. addressing modes. Multiplication is the equivalent of a repeated addition. There is still considerable controversy among experts about the ultimate value of RISC architectures. Until the mid-1980s. This software. E. IBM RS 6000 and those based on the MIPS chip or using SUN SPARC architecture.reduced instruction set computer. These have fewer instructions in their instruction set. In removing the complexity in the way that the processor is designed some instructions are removed. It is actually an interpreter.Lecture 27 . Some computers. Introduction to RISC and CISC CISC . E. RISC makes the processor simple (non complex) so that they can execute more instructions in the same amount of time. (More instructions per clock cycle). and the number of clock cycles needed to execute an instruction. however. This is the normal type of computer.g. These designs also differ in their instruction lengths. fetching the machine language instructions such as ADD. the tendency among computer manufacturers was to build increasingly complex CPUs that had larger sets of instructions.RISC/CISC (3/4 hour) What is an Instruction set? An instruction set is the set of available instructions that the computer can understand and perform. RISC . and comparing values. do not have a microprogramming level. Some machines have a layer of primitive software that directly controls the hardware and provides an interface between the hardware and operating system. a number of computer manufacturers decided to reverse this trend by building CPUs capable of executing only a very limited set of instructions. It is often assumes that these designs differ based on the size of the instruction sets. the hardware executes the machine language instructions directly. number of registers. Campbell Copyright @ 2010 Updated Jan 2010 106 .complex instruction set computer. however the differences extend further. G. JUMP and carrying them out as a series of little steps. MOVE. At that time. called the micro-program (or firmware). On these machines. RISC.

In the mid 1970s. high-speed caches. and was later used in the IBM RISC System/6000 and Sun Microsystems SPARC microprocessors. If the processor guessed correctly. By reducing the number of transistors and instructions to only those most frequently used. Reduced instruction set machines. A processor based upon this concept would use few instructions. the results are discarded and there is no loss. the computer would get more done in a shorter amount of time.P. RISC microprocessors also emphasize floating-point performance making them popular with the scientific community whose applications do more floating-point math. developments in technology made RISC attractive to computer designers. a PowerPC has 32 registers. Some of these developments were great increases in memory size with corresponding decreases in cost. RISC architecture makes use of a small set of simplified instructions in attempt to improve performance. it does not wait to see if the condition has been met. most RISC microprocessors have floating-point units (FPUs) built in. Advantages of RISC • 1 They can execute their instructions very fast because the instructions are so simple. It "guesses" whether or not the condition will be met. Only load and store instructions access memory . unlike complex instruction set machine. The latter CPU led to the founding of MIPS Technologies. a reduced instruction set computer stores its instruction in 32 bits. Many of the MIPS architects also played an important role in the creation of the Motorola 68000.I. If the processor has guessed incorrectly. For this reason. there are only a few addressing modes in a reduced instruction set computer and there are a large number of general-purpose registers. and better pipelining. The RISC concept was used to simplify the design of the IBM PC/XT. and make them cheaper to manufacture. G. Pipelining allows the next instruction to enter the execution cycle while the previous instruction is still processing. If the processor has fetched a branch instruction. use same length instructions so that the instructions are aligned on word boundaries and may be fetched in a single operation. Another way in which reduced instruction set computers sought to improve performance was to have most instructions complete execution in one machine cycle. His argument was based upon the notion that a computer uses only 20% of the instructions. Campbell Copyright @ 2010 107 . and begins execution of the corresponding code. which would require fewer transistors1. Since almost all instructions make use of register addressing. Typically. Due to these developments. IBM designed the first reduced instruction set computer. These instructions consist mostly of register-to-register operations . RISC microprocessor (Microprocessor without Interlocked Pipe Stages). who developed the M. Another technique utilized by reduced instruction set machines is pre-fetching coupled with speculative execution . it has gained time. making the other 80% superfluous to requirement. For example. advanced compilers. Pipelining was a key technique in achieving this. Updated Jan 2010 Operating System Concepts Mrs. The transistor is a solid-state electronic device used primarily for switching and amplification.S. The concept was developed by John Cocke of IBM Research during 1974.

The Macintosh market has been damaged by several problems that have affected the availability of 500MHz+ PowerPC chips. Although Apple's Power Macintosh line featured RISC-based chips and Windows NT was RISC compatible. Despite the advantages of RISC based processing.1 and Windows 95 were designed with CISC processors in mind. so that the RISC use of RAM and emphasis on software has become ideal. Although RISC chips might surpass Intel's efforts in specific areas. Windows 3. This is primarily due to advancements in other areas of computer technology. the Intel x86 is arguable the only chip which retains CISC architecture. it cannot compete with a CISC CPU that boasts twice the number of clock cycles. In 1977. 1MB of DRAM cost about $5. the same amount of memory cost only $6 (when adjusted for inflation). Campbell Copyright @ 2010 108 . The price of RAM has decreased dramatically. Disadvantages of RISC • • • • • • • • • Skeptics note that by making the hardware simpler. the argument is becoming moot because CISC and RISC implementations are becoming more and more alike.000. Many of today's RISC chips support as many instructions as yesterday's CISC chips. RISC developers have also failed to remain in competition with CISC alternatives. And today's CISC chips use many techniques formerly associated with RISC chips. In contrast. Compiler technology has also become more sophisticated. Another major setback was the presence of Intel. They argue that this is not worth the trouble because conventional microprocessors are becoming increasingly fast and cheap anyway. RISC supporters argue that it the way of the future. RISC architectures put a greater burden on the software. By 1994. which makes them cheaper to design and produce. Intel had the resources to plow through development and produce powerful processors. G. This will increase the size of the application and the amount of overhead required. producing faster and cheaper processors . RISC chips took over a decade to gain a foothold in the commercial world. Programmer must pay close attention to instruction scheduling so that the processor does not spend a large amount of time waiting for an instruction to execute Debugging can be difficult due to the instruction scheduling Require very fast memory systems to feed them instructions RISC chips require more lines of code to produce the same results and are increasingly complex. the differences were not great enough to persuade buyers to change technologies. Without commercial interest.an Apple Mac G3 offers a significant performance advantage over its Intel equivalent. processor developers were unable to manufacture RISC chips in large enough volumes to make their price competitive.• • RISC chips are simpler as they require fewer transistors. Although their CISC chips were becoming increasingly unwieldy and difficult to develop. To some extent. Despite the speed advantages of the RISC processor. Instructions are executed over 4x faster providing a significant performance boost! Today. This was largely due to a lack of software support. Many companies were unwilling to take a chance with the emerging RISC technology. the PC compatible market has stormed ahead and has broken the 1GHz barrier. Updated Jan 2010 Operating System Concepts Mrs.

Since the unbundling of ARM from Acorn. Ultra1. Their ARM and StrongARM chips power the old Acorn Archimedes and the Apple Newton handwriting recognition systems. a RISC technology developed by Sun Microsystems. The first computers based on the PowerPC architecture were the Power Macs. becoming the first RISC microprocessor. G. Ultra2 and SPARCcluster. In the SPARC. Apple Computer. and OS/2. Intel has invested a considerable amount of money in the company and have utilized the technology in their processor Operating System Concepts Mrs. based on the PowerPC RISC microprocessor. SPARC Short for Scalable Processor Architecture. Sun's workstations based on the SPARC include the SPARCstation. Apple introduced the Power Mac. Performance Optimization With Enhanced RISC. all instructions are 32-bits in length. have built PCs based on the PowerPC. The name is derived from IBM's name for the architecture. It also takes advantage of pipelining to approach the goal of one instruction per clock cycle. ARM One of the most well known RISC developers is Cambridge based Advanced Research Machines (originally Acorn Research Machines). including IBM. an independent organization that licenses the term to Sun for its use.Examples of RISC Processors Power Mac In 1994. It contains many general-purpose registers (32 in all) and a floating-point unit.5 and higher). John Cocke created the 801 prototype microprocessor (1975). SPARCserver. The term SPARC® itself is a trademark of SPARC International. Arithmetic operations are performed only on values in the registers. It was never marketed but plays a pivotal role in computer history. other manufacturers. MIPS Another computer classified as having a reduced instruction set. Alpha Processor A powerful RISC processor developed by Digital Equipment Corporation and used in their line of workstations and servers. A Power PC chip is A RISC -based computer architecture developed jointly by IBM. Windows NT. 801 To prove that his RISC concept was sound. . including the Macintosh operating system (System 7. Campbell Copyright @ 2010 Updated Jan 2010 109 . RISC 1 and 2 The first "proper" RISC chips were created at Berkeley University in 1985. and Motorola Corporation. Another RISC feature of the SPARC is that only load and store instructions are allowed to access memory. There are already a number of different operating systems that run on PowerPC-based computers. which appeared in 1994. Since then. Pre-fetching and speculative execution are other methods the PowerPC uses to speed execution of instructions.

In a microprogrammed2 system. Designers combined sequences of instructions into single instructions. easier implementation of new chips.it costs less than £10. although they do require special decoding circuits that count bytes within words and frame the instructions 2 Firmware Updated Jan 2010 Operating System Concepts Mrs. Most personal computers. Complex instructions came about in order to maximize the performance of early computers.design. Due to the high cost of memory and storage CISC microprocessors were considered superior due to the requirements for small. the ROM contains a group of microcode instructions that correspond with each machine-language instruction. The Amiga. although these instructions did require multiple clocks cycles to execute. Another characteristic of complex instructions set is their variable-length instruction format. and pre-1994 Macintosh systems also use a CISC microprocessor. In contrast to RISC. since instructions could be retrieved up to ten times faster from ROM than from main memory. and a micro-programmed design can be easily modified to handle new instruct ions sets. When a machine-language instruction arrives at the processor. CISC (Complex Instruction Set Computer) is a retroactive definition that was introduced to distinguish the design from RISC microprocessors. Campbell Copyright @ 2010 110 . Pronounced sisk. computers executed instructions sequentially. conventional computers have been referred to as CISCs (complex instruction set computers). which supports fewer instructions. Atari. microcode acts as a transition layer between the instructions and the electronics of the computer. However. they would possibly have used the chip to power the low-end Amigas. used by many workstations and also some personal computers. In a nutshell. One of the main advantages for the ARM is the price. At that time. and stands for complex instruction set computer. CISCbased systems still cover the vast majority of the consumer desktop market. CISC Since the emergence of RISC computers. An alternative architecture. This reduced the amount of time spent retrieving instructions from memory. The argument for its continued use indicates that the chip designers should make life easier for the programmer by reducing the amount of instructions required to program the CPU. In an age of dwindling memory hard disk prices. G. use a CISC architecture. fast code. CISC philosophy used microcode to simplify the computer's architecture. The majority of these systems are based upon the x86 architecture or a variant. Variable-length instructions were used to limit the amount of wasted space. This also improved performance. Other advantages of using microcode included fewer transistors. If Samsung had bought the Amiga in 1994. in which the CPU supports as many as two hundred instructions. is RISC (reduced instruction set computer). it executes the corresponding series of microcode instructions. The first instruction had to complete the execution cycle before the next instruction could begin. CISC chips have a large amount of different and complex instruction. code size has become a non-issue.

an example of a complex instruction set computer.000 versions of integer add in the VAX. This is caused by one factor that the RISC manufacturers have no influence over . However. there are more than 30. to/from an address pointed to by a register. no need to hardwire a control unit Upwardly compatible because a new computer would contain a superset of the instructions of the earlier computers Fewer instructions could be used to implement a given task. Another characteristic of the CISC design philosophy is the small number of general-purpose registers. Approximately 20% of the available instructions are used in a typical program As discussed above. binary and arithmetic operations have two or three operands3. to/from a specific location in memory. Due to the large number of addressing modes. has the following modes: to/from a register. Advantages of CISC Less expensive due to the use of microcode. Campbell Copyright @ 2010 111 . This is a result of having instructions. the average Macintosh is more expensive than the Intel PC. A large number of addressing modes also characterizes complex instruction set computers.market factors. to/from an address offset from a base address in a register. since earlier generations of a processor family were contained as a subset in every new version Different instructions take different amount of time to execute due to their variablelength Many instructions are not used frequently. In particular. G. The VAX. the Intel market has become the definition of personal computing. allowing for more efficient use of memory Simplified compiler. typically about 8 registers. because the micro-program instruction sets could be written to match the constructs of high-level languages More instructions can fit into the cache. to/from an address pointed to by a memory location.according to their byte length. while string operations have three or five operands. In the VAX. CISC microprocessors are more expensive to make than their RISC cousins. Variables Updated Jan 2010 Operating System Concepts Mrs. etc. which can operate directly on memory. creating a demand from people who have not • • • • • • • • • 3 Parameters. since the instructions are not a fixed size Disadvantages of CISC Instruction sets and chip hardware became more complex with each generation of computers. to/from an address offset from a base address in memory.

used a computer previous. The x86 market has been opened by the development of several competing processors, from the likes of AMD, Cyrix, and Intel. This has continually reduced the price of a CPU of many months. In contrast, the PowerPC Macintosh market is dictated by Apple. This reduces the cost of x86 based microprocessors, while the PowerPC market remains stagnant. Examples of CISC Processors/Chips VAX The VAX is one example of a CISC. It has a large number of addressing modes. Another CISC characteristic it exhibits is variable-length instructions. Binary and arithmetic operations require 2 or 3 operands, but string operations need 3 or 5 operands . Motorola 68000 Another computer family that is classified as a complex instruction set computer is the Motorola 68000 family. It contains few general-purpose registers: 8 data registers and 8 address registers. It also uses variable-length instructions. Each inst ruction in one of these computers requires 0, 1, or 2 operands. IBM370 and Intel line Other typical complex instruction set computers include the IBM 370 and Intel's 80x86 line of computers.

CRISC Complex instruction set computers (CISC) and reduced instruction set computers (RISC) have been combined to form a hybrid known as a Complex/Reduced instruction set Computer (CRISC). Today, the distinction between RISC and CISC is becoming rather fuzzy. The first hints of RISC technology began to appear in Intel's 80x86 processor in 1989, when the 486 had a FPU4, more hard-wired instruction logic, and pipelining. Other manufacturers have followed suit such as Cyrix. Cyrix's M1 also takes advantage of pipelining to increase instruction execution. The M1 has the same micro-architecture as the Intel 80x86 family of complex instruction set machines.. Another RISC characteristic the M1 has borrowed is a large number of general-purpose registers. The M1 has 32 general-purpose registers by using a technique called dynamic register naming, which makes it appear as if there are only 8 registers in use at a time. This preserves compatibility with existing software that expects to see only 8 registers. The Pentium is another CISC/RISC hybrid. It uses variable-length instructions and few generalpurpose registers as a complex instruction set computer would, but it adopts RISC-like features, pipelining and a floating-point unit. In the aftermath of the CISC-RISC conflict, a new enemy has appeared to threaten the peace. EPIC (Explicitly Parallel Instruction Computing) was developed by Intel for the server market, thought it will undoubtedly appear in desktops over the next few years. The first EPIC processor

4

Floating Point Unit
Updated Jan 2010

Operating System Concepts Mrs. G. Campbell Copyright @ 2010

112

will be the 64-bit Merced. The market may be divided between combined CISC-RISC systems in the low-end and EPIC in the high-end. Summary/Conclusion Complex instruction set computers and reduced instruction set computers differ greatly. CISC has a large, complex instruction set, variable-length instructions, a large number of addressing modes, and a small number of general-purpose registers. On the other hand, RISC has a reduced instruction set, fixed-length instructions, few addressing modes, and many general-purpose registers. Today, designers are producing a hybrid of the two design philosophies known as a complex/reduced instruction set computer. These computers combine characteristics such as variable-length instructions, few general-purpose registers, pipelining, and floating-point units. As the world goes through the 21st century the CISC Vs. RISC arguments have been swept aside by the recognition that neither terms are accurate in their description. The definition of 'Reduced' and 'Complex' instructions has begun to blur, RISC chips have increased in their complexity (compare the PPC 601 to the G4 as an example) and CISC chips have become more efficient. The result are processors that are defined as RISC or CISC only by their ancestry. The PowerPC 601, for example, supports more instructions than the Pentium. Yet the Pentium is a CISC chip, while the 601 is considered to be RISC. CISC chips have also gained techniques associated with RISC processors. Intel describe the Pentium II as a CRISC processor, while AMD use a RISC architecture but remain compatible with the dominant x86 CISC processors. Thus it is no longer important which camp the processor comes from, the emphasis has onceagain been placed upon the operating system and the speed that it can execute instructions. The CISC approach attempts to minimize the number of instructions per program, sacrificing the number of cycles per instruction. RISC does the opposite, reducing the cycles per instruction at the cost of the number of instructions per program. Tutorial Questions 1. Write an algorithm to do multiplication of 2 numbers by doing a repeated addition. 2. Use a table to compare RISC to CISC. 3. Identify the different brands of RISC and CISC computers. Practice MCQs 1. The computer that executes more instructions in a clock cycle is a) FCFS b) RISC c) SCAN d) CISC 2. Which of the following is a feature of a RISC processor? a) Instructions consist mostly of register-to-register operations
Operating System Concepts Mrs. G. Campbell Copyright @ 2010 Updated Jan 2010

113

b) There is microcode that acts as a transition layer between the instructions and the computer c) Instructions have a variable-length format d) Instructions require multiple clocks cycles to execute 3. Which of the following is a feature of a CISC processor? a) Fewer transistors and cheaper to manufacture b) Most instructions complete execution in one machine cycle c) Designers have combined sequences of instructions into single instructions d) More problems for the programmer and longer programs 4. What is the reason for a processor chip having variable length instructions? a) To allow them to be fetched in a single operation b) To limit the amount of wasted space c) To reduce the need for micro-code d) To reduce the number of instructions

Operating System Concepts Mrs. G. Campbell Copyright @ 2010

Updated Jan 2010

114

Loss of data. hard disk crash. or blackmail based on information gained from computerized files (e. vandalism. flood. Campbell Copyright @ 2010 115 . Identity theft. or processing capability. Physical damage to computer. delete a file by accident. data. Loss of computer. Loss of data. less data integrity (incorrect data) therefore incorrect information will be retrieved. medical information. Forms of security violation The following table indicates the different security risks and their effects. Loss of income due to software piracy. Damage to computer due to improper use..g. Most security measures involve data encryption and passwords. software. Employees do things to deliberately modify the data.g. low voltage. power surges.g.g. not adequately trained/experienced (e. insects Unauthorized use and access – hacker/cracker gets access illegally. Also leads to theft of intellectual property. civil disorder Competing entity could use data against your company. Huge repair bill. or sexual preference). This can lead to things like software piracy. A security risk is any event or action that could cause a loss of or damage to computer hardware. hurricane. personal history. booting file missing/corrupted Virus – program that causes damage to files or computer. Purpose of security The purpose of security is to either prevent a security risk from happening or to reduce its effects. Theft. loss of time. Loss of sales due to piracy. adding data twice. young child) Technical error – system failure e. fire. or marketing plans). Loss of files/data. Loss of time. entering incorrect data. Updated Jan 2010 Operating System Concepts Mrs. pricing data. Disasters (Natural or otherwise) – earthquake. loss of time in having to re-enter data.Lecture 28 – Security (1 hour) Definition of security Computer security refers to techniques for ensuring that data stored in a computer cannot be read or compromised by any individuals without authorization. information. May need to re-install software.. customer lists. Illegal access to files. Category Human error – e. Loss of computer and data. lightening.g. Effect Loss of data. theft of marketing information (e. G.

A computer virus shares some of these traits. a virus has no way to do anything or to reproduce by itself -. A computer virus must piggyback on some other program or document in order to get executed. such as causing a program to operate incorrectly or corrupting a computer's memory. Viruses are the colds and flues of computer security: Ubiquitous (ever-present). Campbell Copyright @ 2010 Updated Jan 2010 116 . the cell fills with new viral particles until it bursts. Once it is running. Logic bomb A logic bomb is a type of virus that activates when certain sequence of activities are done on the computer. Trojan horses have no way to replicate automatically. Virus A computer program that is designed to replicate itself by copying itself into the other programs stored in a computer. In other cases. as well. a biological virus must inject its DNA into a cell. In some cases. A computer virus passes from computer to computer like a biological virus passes from person to person. as well. There are similarities at a deeper level. The program also claims to do one thing (it may claim to be a game) but instead does damage when you run it (it may erase your hard disk).Security threats and attacks Trojan Horse A Trojan appears to be something that it is not so that you give out certain information. and the cell remains alive. it is then able to infect other programs or documents. It may be benign or have a negative effect. Obviously. and then starts replicating from there. the new virus particles bud off the cell one at a time. thereby allowing it to be read by unscrupulous persons.it is not alive. Computer viruses are called viruses because they share some of the traits of biological viruses. Worm A worm is a small piece of software that uses computer networks and security holes to replicate itself. releasing the virus. but there are enough similarities that the name sticks. at times impossible to avoid despite the best efforts and often very costly to an organization's productivity. Another example is a fake web site on which you give out your credit card information. Operating System Concepts Mrs. G. A copy of the worm scans the network for another machine that has a specific security hole. the analogy between computer and biological viruses stretches things a bit. It copies itself to the new machine using the security hole. Example: a fake login screen will allow you to put in your id and password. A biological virus is not a living thing. Instead. A virus is a fragment of DNA inside a protective jacket. Unlike a cell. The viral DNA then uses the cell's existing machinery to reproduce itself.

An example of authentication is fingerprint scanning. Some firewalls also protect systems from viruses and junk email (spam).g. so it can be understood. Virus protection. Authentication. Define the term cryptography. Identification is the act of claiming who you are. Decryption is the process of converting encrypted data back into its original form. thereby increasing the amount of phony traffic. G. the correct decryption key is required. which cannot be easily understood by unauthorized people (e. An example of identification is using a password is a secret word or phrase that gives a user access to a particular program or system. Trend Micro-PCcillin). However. the password could have been guessed or secretly taken. Firewall A firewall is a program and/or hardware that filters the information coming through the internet to prevent unauthorized access. Operating System Concepts Mrs.g.s of firewalls include: Black Ice. called a ciphertext. McAfee. hackers). Zone Alarm). Encryption is the conversion (encoding) of data into a form. In order to easily recover the contents of an encrypted signal. Encryption Data encryption is the translation of data into a form that is unintelligible without a deciphering mechanism. The key is an algorithm that undoes the work of the encryption algorithm. Authorization is a process of allowing someone or something to do something based on the previous two. Unlike a virus or worm. This must be updated regularly. A distributed denial of service (DDOS) attack uses multiple computers throughout the network that it has previously infected. a denial of service attack interrupts network service for some period. The computers act as "zombies" and work together to send out bogus messages.g. which can cause severe damage to databases. Norton Antivirus. while authentication is proving it. Firewall Authentication Authentication is a security measure designed to protect a communications system against fraudulent transmissions and establish the authenticity of a message.Denial-of-service An assault on a network that floods it with so many additional requests that regular traffic is either slowed or completely interrupted. Encryption. (e. Campbell Copyright @ 2010 Updated Jan 2010 117 . Tutorial Questions 1. Virus protection Antivirus software (e.

What is a Virtual Private Network? Practice MCQs 1. What is the most popular security feature of operating systems? a) Biometric identification b) Directory encryption c) Time and location controls d) User ids and passwords 2. Describe the term Secure Socket Layer 6. 5. Differentiate between Symmetric and Asymmetric Encryption 4. John has gotten the system administrator password by accident but was not able to use it at his computer.2. Campbell Copyright @ 2010 Updated Jan 2010 118 .org/ 3. John has a password to the human resource system.eccouncil. What security feature has been activated to prevent John from using this password? a) Administrative protection b) Authority level c) Location control d) Password blocking Operating System Concepts Mrs. What security feature has been activated to limit John? a) Anti-virus b) Authority level c) Encryption d) Firewall 4. What are your comments on becoming a certified ethical hacker? Visit the website http://www. G. Discuss various encryption software. Which security feature prevents a hacker from making sense out of files that he has gained access to? a) Encryption b) Firewall c) Inheritance d) Profile 3. He is able to view all employee data except salary.

A trojan horse appears to be something that it is not so that you give out certain information.g. A single user operating system allows only one user at a time. MS-DOS DOS (Disk Operating System) refers to several single user. multitasking UNIX-type operating system that is open source software. a version of UNIX developed by Sun Microsystems. Each user has a certain level of access rights or authority on different files and directories. UNIX UNIX is a multitasking operating system developed at Bell Laboratories. Campbell Copyright @ 2010 Updated Jan 2010 119 . OS/2 Warp Server for e-business is IBM’s network O/S designed for business. G. like UNIX. OS/2 OS/2 Warp Client is IBM’s GUI multitasking client operating system that supports networking. The security is very good but can be vulnerable to attack. the Internet. Linux. then he can still see such files. You can limit by specific time of day and specific workstations for each user. If someone knows that the file is there or lists hidden files. Later versions used both command-line and menu-driven user interfaces. and speech recognition. which means its code is available to the public. only on the network. thereby allowing it to be read by unscrupulous persons. OS/2 accepts login ID and password and a set of permissions or rights are granted by the LAN administrator. Read. Solaris. is a multipurpose operating system because it is both a stand-alone and network operating system. Operating System Concepts Mrs. Unix can be defeated by Trojan Horses. Example: a fake login screen will allow you to put in your id and password.Case studies Most operating systems use a system of passwords and user ids in order for a user to gain access to the computer and its files. is a network O/S designed for ecommerce applications. You can set expiration dates on passwords. There is limited or no security. A password is not compulsory on the local computer. Another example is a fake web site on which you give out your credit card information. DOS used a command-line interface when Microsoft first developed it. You can turn off rights/privileges to sub-directories. scripting languages and interpreters which are particularly vulnerable to attack because there are so many portals of entry for hackers to exploit. Hidden etc. command-line operating systems developed in the early 1980s for personal computers.SYS. This is usually done to the system files such as IO. Linux is a popular.SYS and MSDOS. You can set attributes on files e. There are a large number of built-in servers. Java.

If you still have FAT then you do not have this feature. If you set a password but the user hits cancel button then the operating system will bring up the default desktop under which you have free reign. This O/S uses a secure key chain to manage passwords. change.You can also prevent certain programs from running (e. lockout policies. This accepts user id and password. Campbell Copyright @ 2010 Updated Jan 2010 120 . A built-in firewall (called ICF) filters incoming traffic without attempting to manage or restrict outbound connections. You can set security on admin tasks (e. The professional edition has a Security Configuration Manager (SCM) which allows the administrator to define security templates that can be applied via group policy. account management. You can be kicked off the system if you enter an incorrect password 3 times. It also supports encryption. You are able to create multiple user accounts. There is enhanced system recovery from failure with System Restore feature. file system permissions. read/write capability. Templates include password policies. There is also support for biometric devices. most reliable Windows operating system. virus). There is also a screen saver password. Windows XP has increased security. G. policy changes.OS/400 This accepts user id and password. NTFS also allows you to encrypt files and folders using the Encrypting Files system (EFS). Home edition starts off with administrative privileges and no password by default. Microsoft Windows Windows 95/98 had limited security. object access. You are able to group users and set the authority level for the group (user profile). directories/libraries.g.g. The Internet connection firewall protects against hackers. service permissions. user rights. fields. Software restrictions . MacOS Mac OS X is a multitasking GUI operating system available only for Apple Macintosh computers. There is also auditing which records login. There is also secured wireless access. The system can force a user to change their password after certain intervals. privilege use and system events. Operating System Concepts Mrs. There are audit logs and audit trails.read only. There are also different levels of authority . event log. file vault and firewall. It allows directory access control. startup modes. changing settings). Blank passwords are not allowed in the Professional edition. If you use NTFS you can set permissions down to the file level. providing better performance and a new GUI with a simplified look. Windows XP Home edition versus Windows XP Professional Windows XP when it came out was Microsoft’s fastest. You are unable to disable simple file sharing in the home edition so be careful on a network if you do not have a firewall. You may restrict a terminal that a user can use as well as the time that a user may log on to the system. commands. Windows NT has security holes. Windows Server 2003 is an upgrade to Windows 2000 Server and includes features of previous server versions. records (views). delete etc. Authority levels can be set on files/objects.

The supervisor may set trustee directory and trustee file assignments. Which operating system do you believe is the most secure? Operating System Concepts Mrs. Tutorial Questions 1. Erase.NET is a scaled-down Windows operating system designed for use on communications. Campbell Copyright @ 2010 Updated Jan 2010 121 . G. Novell Netware NetWare is a network O/S designed for client/server networks. The rights that can be set include: Superviros. entertainment. There is also biometric support as well as smart card support. There are also inherited rights and file attributes. Create. You can encrypt communication. and FileScan (sees filenames). What are the security features common to most modern operating systems? 2. Discuss the security features of different operating systems. There is a screen saver password. Modify. called the Pocket PC. Read. and mobile devices and on handheld computers. Compare the security features of Windows 7 to previous versions? 3.Windows CE . Netware accepts a userid and password. Write. There is security at the user level as well as at file and directory levels. Pocket PC 2002 is a scaled-down operating system from Microsoft that works on a specific type of PDA.

Tanenbaum. John Wiley & Sons Inc. Andrew S. KY:Course Technology Publishing. Gagne.: USA. http://www. G. (2006).B. Prentice Hall: USA. Operating System Concepts Mrs. Discovering computers 2008.). Shelly G. P. 7th E. (2004). Past Operating Systems Concepts examination papers.REFERENCES CCCJ lecturers. Modern Operating Systems. T. Galvin. (2007). Abraham..webopedia. Silberschatz. G.B.. Campbell Copyright @ 2010 Updated Jan 2010 122 .d. Webopedia: Online computer dictionary. & Cashman.com. Operating Systems Concepts. Complete Shelly Cashman Series. (3rd Ed.J.

Sign up to vote on this title
UsefulNot useful