• No results found

ICS 431_Exams_Binder.pdf

N/A
N/A
Protected

Academic year: 2020

Share "ICS 431_Exams_Binder.pdf"

Copied!
21
0
0

Loading.... (view fulltext now)

Full text

(1)

Page 1 of 5

ICS 431

: Operating Systems

First Semester 2013/2014

Major 1 Exam –

Form B

Exam Date: 28/10/ 2013 Exam Duration: 60 minutes

Student Name: _________________________________ Student ID:_____________

Find your section from the table below:

Instructor Name Day/Time Section Check

Mahreen Nasir But MW 08:00-09:20 101

Mahreen Nasir But MW 09:30-10:50 102

Adawia A. Al-Alawneh TRU 10:00-10:50 103

Saima Abdullah MW 12:30-01:50 104

Adawia A. Al-Alawneh TRU 08:00-08:50 105

Saima Abdullah TRU 11:00-11:50 106

Instructions:

1. Including this cover page, this exam booklet contains 4 pages. Check if you have missing pages. 2. Any form of cheating on the examination will result in a zero grade.

3. Please write your solutions in the spaces provided on the exam. You may use the blank areas and backs of the exam pages for scratch work.

The following is forbidden during the exam: :يلي ام ناحتملاا ءانثأ عنمي

 Mobile use. ةلاقنلا فتاوهلا مادختسا 

 Questions after the first quarter of the exam time. ناحتملأا ةدم نم لولأا عبرلا دعب ةلئسلأا 

 Leaving the exam room for any reason. ببس يلأ ةعاقلا ةرداغم 

 Borrowing tools from other students نيرخآ بلاط نم تاودلأا ةراعتسا 

Max Score

Student Score

Question 1

4

Question 2

5

Question 3

2

Question 4

2

Question 5

2

Total

15

Kingdom of Saudi Arabia Ministry of Higher Education

University of Hail

College of Computer Science and Engineering Department of Computer Science and Software

Engineering

ةيدوعسلا ةيبرعلا ةكلمملا يلاعلا ميلعتلا ةرازو

لئاح ةعماج بساحلا ةسدنهو مولع ةيلك يللآا

(2)

Page 2 of 5 Q2) True or False (5 points)

_________ 1. Interruptvector contains the addresses of all the service routines.

_________ 2. Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt.

_________ 3. A trap is a software-generated interrupt caused either by an error or a user request.

_________ 4. In symmetric clustered system there is one machine in hot-standby mode

_________ 5. OS allows two modes to protect itself: user and kernel mode.

_________ 6. Main memory is a large non-volatile storage.

_________ 7. In multitasking environment, virtual memory allows execution of processes not completely in memory

_________ 8. Creating and deleting files and directories is the responsibility of the OS in connection with file management.

_________ 9. A process is a program in execution; it is an active entity.

_________ 10.In peer-to-peer computing environment, a node does not need to join P2P network

_________ 11. Security defense of the system against internal and external attacks.

(3)

Page 3 of 5

Q1) choose the correct answer for the questions below (4 points)

1. The overlapping of output of one job with input of other jobs

a. Caching b. Buffering c. Swapping d. Spooling

2. UNIX is a ________________ operating system:

a. Multitasking b. Timesharing c. Single task d. None of the above

3. All of the following are true about a bootstrap program except:

a. Stored in ROM or EPROM b. Create and delete files

c. known as firmware d. Loads OS kernel and starts execution

4. The only large storage media that the CPU can access directly is:

a. Main memory b. Flash memory c. Secondary storage d. Magnetic disk

5. CLI, GUI, and batches are different types of:

a. User Interface b. User Process c. Shells d. Interrupt

6. If an instruction is designated as privileged, that means it is only can be executed:

a. In the user mode b. In the kernel mode c. In the dual mode d. By the user process

7. System calls are mostly accessed via:

a. CLI b. API c. CPU d. Kernel

8. _____ command is used in FREEBSD to create a process

a. CreateProcess b. wait() c. fork() d. exec()

9. Finding bugs (errors) and fixing them is :

a. Core dump b. debugging c. Crash dump d. Log files

10._____________ allows operating systems to run applications within other OSes

(4)

Page 4 of 5

Q3) Label the following drawing with the system components? (2 points)

Q4) List four types of the operating system services. (2 points)

(5)

Page 5 of 5

Q5) Organize the following storage systems in a hierarchy according to their speed and cost:

Magnetic disk, electronic disk, cache, registers, main memory, magnetic tape, optical disk

(2 Points)

(6)

Page 1 of 6

ICS 431

: Operating Systems

First Semester 2013/2014

MajorII Exam – Form (A)

