You are on page 1of 11

Republic of Yemen ‫الجمهورية اليمنية‬

Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
Q1: True or False

1 Word processing and web browsers are examples of Application programs. [ ✓ ]

2 Some OSs has little or no user interface, such as embedded system in mainframe. [ X ]

Some OSs has little or no user interface, such as embedded computers in devices and automobiles

3 Kernel is a program that is running at all times on the computer. [ ✓ ]

4 Interrupt is a hardware-generated signal. [ ✓ ]

It also can be software .

5 Solid-state disk (SSD) is volatile storage device and it is faster than hard disk. [ X ]

Solid-state disk (SSD) is NON-volatile storage device

6 Bootstrap is a program that stored in RAM and it loads OS kernel to start execution. [ X ]

Bootstrap is a program that stored in ROM and it loads OS kernel to start execution

7 Trap or Exception is a Software interrupt caused by an error or user request. [ ✓ ]

8 DMA is standing for Direct Memory Access and transferring data block without CPU [ ✓ ]
intervention.

9 Clustered Systems similar to multiprocessors system but multiple systems working [ ✓ ]


together.

10 Multiprogramming system is another name to Batch system. [ ✓ ]

11 OS user interface can be CLI, GUI, Batch, or Voice Command. [ ✓ ]

12 Shell is a system program that interpreters the user’s commands. [ ✓ ]

13 System call can use stack to pass parameters to OS. [ ✓ ]

14 Computer resources are CPU cycles and Main Memory only. [ X ]

Computer resources are CPU cycles, Main Memory y, file storage, I/O devices.

15 System call is a Programming interface to the OS services. [ ✓ ]

16 Background services also known as subsystems. [ ✓ ]

Also Known as services, subsystems, daemons

1
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
17 Process creation is light-weight while thread creation is heavy-weight. [ X ]

Process creation is heavy-weight while thread creation is light-weight

18 Kernels are generally multithreaded. [ ✓ ]

19 Parallel computing supports more than one task making progress. [ X ]

Concurrency supports more than one task making progress

20 Distributes subsets of the same data across multiple cores, same operation on each I [ ✓ ]
type of data parallelism

21 One-to-one model is more concurrency than many-to-one [ ✓ ]

22 In one-to-one multithreaded model, creating a user-level thread leads to creates a [ ✓ ]


kernel thread.

23 Two-level Model is similar to Many-to-Many Model except that it allows a user thread [ ✓ ]
to be bound to kernel thread.

24 The default signal handling refers to kernel. [ ✓ ]

25 Deferred cancellation terminates the target thread immediately. [ X ]

Asynchronous cancellation terminates the target thread immediately

26 Thread-local storage (TLS) is useful when using a thread pool. [ ✓ ]

Q2: Answer the following questions based on your knowledge and understanding (short answer)

1 What is an Operating System?

A program that acts as an intermediary between user of computer and the computer
hardware

2 List the components of Computer System; give some examples for each component.

1-Hardware>>like CPU, Memory, I/O Devices

2-opreting system >> MS windows, Mac OS and chrome OS also fedora and free BSD
3-Aplication program>> like word processor compilers, assembler and database browser
video gam

4-Users >> people , computer , machine and so on.

2
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
3 What is the relation between kernel and bootstrap program (firmware)?

Kernel the essential core of OS that runs all time while the computer is on.

Bootstrap the part of OS that loaded at start-up or reboot and it is initializes all aspects of
system including Kernel.

In summarizing kernel cannot start up before bootstrap.

4 Order the storage devices according to speed and volatility.

1-regesters

2-cache

3-main memory

4-Solid state disk (SSD)

5-Hard disk

6-optical disk

7-Mangnetic tapes

5 What is the main difference between multiprogramming and multitasking OS? Why the
response time should be less than one second in multitasking OS?

➢ Multiprogramming organizes jobs (code and data) so CPU always has one to execute

➢ Multitasking is logical extension in which CPU switches jobs so frequently that users
can interact with each job while it is running, creating interactive computing

6 What is dual mode operation, how does it work?


➢ dual mode operation is a task or operation that allows OS to protect itself and other
system components

➢ it work by Provides ability to distinguish when system is running user code or kernel
code

