Friday, January 15, 2010

Aiza S. Cabrera                                                                                                January 9, 2010

BSIT-3

I. Concept Questions

1. Name the five key concepts about an operating system that you think a user needs to know and understands.

Answer:

1.1 User Command Interface

This is the interface from which the user issues commands to the operating system. Also called the “shell” (container inside which the entire user interface is presented), this is the visible interface with which users interact. For most users, the User Interface is the operating system.

1.2 Device Manager

This component monitors all devices, channels, and control units. The Device Manager must select the most efficient method for allocation of a system’s devices, printers, terminals, disk drives, and other hardware. This is based on a pre-determined scheduling policy, and the Device Manager makes allocations, starts operations, and ultimately deallocates devices.

1.3 Processor Manager

This component is responsible for allocating the central processing unit (CPU). The status of each process must be tracked, and the Processor Manager handles matters such as process prioritization and multithreading. The tasks of the Processor Manager can be divided into two main categories: accepting or rejecting incoming jobs (handled by the Job Scheduler) and determining which process is given access to the CPU and for how long (handled by the Process Scheduler).

1.4 Memory Manager

This component controls main memory. It evaluates the validity of each memory request, and allocates memory space (as needed and available). For multi-user systems, the Memory Manager maintains a log of what memory resources are in use by which users. When items stored in main memory are no longer needed, the Memory Manager handles memory deallocation.

1.5 File Manager

This component tracks every file in the system. These files include data files, assemblers, compilers, and applications. The File Manager can use predetermined access policies to enforce restrictions on file access. It also handles all other file permissions. The File Manager allocates file resources by opening a particular file and deallocates resources by closing the file.

 

 

3. Explain the following:

            a. Internal Fragmentation. How does it occur?

Internal fragmentation occurs when storage is allocated without ever intending to use it. This space is wasted. While this seems foolish, it is often accepted in return for increased efficiency or simplicity. The term "internal" refers to the fact that the unusable storage is inside the allocated region but is not being used.

            b. External Fragmentation. How does it occur?

External fragmentation is the phenomenon in which free storage becomes divided into many small pieces over time. It is a weakness of certain storage allocation algorithms, occurring when an application allocates and deallocates ("frees") regions of storage of varying sizes, and the allocation algorithm responds by leaving the allocated and deallocated regions interspersed. The result is that although free storage is available, it is effectively unusable because it is divided into pieces that are too small to satisfy the demands of the application. The term "external" refers to the fact that the unusable storage is outside the allocated regions.

            c. Compaction. Why is it needed?

 

4. Cache Memory how it works?

Answer:

A CPU cache is a cache used by the central processing unit of a computer to reduce the average time to access memory. The cache is a smaller, faster memory which stores copies of the data from the most frequently used main memory locations. As long as most memory accesses are cached memory locations, the average latency of memory accesses will be closer to the cache latency than to the latency of main memory.

When the processor needs to read from or write to a location in main memory, it first checks whether a copy of that data is in the cache. If so, the processor immediately reads from or writes to the cache, which is much faster than reading from or writing to main memory.

5. Which is the fastest cache’s L1, L2, L3? Why?

Answer:

L1 cache is the fastest among the three because it has a capacity between 4 to 16 kilobytes and accessing speeds of 10 nanoseconds, while the L2 cache can reach sizes of 512 kilobytes and a speed of only 20 to 30 nanoseconds.

II. Memory Utilization Problem

1.      Given the following information:

Table 1A

Job Number

Memory Requested

J1

700KB

J2

500KB

J3

740KB

J4

850KB

J5

610KB

 

a. Use the best-fit algorithm to allocate the memory blocks to the five arriving jobs.

Memory Block

Memory size

Job number

Job size

Status

Internal Fragmentation

1132

700

J1

700KB

Busy

0

1003

720

J5

610KB

Busy

110

1114

800

J3

740KB

Busy

60

2310

750

-

-

Free

 

1755

610

J2

500KB

Busy

110

 

 

b.      Use the first-fit algorithm to allocate the memory blocks to the five arriving jobs.

Memory Block

Memory size

Job number

Job size

Status