Exam Date: 27/11/2013 Exam Duration: 60 minutes

Student Name: _________________________________ Student ID:_____________

Find your section from the table below:

Instructor Name Day/Time Section Check

MahreenNasir But MW 08:00-09:20 101

MahreenNasir But MW 09:30-10:50 102

Adawia A. Al-Alawneh TRU 10:00-10:50 103

Saima Abdullah MW 12:30-01:50 104

Adawia A. Al-Alawneh TRU 08:00-08:50 105

Saima Abdullah TRU 11:00-11:50 106

Instructions:

1. Including this cover page, this exam booklet contains pages. Check if you have missing pages.

2. Any form of cheating on the examination will result in a zero grade.

3. Please write your solutions in the spaces provided on the exam. You may use the blank areas and backs of the exam pages for scratch work.

The following is forbidden during the exam: :يلي ام ناحتملاا ءانثأ عنمي

 Mobile use. ةلاقنلا فتاوهلا مادختسا 

 Questions after the first quarter of the exam time. ناحتملأا ةدم نم لولأا عبرلا دعب ةلئسلأا 

 Leaving the exam room for any reason. ببس يلأ ةعاقلا ةرداغم 

 Borrowing tools from other students نيرخآ بلاط نم تاودلأا ةراعتسا 

Max Score

Student Score

Question 1

8

Question 2

8

Question 3

3

Question 4

26

Total

45

Kingdom of Saudi Arabia Ministry of Higher Education

University of Hail

College of Computer Science and Engineering Department of Computer Science and Software

Engineering

ةيدوعسلا ةيبرعلا ةكلمملا يلاعلا ميلعتلا ةرازو

لئاح ةعماج بساحلا ةسدنهو مولع ةيلك يللآا

(7)

Page 2 of 6

Q1) Choose the correct answer for the questions below: (8 points)

1 2 3 4 5 6 7 8

1. ____________ in PCB identifies location of instruction to next execute.

a. Process state b. CPU registers

c. Program Counter d. None of the above

2. __________________selects which process should be executed next and allocates CPU

a. Short-term scheduler b. Long-term scheduler

c. Medium-term scheduler d. High-term scheduler

3. ___________________ implies a system can perform more than one task simultaneously.

a. Concurrency b. Parallelism

c. Diversion d. None of the above

4. ____________________ is time it takes for the dispatcher to stop one process and start another

running.

a. Response Time b. Dispatcher Latency

c. Throughput d. Waiting Time

5. _________ contains all information associated with each process

a. Process id b. Program counter

c. Process control block d. Process state

6. _________ processes can be affected by other processes

a. Child b. Parent

c. Independent d. Co-operating

7. _______________ is the amount of time to execute a particular process

a. Turnaround Time b. Waiting Time

(8)

Page 3 of 6

8. Which of the following is a criterion to evaluate a scheduling algorithm?

a. Waiting Time. b. CPU Utilization.

c. Throughput. d. All of the above

Q2) True or False (8 points)

1 2 3 4 5 6 7 8 9 10

1. In waiting state, the process is waiting to be assigned to a processor.

2. Ready Queue represents set of all processes residing in main memory, ready and waiting to execute.

3. Context of a process represented in the PCB.

4. Process executes last statement and then asks the operating system to delete it using the Fork () system call.

5. Cooperating process cannot be affected by other processes.

6. Text section in the process contains global variables.

7. If the process is waiting to be assigned to the processor then it is in the ready state.

8. Cascading termination means all children, grand children (processes) will be terminated

9. Message passing and shared memory are two communication models used in Interprocess

Communication.

(9)

Page 4 of 6 Q3) Describe following terms:

(3 points)

1. CPU utilization

2. Throughput

(10)

Page 5 of 6

Q4) Given the following processes set. Find the waiting times for all processes using: 1. FCFS

2. SJF

3. Priority Scheduling and

4. RR, Quantum= 5 (26 points)

Process Burst Time Priority

P1 10 3

P2 15 4

P3 7 2

P4 20 5

P5 4 1

Fill in the following table with the waiting times for each process:

Process FCFS SJF RR Priority Scheduling

P1

P2

P3

P4

P5

Average Waiting Time

(11)

Page 6 of 6

(12)

Page 1 / 10 Final Exam in: Operating System/ICS 431

First Semester 2013/2014

(Including cover page this exam booklet contains ten pages)

Exam Date: 30/12/2014 Exam Duration: 120 minutes

Student Name: ____________________________ Student ID:_______________ Coordinator : Adawia A. Al-Alawneh

Find your section from the table below:

Instructor Name Day/Time Section Check

