UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI SAINS KOMPUTER & TEKNOLOGI MAKLUMAT (Faculty of Computer Science & Information Technology) Diploma in Multimedia Technology THIRD SEMESTER EXAMINATION, APRIL 2013 SESSION DMTW-E-F- 1/12 ITC 2053 OPERATING SYSTEM AISYA SALIMAH BINTI CHE ABDUL RAHIM 11 APRIL 2013 9.00 AM -11.30 AM (2 ½ JAM / HOURS) INSTRUCTION TO STUDENT 1. This Examination paper has TWENTY ONE (21) printed pages. 2. This question paper consists of FOUR (4) sections. Section A, B & C : Answer ALL questions. Section D : Answer ONE (1) question ONLY. 3. Please write all your answers in the Answer Booklet provided.
BAHAGIAN A : SOALAN OBJEKTIF (20 MARKAH) SECTION A : OBJECTIVE QUESTIONS (20 MARKS) ARAHAN : JAWAB SEMUA SOALAN. INSTRUCTION : ANSWER ALL QUESTIONS. 1. Multiprogramming adalah? / Multiprogramming is? A. The concurrent execution of one computer program on two or more computer systems. B. The concurrent execution of two or more computer programs on one computer system. C. The use of multiple languages with which to write computer programs. D. The use of two or more computer systems which are under the control of a single program. 2. Istilah ini bermakna bahawa semua komponen sistem yang diperlukan adalah beroperasi dan bersedia untuk bekerja apabila pengguna memerlukannya adalah? The term that means that all necessary components of a system are operable and ready to work when a user requires them is? A. Accessibility. B. Availability. C. Reliability. D. Credentiality. ASCAR Page 2 of 21
3. Ingatan menjejak mukasurat menggunakan: / Memory tracks pages using: I. Job Table. II. Page Map Table. III. Memory Map Table. IV. Segment Map Table. A. I,II AND III. B. I, II, IV. C. I,III, IV. D. II, III, IV. 4. Page fault bermakna kita merujuk halaman: / A page fault means that we referenced a page: A. Outside the memory boundaries. B. With an incorrect i/o request. C. That was not in main memory. D. That was not in secondary storage. 5. Paging adalah: / Paging is: A. The breaking up of a program into pages of various sizes. B. The breaking up of a program into pages of the same size. C. The breaking up of all programs into the same number of units regardless of the size of the program. D. Both A and C. ASCAR Page 3 of 21
6. Jumlah kerja yang diproses oleh sistem dipanggil? The volume of work run by a system is called? A. Response time. B. Availability. C. Utilization. D. Throughput. 7. Sistem Penjadualan di mana setiap kerja di ambil dalam FIFO untuk satu set masa kuantum adalah dirujuk sebagai? A scheduling system in which each job is taken in FIFO order for a set time quantum is referred to as? A. Priority Scheduling. B. Round Robin Scheduling. C. Shortest Remaining Time Scheduling. D. Shortest Job Next Scheduling. 8. Apakah jenis Penjadualan Proses yang diwakili dalam garis masa di bawah? What kind of process scheduling is represented in the timeline below? job 1 job 2 job 3 job 1 job 1 job 1 job 1 job 1 4 7 10 14 18 22 26 30 Job Number Job s CPU Cycle 1 24 2 3 3 3 A. First Come First Serve. B. Shortest Job Next. C. Shortest Remaining Time. D. Round Robin. ASCAR Page 4 of 21
9. Satu acara yang menggantung sementara operasi pemprosesan komputer ialah. An event that temporarily suspends normal processing operations of a computer is a(n). A. Utility program B. Job. C. Interrupt. D. System residence device. 10. Process Control Block(PCB) digunakan untuk. The Process Control Block (PCB) is used to. A. keep track of the status of a process. B. keep track of the address of the next instruction to be executed for this process. C. keep track of CPU scheduling information related to this process. D. all of the above. 11. Penjadualan proses yang masih belum RUN akan menukar status proses dari. The scheduling of a process that has not yet RUN will change the status of that process from. A. run to wait. B. ready to run. C. ready to wait. D. wait to run. ASCAR Page 5 of 21
12. Dalam storan cakera magnetik, masa yang diambil untuk mengerakkan lengan cakera ke silinder yang dikehendaki dipanggil: In magnetic disk storage, the time taken to move the disk arm to the desired cylinder is called: A. Circular delay time. B. Rotational latency. C. Seek time. D. Turnaround time. 13. Permintaan yang baru tiba pada data di atas silinder dalam turutan adalah 55, 46, 12, dan 67 dan jika lengan cekera pada masa semasa berada pada silinder 48. Jika polisi penjadualan adalah FIFO, permintaan yang akan dilayan dalam turutan adalah: Suppose requests have recently arrived for data on cylinders 55, 46, 12, and 67, in that order, and that the disk arm is currently at cylinder 48. If the disk scheduling policy is FIFO, the requests will be serviced in the order: A. 55, 67, 46, 12. B. 46, 55, 67, 12. C. 55, 46, 12, 67. D. 55, 67, 12, 46. ASCAR Page 6 of 21
Soalan 14-15 merujuk kepada Gambarajah 1 dibawah: Question 14-15 refer to the Figure 1 below: Tracks: 14 37 53 65 67 98 122 124 183 0 0 0 0 0 0 0 0 0 Aturan bagi permintaan trek: 98, 183, 37, 122, 14, 124, 65, 67. Lengan cekera bermula di trek 53. Queue of track requests: 98, 183, 37, 122, 14, 124, 65, 67. The disk arm starts at track 53. Gambarajah / Figure 1 14. Gambarajah menunjukkan Polisi Penjadualan Cakera. The diagram indicates the Disk Scheduling Policy. A. FCFS. B. SCAN. C. SSTF. D. None of the above. 15. Jumlah pergerakan kepala meliputi berapa banyak trek? The total head movement covers how many tracks? A. 236. B. 208. C. 640. D. None of the above. ASCAR Page 7 of 21
16. Matlamat utama salinan adalah: / The main goal of a backup is: A. To recreate data files and programs in their latest form. B. To repair a damaged disk. C. To save the operating system. D. To minimize size on the disk. 17. Apabila rekod dicapai secara rawak oleh alamat fizikal pada Peranti Penyimpanan Akses Langsung (DASD), kita berhadapan dengan organisasi fail berjenis apa? When records are randomly accessed by their physical addresses on a direct access storage device (DASD), we are dealing with what kind of file organization? A. Sequential. B. Indexed sequential. C. Direct. D. Partitioned. Gambarajah / Figure 2 18. Gambarajah 2 merujuk kepada. / Figure 2 is referring to. A. Access Control Matrix. B. Access Control List. C. Capability Control List. D. Password Control. ASCAR Page 8 of 21
19. Tujuan fail extension adalah untuk. The purpose of an extension is to. A. identify the directory in which the file is stored. B. identify the type of file. C. identify the file size. D. identify the file owner. 20. adalah perbuatan membenarkan hanya satu proses untuk mempunyai capaian kepada sumber yang khusus. is the act of allowing only one process to have access to a dedicated resource. A. No preemption B. Resource holding C. Circular wait D. Mutual exclusion ASCAR Page 9 of 21
BAHAGIAN B : BENAR (B) OR SALAH (S) (15 MARKAH) SECTION B : TRUE (T) OR FALSE (B) (15 MARKS) ARAHAN : JAWAB SEMUA SOALAN. INSTRUCTION : ANSWER ALL QUESTIONS. 1. Sistem pengoperasian tidak bertanggungjawab untuk memperuntukkan sumber antara proses yang bersaing. An operating system is not responsible for resource allocation between competing processes. 2. Sistem Embedded adalah komputer yang bertempat di dalam produk-produk lain untuk menambah ciri-ciri dan keupayaan. Embeded systems are computers placed inside other products to add features and capabilities. 3. Saiz mukasurat yang kecil akan membawa kepada jadual mukasurat yang kecil. A smaller page size leads to smaller page tables. 4. Partition dinamik adalah pengurusan memori yang boleh menyebabkan fragmentasi dalaman. Dynamic Partition is the memory management that can cause internal fragmentation. 5. Context Switching adalah satu proses untuk menukar pemproses kepada proses lain dengan menyimpan keadaan proses dan memuat keadaan proses yang lain. Context switching is the process to switch the processor to another process by keeping the process state and load another process s state. 6. Shortest Job Next (SJN) ialah algoritma penjadualan jenis preemptive. Shortest Job Next (SJN) is a preemptive type of scheduling algorithm. ASCAR Page 10 of 21
7. Penjadual Proses mengumpuk CPU untuk melaksanakan proses kerja yang diletakkan pada keadaan RUNNING oleh Penjadual Kerja. The Process Scheduler assigns the CPU to execute the processes of those jobs placed on the RUNNING state by the Job Scheduler. 8. Dalam Demand Paging apabila pekerjaan memerlukan halaman tertentu untuk dimuatkan dan tiada bingkai halaman yang kosong, halaman asal mesti ditukar kembali ke dalam storan sekunder. In demand paging when a job requires a certain page to be loaded and there is no empty page frame, a resident page must be swapped back into secondary storage. 9. Deadlock keatas pangkalan data berlaku apabila dua proses mengemaskini satu rekod yang sama dalam fail yang sama. A database deadlock occurs when 2 processes update the same record in the same file. 10. Kategori WORLD adalah dimana User Denied Access dikumpulkan. User Denied Access to a file is grouped in WORLD category. 11. Peranti I/O termasuk setiap alatan di dalam sistem seperti pencetak, pemacu cakera, pemacu CD / DVD, memori flash, kekunci, dan sebagainya. I/O Devices includes every peripheral unit in the system such as printers, disk drives, CD/DVD drives, flash memory, keyboards, and so on. 12. Peranti Kongsian diberikan hanya pada satu kerja dalam satu masa. Shared devices are assigned to only one job at a time. 13. Algoritma Penjadualan Proses Round Robin telah direka bagi sistem interaktif. The Round Robin Process Scheduling Algorithm was designed especially for interactive systems. ASCAR Page 11 of 21
14. FIFO adalah Page Replacement Scheme yang sesuai untuk sistem interaktif. FIFO is an appropriate Page Replacement Scheme for interactive systems. 15. Relocatable Dynamic Partition direka untuk mengurangkan fragmentasi luaran ingatan. Relocatable Dynamic Partition was designed to reduce external fragmentation of memory. ASCAR Page 12 of 21
BAHAGIAN C : SOALAN STRUKTUR (50 MARKAH) SECTION C : STRUCTURED QUESTIONS (50 MARKS) ARAHAN : JAWAB SEMUA SOALAN. INSTRUCTION : ANSWER ALL QUESTIONS. Soalan / Question 1 Terangkan terma di bawah: / Explain the terms below: a) Computer system b) Thrashing c) Spooling d) Turnaround time e) Compaction (10 markah /marks) ASCAR Page 13 of 21
Soalan / Question 2 a) Terangkan perbezaan di antara fragmentasi dalaman dan fragmentasi luaran. Explain the differences between internal fragmentation and external fragmentation. (4 markah /marks) b) Nyatakan Skim Peruntukan Ingatan yang membawa kepada fragmentasi dalaman dan fragmentasi luaran. State the Memory Allocation Scheme that leads to internal fragmentation and external fragmentation. (2 markah /marks) c) Terangkan tentang sistem pengoperasian. Senaraikan DUA(2) contoh sistem pengoperasian. Explain what is an operating system. List TWO(2) examples of operating systems. (4 markah /marks) ASCAR Page 14 of 21
Soalan / Question 3 a) Apakah kaedah Peruntukan Ingatan First-fit? / What is First-fit Memory Allocation method? (2 markah /marks) b) Terangkan kaedah Peruntukan Ingatan Best-Fit. / Explain the Best-Fit Memory Allocation method. (2 markah /marks) Soalan (c) dan (d) adalah berpandukan informasi berikut: / Questions (c) and (d) are based on the following information: Memory Block Memory Block Job Number Size Block 1 500 K Block 2 300 K Block 3 900 K Incoming Job list: Job 1 (850 K) Job 2 (150 K) Job 3 (600 K) c) Gunakan Algoritma Best-Fit untuk menunjukkan blok ingatan yang diperuntukkan kepada setiap kerja yang tiba. / Use the Best-Fit Algorithm to indicate which memory blocks are allocated to each of the three arriving jobs. (3 markah /marks) d) Gunakan Algoritma First-Fit untuk menunjukkan blok memori yang diperuntukkan kepada ketiga-tiga kerja yang tiba. / Use the First-Fit Algorithm to indicate which memory blocks are allocated to each of the three arriving job. (3 markah /marks) ASCAR Page 15 of 21
Soalan / Question 4 Diberi ingatan utama yang terdiri daripada dua bingkai halaman untuk kegunaan awam dan permintaan mukasurat untuk program lima halaman (dengan laman a, b, c, d, e) dalam urutan berikut: Given that main memory is composed of two page frames for public use and that a fivepage program (with pages a, b, c, d, e) requests pages in the following order: a, c,e,b,b,a,d,a a) Menggunakan penyingkiran halaman algoritma FIFO, lakukan analisis pengesan halaman yang menunjukkan kesalahan halaman dengan asterisk (*). Using the FIFO page removal algorithm, do a page trace analysis indicating page faults with asterisks (*). (8 markah /marks) b) Kira nisbah kegagalan dan kejayaan bagi analisis di atas. Compute the failure and success ratios for the analysis above. (2 markah /marks) ASCAR Page 16 of 21
Soalan / Question 5 a) Deadlock terjadi apabila banyak program bersaing untuk sumber yang terhad. Nyatakan dan terangkan EMPAT (4) keadaan yang menyebabkan deadlock. Deadlock occurs when there are many programs competing for limited resources. State and explain FOUR (4) situations that caused a deadlock. (8 markah /marks) b) Terangkan perbezaan di antara sistem interaktif dan sistem embedded. Explain the differences between interactive and embedded systems. (2 markah /marks) ASCAR Page 17 of 21
BAHAGIAN D : PENGIRAAN (15 MARKAH) SECTION D : CALCULATION (15 MARKS) ARAHAN : JAWAB ONE (1) SOALAN SAHAJA. INSTRUCTION : ANSWER ONE (1) QUESTION ONLY. Soalan / Question 1 Soalan yang berikut adalah berdasarkan jadual yang diberi di bawah: The following questions are based on the given table as below: Proses / Process Masa tiba / Arrival time Masa pemprosesan / Processing time A 0.0 4 B 2.0 7 C 4.0 2 D 8.0 3 a) Lukiskan garis masa yang menggambarkan perlaksanaan proses di atas menggunakan: (Masa dalam millisaat) Draw a timeline illustrating the sequence of executions of the above processes using: (Time in milliseconds) i) First Come First Serve (FCFS) ii) Shortest Job Next (SJN) iii) Shortest Remaining Time (SRT) iv) Round Robin (time quantum =3) v) Round Robin (time quantum =4) (5 markah /marks) ASCAR Page 18 of 21
b) Kirakan purata masa pusing balik bagi: / Calculate the average turnaround time for: i) First Come First Serve (FCFS) ii) Shortest Job Next (SJN) iii) Shortest Remaining Time (SRT) iv) Round Robin (time quantum = 3) v) Round Robin (time quantum =4) (5 markah /marks) c) Kirakan purata masa menunggu bagi: / Calculate the average waiting time for: i) First Come First Serve (FCFS) ii) Shortest Job Next (SJN) iii) Shortest Remaining Time (SRT) iv) Round Robin (time quantum = 3) v) Round Robin (time quantum =4) (5 markah /marks) ASCAR Page 19 of 21
Soalan / Question 2 Terdapat sejumlah 60 silinders, yang dinomborkan 0 hingga 59. Turutan giliran FIFO mengandungi permintaan seperti trak berikut :- There are 60 cylinders in total numbered from 0 to 59. The queue in FIFO order contains request for the following tracks:- 45,15,35,5,50 Lengan cakera berada di silinder 45 The disk arm is currently at cylinder 45 a) Lukiskan pergerakan lengan cakera bagi: / Draw disk arm movement for: i) FCFS ii) SSTF iii) SCAN (increasing direction) iv) C-SCAN (increasing direction) v) C-LOOK (increasing direction) (10 markah /marks) ASCAR Page 20 of 21
b) Kirakan purata pergerakan lengan cakera bagi: / Calculate the average disk arm movement for: i) FCFS ii) SSTF iii) SCAN (increasing direction) iv) C-SCAN (increasing direction) v) C-LOOK (increasing direction) (5 markah /marks) End of Page. ASCAR Page 21 of 21