Internal Fragmentation

1132

700

J1

700

Busy

0

1003

720

J2

500

Busy

220

1114

800

J3

740

Busy

60

2310

750

J5

610

Busy

140

1755

610

-

-

Free

 

 

c.       Use the next-fit algorithm to allocate the memory blocks to the five arriving jobs.

Memory Block

Memory size

Job number

Job size

Status

Internal Fragmentation

1132

700

-

-

Free

 

1003

720

J5

610

Busy

110

1114

800

J3

740

Busy

60

2310

750

J1

700

Busy

50

1755

610

J2

500

Busy

 

 

d.      Use the worst-fit algorithm to allocate the memory blocks to the five arriving jobs.

Memory Block

Memory size

Job number

Job size

Status

Internal Fragmentation

1132

700

-

-

Free

 

1003

720

J5

610

Busy

110

1114

800

J1

700

Busy

100

2310

750

J2

500

Busy

250

1755

610

-

-

Free

 

 

 

 

2.      Given the following information:

Table 2A

Job Number

Memory Requested

J1

30KB

J2

50KB

J3

30KB

J4

25KB

J5

35KB

 

Table 2B

ORIGINAL STATE OF MAIN MEMORY

100KB(P1)

 

 

 

 

25KB(P2)

25KB(P3)

50KB(P4)

 

 

30KB(P5)

 


 

 

 

 

 

 

a. Create a memory layout for the fixed partition after job entry based on the given information (Table 2A and Table B)

 

J1 30KB                                   

J2 50KB

J3 30KB

J4 25KB

J5 35KB

ORIGINAL STATE

100KB

 

 

 


25KB

25KB

50KB

 

 


30KB

 

 

 

 

 

 

 

 

Job After Entry

J1 30KB

 

 

 

 


J4 25KB

J2 50KB

 

J3 30KB

 

 

 

 

 

 

P1

 

P2

P3

 

P4

 

 

P5

 

 

 

b. Before Job 6 (30KB) and Job 7 (45KB) arrives, there are three jobs done already for processing which J2,J3,J4. Create an initial memory layout for the dynamic partition based on the given information (Table 2A)

 

 

J1 30KB                                   

J2 50KB

J3 30KB

J4 25KB

J5 35KB

ORIGINAL STATE

100KB

 

 

 


25KB

25KB

50KB

 

 


30KB

 

 

 

 

 

 

 

 

Job After Entry

J1 30KB

 

 

 

 


 

 

 

 

 

 

 

 

 

P1

 

P2

P3

 

P4

 

 

P5

 

J2,J3,J4 are already done

OS

J1 30KB

 

 

 

 


J7 45KB

 

J6 30KB

 

 

 

 

   P1

 

 

P2

P3

 

 

   P4

 

  P5
 

J6 and 7 arrives

 

 

3. Illustrate and find the page number with the displacement of a given program line:

Job1 is 1600 lines long

PS=200 and LNTBL=542.

Answer:

 

LNTBL divided by PS and the result is the Page Number and the remainder is the displacement

 

542 ÷ 200=2 the remainder is 142

Therefore the displacement is 142

                       

                       

                        ­­­

 

2. List three tangible (physical) resources of a computer system and explain how it works.

Answer:

2.1  IRQ

Short for Interrupt request, IRQ is a signal that has a direct line to the computer processor, allowing it to stop the processor momentarily and decide what to do next. Every IBM compatible computer has a maximum of 15 IRQs and are prioritized in the computer according to the importance of the device. See IRQ Listing for a list of IRQs,which may be available or are currently used.

2.2  I/O

Input Output (I/O) represents the locations in memory that are designated by use of various devices to exchange information amongst themselves and the rest of the PC. See IRQ Listing for a list of IRQs and I/O ranges.

2.3  DMA

DMA, or Direct Memory Access, are pathways provided by the hardware to allow the hardware direct access to the computer's memory. See DMA Listing for listing of DMA channels.

 

No comments:

Post a Comment

Followers

About Me

My photo
mALditaH jUd dAw... SamOKan... fRiEndLy... swEet... cARing... LoviNg... dALing mASukO...