Mahreen Nasir MW 08:00-09:20 101

Mahreen Nasir MW 09:30-10:50 102

Adawia Al-Alawneh TRU 10:00-10:50 103

Saima Abdullah MW 12:30-01:50 104

Adawia Al-Alawneh TRU 08:00-08:50 105

Saima Abdullah TRU 11:00-11:50 106

Instructions:

1. Any form of cheating on the examination will result in a zero grade.

2. Please write your solutions in the spaces provided on the exam. You may use the blank areas and backs of the exam pages for scratch work.

The following is forbidden during the exam: :يلي ام ناحتملاا ءانثأ عنمي

 Mobile use. ةلاقنلا فتاوهلا مادختسا 

 Questions after the first quarter of the exam time. ناحتملأا ةدم نم لولأا عبرلا دعب ةلئسلأا 

 Leaving the exam room for any invalid reason. ببس يلأ ةعاقلا ةرداغم 

 Borrowing tools from other students نيرخآ بلاط نم تاودلأا ةراعتسا 

Max Score Student Score

Part I

Question 1 8

Question 2 5

Question 3 8

Part II

Question 4 5

Question 5 2

Question 6 5

Question 7 6

Question 8 4

Question 9 2

Total 45

Good Luck!

Kingdom of Saudi Arabia

Ministry of Higher Education University of Hail

College of Computer Science and Engineering Department of Computer Science and Software

Engineering

ةيدوعسلا ةيبرعلا ةكلمملا يلاعلا ميلعتلا ةرازو

لئاح ةعماج ساحلا ةسدنهو مولع ةيلك يللآا ب

تايجمربلا ةسدنهو بساحلا مولع مسق

(13)

Page 2 / 10

PART I:

(21

Marks)

Q1) Choose the correct answer for the questions below:

(8 Marks)

1. The solution to Critical Section Problem is _______

a. Mutual Exclusion b. Hold and wait

c. Circular Waiting d. No preemption

2. The register that contains the range of logical addresses is:

a. Index Register b. Base Register

c. Stack Register d. Limit Register

3. Physical Memory divided into fixed size blocks in __________

a. Swapping b. Paging

c. Internal Fragmentation d. External Fragmentation

4. The _________ operation in semaphore means that a resource is busy and the ________ operation means that is resource is now available to use by other processes

a. Wait , P b. Signal, V c. Signal, Wait d. Wait, Signal

5. A binary semaphore

a. Has the values one or zero b. Is essential to binary computers

c. Is used only for mutual exclusion d. Is used only for synchronization

6. The overlapping of output of one job with input of other jobs

a. Spooling b. Buffering c. Caching d. Swapping

Write your answer here

(14)

Page 3 / 10 7. The hardware that maps virtual address to a physical address is:

a. Main Memory Unit b. Address Location Unit

c. Memory Management Unit d. Process Control Block

8. Bootstrap program is:

a. A hardware driver b. Stored in ROM or EPROM

c. Created and programmed by OS d. Part of the OS

9. CLI, GUI, and batches are different types of:

a. User Interface b. User Process c. Shells d. Interrupt

10.It is in the PCB and identifies location of instruction to be executed next.

a. Process state b. CPU registers

c. Program Counter d. Global variable

11.The time it takes for the dispatcher to stop one process and start another to run.

a. Response Time b. Dispatcher Latency

c. Throughput d. Waiting Time

12.It contains all information associated with each process

a. Process Id b. Program Counter

c. Process Control Block d. Process State

13.The processes that can be affected by other processes are called:

a. Child b. Parent

c. Independent d. Co-operating

Write your answer here

7 8 9 10 11 12 13

(15)

Page 4 / 10 14.Which of the following is a criterion to evaluate a scheduling algorithm?

a. Dispatcher latency b. MMU utilization

c. Throughput d. Process State

15.If an instruction is designated as privileged, that means it can only be executed:

a. In the user mode b. In the kernel mode

c. By the user process d. In the dual mode

16.Performing more than one task simultaneously, is called:

a. Concurrency b. Parallelism

c. Diversion d. None of the above

Write your answer here:

14 15 16

Q2) Fill in the blank, select from the following list of keywords:

(5 Marks)

Logical Priority Inversion Page Fault

Dynamic Loading Physical Deadlock

1. During address translation, if valid–invalid bit in page table entry is i then a ______________ occure.

2. When a set of blocked processes each holding a resource and waiting to acquire a resource held

by another process in the set this will cause ___________________

3. When lower-priority process holds a lock needed by higher-priority process, this will cause

scheduling problem called _____________________.

4. MMS is a hardware device that maps ____________ to ______________ address.

(16)