7 What is the difference between protection and security? Support your answer by examples.
➢ Protection – any mechanism for controlling access of processes or users to resources

3
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
defined by the OS

➢ Security – defense of the system against internal and external attacks

➢ Example: worms, viruses, identity theft, theft of service

8 List three types of Data Structures used in OS.

1- Linked List

2- Binary search tree

3- Hash function

4- Bitmap

9 List four types of Computing Environments; give two examples for each.

1-Traditional :Portals provide web access to internal systems، Network computers (thin
clients) are like Web terminals and Mobile computers interconnect via wireless network

2- Mobile: Handheld smartphones, tablets, and gyroscope

3- Distributed: Local Area Network (LAN)

– Wide Area Network (WAN)

– Metropolitan Area Network (MAN)

– Personal Area Network (PAN)

3- Client-Server: Compute-server system provides an interface to client to request services


(i.e., database)

File-server system provides interface for clients to store and retrieve files

10 What is Emulation? Explain your answer by giving an example.

Emulation used when source CPU type different from target type (i.e. PowerPC to Intel x86);

Programs like parallels Desktop, VMware;

11 What is the relation between virtualization and cloud computing environments? List the
services of cloud computing; give some examples for each service.

4
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
Virtualization transform physical hardware into virtual machines while cloud computing is a
kind of services that is used to store the transform data.

12 Define the distributed computing and list the types of networking according to geographical
criteria.
distributed computing Collection of separate, possibly heterogeneous, systems networked
together

types of Network

- Local Area Network (LAN)

- Wide Area Network (WAN)

- Metropolitan Area Network (MAN)

- Personal Area Network (PAN)

13 List three types of System Calls; give some examples for each type.

1- Process control: Debugger for determining bugs, single step execution


Locks for managing access to shared data between processes

2- File management: create file, delete file, open, close file, read, write, reposition, get and
set file attributes

3- Device management: request device, release device, read, write, reposition, get device
attributes, set device attributes, logically attach or detach devices

14 List all types of system programs; give two examples for each type.

➢ File manipulation

➢ Status information sometimes stored in a File modification

➢ Programming language support: - examples Compilers, assemblers, debuggers and


interpreters sometimes provided
➢ Program loading and execution: examples Absolute loaders, relocatable loaders,
5
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
linkage editors, and overlay-loaders

➢ Communications

➢ Background services: Provide facilities like disk checking, process scheduling, error
logging, printing

➢ Application programs: Don’t pertain to system Run by users

15 What are the types of structures used to design OS? Give an example for each if available.

➢ Simple structure – MS-DOS

➢ More complex -- UNIX

➢ Layered – an abstraction

➢ Microkernel -Mach

16 What is the role of operating system debugging?

finding and fixing errors, or bugs

17 What is SYSGEN program; what it used for?

Is program obtaining information concerning the specific configuration of the hardware


system

Used to build system-specific compiled kernel or system-tuned

18 What is the main advantage of the microkernel approach to system design?

➢ Easier to extend a microkernel

➢ Easier to port the operating system to new architectures

➢ More reliable (less code is running in kernel mode)

➢ More secure

19 How do user programs and system services interact in microkernel architecture?

The interact between user and system using message passing

6
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
20 Define the Hybrid OS structure; support your answer by giving some examples.

Hybrid combines multiple approaches to address performance, security, usability needs

Example Linux and Solaris, Windows and Apple Mac OS

21 What is the relation between passive and active entity? When the program becomes process?

Program is a passive entity

process is an active entity

Program becomes process when executable file loaded into memory.

22 Describe the parts of process?

➢ The program code, also called text section

➢ program counter

➢ Stack: containing temporary data : processor registers

Function parameters, return addresses, local variables

➢ Data section: containing global variables

➢ Heap: containing memory dynamically allocated during run time

23 State the process states; give short description for each.

As a process executes, it changes state

➢ new: The process is being created

➢ running: Instructions are being executed

➢ waiting: The process is waiting for some event to occur

➢ ready: The process is waiting to be assigned to a processor

➢ terminated: The process has finished execution

24 What is the process control block? What are its elements?

process control block is Information associated with each process (also called task control
block)

