Você está na página 1de 13
Helwan University First Term, Academic Year 2022/2023 Faculty of since M 317 - Operating System Math. Department Sheet 1-solution St. Name: 2. 4 Choose the correct answer (1 mark’ ‘The address of the next instruction to be executed by the current process is provided by the a) CPU registers b) program counter ©) process stack 4) pipe A Process Control Block(PCB) does not contain which of the following a) Process State b) Stack c) Heap 4) boot strap ‘The number of processes completed per unit time is known as a) Output b) Throughput ©) Efficiency 4) Capacity The state of a process is defined by a) the final activity of the process b) the activity just executed by the process ©) the activity to next be executed by the process 4) the current activity of the process Which of the following is not the state of a process ? a) New b) Old c) Waiting d) Running e) Ready 6. The Process Control Block is, a) Process type variable b) Data Structure c) a secondary storage section 4) a Block in memory 7. Which of the following do not belong to queues for processes ? a) Job Queue b) PCB queue c) Device Queue d) Ready Queue 8. When a process terminates a) It is removed from all queues b) It is removed from all, but the job queue ¢) Its process control block is allocated 4d) Its process control block is never de-allocated 9, When a process terminates : (Choose Two) a) It is moved to the ready queue b) It is removed from all, but the job queue ¢) Its process control block is de-allocated 4d) Its process control block is never de-allocated 10. When a thread needs to wait for an event it will A.Block —_B, Execute C. Terminate D, Update 11. Ina pure Kemel Level Thread facility all of work of thread management is done by the A. Application B, Program C. Kernel D. Threads 12, Mierokernel design imposes a uniform A. Process B. Processor C. Interface D, System 13. Microkernel architecture faci A Functionality —-B, Extensi C. Reliability D. Portability 14, Asynchronous elements in program can be implemented through A.Bugs _B. Threads C. Programs D. Security Policy 15, Unit of dispatching is usually referred as A. Multiprogramming B. Security Pol C. Problem D. Thread 16, A single machine instruction can controls simultaneous execution of a number processing elements on A. Lockstep Basis B. Open Step Basis _C. Early Basis D. None 17. Owner of an address space can grant a number of its A. Modules B. Pages C. Devices D. Computers 18, In Many-to-One multithreading model many user level threads are attached to A. One register _B, operating system C. One kernel thread D other threads 19. Programs involve a variety of activities is easier to design and implement using A. Programs B. Information C. Data D. Threads 20, Multiple threads within same process may be allocated to separate A. Applications. Programs Processors D. Processes Second : Answer the follo (2 mark (From Operating Systems Lecture Notes. R. Ragab) 1. What is an Operating System? 2. What are the Operating system goals 3. What is the Kernel and the Shell 4. What is the process and what it needs to accomplish its task? Process Management 5. What are the duties of the Operating System towards process? 6. Write a short paragraph to explain one of the following systems I Mainframe Systems 2. Batch Processing Operating System 3. Multiprogramming Operating System: 3, Time-Sharing/multitasking Operating Systems 4, Multiprocessor Operating Systems 5, Distributed Operating Systems 6, Desktop Systems/Personal Computer Systems 7. What is the Process 8. Write at least one sentence to describe each process state 9. Draw a figure to represent the relation between different process states 10. What is the difference between process and program? 11. What is Process Control Block (PCB) 12. List some of the attributes of the Process Control Block (PCB) and explain one of them 13, What is the Thread 14. What are the Motivations for the thread model? 15. Explain what is meant by Single-threaded and multithreaded 16. What are the four major categories for the benefits of multithreaded programming? 17. Whey “Resource sharing” is considered one of the benefits of multithreaded programming 18. Benefits 19. What are the advantages and disadvantages of the User-Level Threads 20. What are the advantages and disadvantages of the Kernel-Level Threads 21. Explain the Many-to-One Mode! Multithreading Models 22. Is One-to-one Model is more prefable than Many-to-One Model and why 23. Compare between Process vs. Thread Solutions Lecturt What is an Operating System? W% Aprogram that acts as an intermediary between a user of a computer and the computer hardware. %_Anoperating Systems a collection of system programs that together control the operations of a computer system. ‘Some examples of operating systems are UNIX, Mach, MS-DOS, MS-Windows, Windows/NT, Chicago, OSV2, MacOS, VMS, MVS, and VM. What are the Operating system goals: Execute user programs and make solving user problems easier. ‘Make the computer system convenient to use. Use the computer hardware in an efficient manner What is the Kernel and the Shell Kormel — The one program running at all times (al else being application programs) Components of OS: OS has two parts. (1)Kernel (2)Shell (1)Kernel is an active part of an OS ie. tis the part of OS running at al times. It's a programs which can interact with the hardware. Ex: Device driver, dil les, system fles etc. (2) Shell is called as the command interpreter. Itis a set of programs used to interact withthe application programs. It is responsible for execution of instructions given to OS (called commands) Lecture2 What is the process and what it needs to accomplish its task? Process Management ‘process isa program in execution. A process needs certain resources, including CPU time, memory, fie, and 10 devices, to accompish ts task What are the duties of the Operating System towards process? The operating system is responsible forthe folowing acviles in connection wth process management. + Process creation and deletion + process suspension and resumption + Provision of mechanisms fr process synchronization process communication Lect Write a short paragraph to explain one of the following systems 1.Mainframe Systems 2. Batch Processing Operating System: 3. Multiprogramming Operating System: 3. Time-Sharing/multitasking Operating Systems 4, Multiprocessor Operating Systems 5. Distributed Operating Systems 6. Desktop Systems/Personal Computer Systems 4.Mainframe Systems Reduce setup time by batching similar obs Automatic job sequencing ~ automaticaly transfers contro rom one job to another. First rudimentary operating system, Resident monitor inital control n monitor contol transfers to job B _when job completes control transfers pack to monitor 2, Batch Processing Operating System: W%_ Thistype of OS anceps more than one jobs and these jobs are batched grouped together according to their Sinitarrequrements, Thi ts done by computer operator. Whenever the computer becomes eval, the batched jobs are sent or execution and gradually the tpi setback wo the user. 1 ltallowedoaly ane program ata tine This OS i responsible for scheduling the jobs aeconing to pray athe resource rue 3. Multiprogramming Operating System {This typeof OS is sed to execute more than one jobs simultaneously by a single processor. it increases CPU utilization by organizing jobs s0 that the CPU always has one job to execute The concept of multiprogramming is described as follows %_Allthe obs that enter he system are stored inthe jb pool in dise). The operating system fous a set ‘of jobs from job pool into main memory and begins wo execute During execution, the job may have to wait for some task, such as an VO operation, to complete. ta 8 multipogramming system, the operating system simply switches to another job and executes, ‘When that job need to wait. the CPU is switched to another job, and so on BW When the first job finishes waiting and it ges the CPU back % _Aslong as at least one job needs to execute, the CPU is never idle “Multiprograrming operating systems use the mechanism of job scheduling and CPU scheduling 3. Time-Sharing/multitasking Operating Systems ‘Time sharing (or multitasking) OS is logical extension of multiprogramming, I provides extra fcilities such as 2B Faster switching between multiple jobs to make processing faster B Allows multiple uses to share computer system simultaneously W% The users cn interact with each jo while is running ‘These systems use aconeept of virtual memory for effetve utilization of memory space. Hence, in this OS, no jobs are discarded. Each one i executed using virtual memory concep. I uses CPU scheduling, memory management, ise management and security management. Examples: CTSS, MULTICS, CAL, UNIX et. 4. Multiprocessor Operating Systems “Multiprocessor operating systems ae also known as parallel OS or ight coupled OS. Such operating systems have more than one processor in close communication that sharing the computer bus, the clock and sometimes memory and peripheral devices. executes multiple jobs at same time and makes the processing faster Multiprocessor systems have thre main advantages: Increased throughput: fy increasing the amber of processors, the system performs more wor in less time The speed-up ratio with N processors s less than N. S_ Economy of scale: Multiprocessor systems can save more money than multiple single-processor systems, because they can share peripheral, mass sora, and power supplies % Increased reliability: If one processor fils to done it task, then each ofthe remaining processors must pick pa share of the work ofthe led processor. ‘The failure af one processor will not halt the system, only slow it down The ability to continue providing service proportional to the eve of surviving hardware is called graceful degradation. Sysicms designed for sraceful degradation are called fault tolerant. The multiprocessor operating systems are classified into two categories: 1. Symmetric multiprocessing system 2. Asymmetric multiprocessing system 5 Insymmetric multiprocessing system, each processor runs an identical copy ofthe operating system, and these copes communicate with one another as needed. %__Inasymmetric multiprocessing system, a processor is called master processor that controls eter processors called save processor Thus, it establishes master-slave relationship. The master processor schedules the jobs tnd manages the memory for entire system 5. Distributed Operating Systems W_ In distabuted system, the dillerent machines ae connected in a network and cach machin has its own processor and own foal memo 1S lnthis system, the operating systems om ll the machines work together to manage the collective network W_ltan be clas 1 Client-Server systems 2. PoortonPeer systems ‘Advantagos of distributed systoms. into two categories: %_ Resources Sharing B Computation speed up — load sharing B Reliability ¥ Communications B Requires networking infastuctre Local area networks (LAN) or Wide area networks (WAN) 6. Desktop Systems/Personal Computer Systems W_ The PC operating system is designed for maximizing user Convenience and responsiveness. This system is neither multi-user nor multitasking W% These systems include PCs running MierosoR Windows and the Apple Macintosh. The MS-DOS operating system from Microsoft has been superseded by multiple flavors of Microsoft Windows and IBM has. ‘upgraded MS-DOS to the OS/2 multitasking sytem, % The Apple Macintosh operating system has been ported to more advanced hardware, and now includes new features such as virtual memory and multitasking, 7. Real-Time Operating Systems (RTOS) Y% _Areal-time operating system (RTOS) i a multitasking operating system intended for applications with fxed

Você também pode gostar