Page 5 / 10

Q3) Which of the following TRUE or FALSE:

(8 marks)

1. Deadlock avoidance means to allow the system to enter a deadlock state and then recover

2. Relocatable code is generated at compile time

3. External Fragmentation refers to the total memory space exists to satisfy a request, but it is not contiguous

4. If Process Pi is executing in its critical section, then no other process can execute in its critical section. This refers to mutual exclusion property.

5. The separation of user logical memory from physical memory is called as Virtual Memory

6. Ready Queue represents set of all processes residing in main memory, ready and waiting to execute.

7. A trap is a software-generated interrupt caused either by an error or a user request.

8. Process executes last statement and then asks the operating system to delete it using the Fork() system call.

9. Text section in the process contains global variables.

10.Cascading termination means all children, grand children (processes) will be terminated

11.Message passing and shared memory are two communication models used in Interprocess Communication.

12.The one program running at all times on the computer is the kernel

13.OS allows two modes to protect itself: user and trap mode.

14.A process is a program in execution; it is a passive entity.

15. Protection defense of the system against internal and external attacks.

16.Main memory is a large non-volatile storage.

Write your answer here:

(17)

Page 6 / 10

PART II: (24 Marks)

Q4)

Draw the resource-allocation graph and explain the possibility for a

deadlock

,

where the sets P, R, and E are:

P = {P1, P2, P3}

R = {R1, R2, R3}

E = {P1

R1, P2

R3, R1

P2, R2

P2, R2

P1, R3

P3}

- Resource type R1 has two instances

- Resource type R2 has two instances

- Resource type R3 has one instance

(18)

Page 7 / 10

Q5)

Given the addresses below, calculate the missing base and limit addresses

and write it in the empty boxes.

(2 Marks)

Q6)

Given the following structures of main and physical memory. Fill both the

page table and physical memory based on the information given below:

Page 0 is stored in frame 2, page 1 is stored at frame 6, page 2 is stored in frame

1, page 3 is stored in frame 8, and page 4 is stored at frame 7.

(5 Marks)

Operating System

P1

P2

P3

Page Table

0

2454000 24500 3464012

130876 Limit

7018080 6867560

Physical Memory Logical Memory

Page 0

Page 1

Page 2

Page 3

(19)

Page 8 / 10

Q7)

Given the following reference string, Apply Optimal, and FIFO page

replacement algorithms and calculate the number of page faults for each

algorithm. Consider there are 4 frames available.

(6 Marks)
(20)

Page 9 / 10

Q8)

Given the following processes set. Find the

waiting times

for all processes

using:

1.

Priority Scheduling and

2.

RR, Quantum= 5

(4 Marks) Process Burst Time Priority

P1 12 4

P2 4 5

P3 9 2

P4 18 1

P5 5 3

Fill in the following table with the waiting times for each process:

Process RR Priority Scheduling

P1

P2

P3

P4

P5

Average Waiting Time

(21)

Page 10 / 10

Q9)

Consider the following process sizes and holes, allocate the required

memory using:

(2 Marks)

1.

Best fit strategy

2.

First fit strategy

Process

Sizes

P

0

100K

P

1

10K

P

2

35K

P

3

15K

Assume that process arrived in this order: P

0,

P

1,

P

2,

P

3

Good Luck!

Instructor signature Internal examiner signature

segment 1 Hole 0 = 50K

Hole 1 = 200K

Hole 2 = 70K

Hole 3= 115K

References

Related documents

For the purpose of registering a public company in Hong Kong, you will need to provide us with the proposed name, the amount of registered capital, identity proof, such as Hong Kong

source.It is from this Agnikunda the cosmic power originated.It is situated within that fire energy and is one with it too.That is the energy of the seen and experienced universe

College of Health and Human Services: Global Health, Health Informatics, Health Systems Management, Nutrition College of Science: Bioinformatics and Computational Biology,

 School of Public Health Application Service (SOPHAS)  Pharmacy College Application Service (PHARMCAS)  Physical Therapy College Application Service (PTCAS). 

This thesis deals with two research problems in the context of infant cry signals: audio segmentation of cry recordings in order to extract relevant acoustic parts, and

Undersøkelsen viste at det var stor forskjell på hvor mange målesett det var registrert ved hjelp av henholdsvis mTILT (419) og eTILT (182 666) (5.2.1).. At eTILT genererte

Between different imaging techniques with contrast-enhancement, contrast- enhanced ultrasound (CEUS) and, in particular, dynamic CEUS have arisen as a promising and

The study was aim to investigate the effects of continuous PCBs exposure on optomotor response (OMR) and retinal photoreceptor cell development-related gene expression in