7
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
its elements

➢ Process state – running, waiting, etc

➢ Program counter – location of instruction to next execute

➢ CPU registers – contents of all process centric registers

➢ CPU scheduling information- priorities, scheduling queue pointers

➢ Memory-management information – memory allocated to the process

➢ Accounting information – CPU used, clock time elapsed since start, time limits

➢ I/O status information – I/O devices allocated to process, list of open files

25 Describe the actions taken by a kernel to context-switch between processes.

➢ store the all register values into PCB

➢ restore the values of the process to run next

➢ Move to the next process to execute

26 List the scheduling queues. What is the purpose of each queue?

➢ Job queue: set of all processes in the system

➢ Ready queue: set of all processes residing in main memory, ready and waiting to
execute

➢ Device queues: set of processes waiting for an I/O device

27 Briefly, explain the differences among short-term, medium-term, and long-term scheduling.

➢ Short-term: selects which process should be executed next and allocates CPU.

➢ Long term: elects which processes should be brought into the ready queue.

➢ Medium-term: can be added if degree of multiple programming needs to decrease.

28 When and why Context-switch time becomes overhead?

because the system does no useful work while switching. ... Context switching is overhead
because it is cycles (time) that the processor is being used but no user code is executing, so no
directly productive computing is getting done.

8
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
29 What is the difference between independent and cooperating processes? What is the
advantage of cooperating process over independent? List the models used to communicate
the cooperating processes.

Cooperating process can affect or be affected by other processes, including sharing data.

advantage of cooperating process over independent:

Information sharing

Computation speedup

Modularity

Convenience

Two models of Cooperating processes:

Shared memory

Message passing

30 How the processes are communicating in Client-Server systems?

Sockets

defined as an endpoint for communication

Remote Procedure Calls

Remote procedure call (RPC) abstracts procedure calls between processes on networked
systems

Pipes

Acts as a conduit allowing two processes to communicate

31 State the benefits of using multithreaded in modern operating systems.


Responsiveness – may allow continued execution if part of process is blocked, especially
important for user interfaces
Resource Sharing – threads share resources of process, easier than shared memory or
message passing

9
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
Economy – cheaper than process creation, thread switching lower overhead than context
switching
Scalability – process can take advantage of multiprocessor architectures
32 List the challenges of using multithreaded with respect to the programmers.
Dividing activities
Balance
Data splitting
Data dependency
Testing and debugging
33 What main difference between data and task parallelism?
Data parallelism: distributes subsets of the same data across multiple cores, same operation
on each
Task parallelism: distributing threads across cores, each thread performing unique operation
34 Assume that, there are 9 tasks, show how these tasks can be executed on single-core system
and 3-cores system? (draw figure to explain the idea, ordering is not necessary)

35 State the multithreading models.


Many-to-Many

10
Republic of Yemen ‫الجمهورية اليمنية‬
Ministry of Higher Education & Scientific Research ‫وزارة التعليم العالي و البحث العلمي‬
International University of Technology Twintech ‫جامعة تونتك الدولية للتكنولوجيا‬

Major: BSc (Hons) Business Information Technology Year: 3 Semester: 5


Subject Name: Operating System Lecturer: Dr. Amin Mohamed Shayea
Activity : Assignment 1
Name Student : Yassin Abdulrahman Yassin Al-humaidi
One-to-Many
Many-to-One
36 Why many-to-one model cannot get benefit of multicore system?
Because Many-to-One only one thread may be in kernel at a time.
37 Why the number of threads per process sometimes restricted in one-to-one multithreaded
model?
More concurrency than many-to-one
Number of threads per process sometimes restricted due to overhead
38 What are the advantages of thread pool? (state two only)
-Allows the number of threads in the application(s) to be bound to the size of the pool
-Separating task to be performed from mechanics of creating task allows different strategies
for running task
i.e. Tasks could be scheduled to run periodically
39 What is TLS standing for, what does it do?
It standing for Thread-local storage
It allows each thread to have its own copy of data
40 What are the differences between TLS and local variables?
- Local variables visible only during single function invocation
-TLS visible across function invocations
Note: Answer the questions according to the questions’ order.

11

You might also like