0% found this document useful (0 votes)
12 views4 pages

Compression in Multimedia Files

The document discusses various topics related to data compression, signed integers, algorithm comparison, and modes of operation in computing systems. It highlights the inefficiency of compressing multimedia files, the representation of signed integers using sign-and-magnitude and two's complement, and compares algorithms based on time and space complexity. Additionally, it describes different system operation modes including batch processing, real-time, online interactive, single-user/multi-user, parallel processing, distributed processing, and network systems.

Uploaded by

hubert0419
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

Compression in Multimedia Files

The document discusses various topics related to data compression, signed integers, algorithm comparison, and modes of operation in computing systems. It highlights the inefficiency of compressing multimedia files, the representation of signed integers using sign-and-magnitude and two's complement, and compares algorithms based on time and space complexity. Additionally, it describes different system operation modes including batch processing, real-time, online interactive, single-user/multi-user, parallel processing, distributed processing, and network systems.

Uploaded by

hubert0419
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SGA Question 32 – Compression Utility and Multimedia Files 數據壓縮軟件與多媒體檔案

This is because a multimedia file often adopts a form of lossy or lossless compression, which has
reduced the file to the smallest possible size. Compressing the multimedia file is therefore
inefficient.

這是因為多媒體檔案通常已使用了某類型的有損或無損壓縮,並以把檔案大小盡可能降至最低。所以壓縮多媒體檔案的效率十分低。

SGA Question 22: Signed Integer 帶號整數

In sign-and-magnitude, the first bit (also known as the most significant bit) represents whether the
number is negative, i.e. if the most significant bit is 1, the number represented is negative. The rest
of the bits represent the magnitude of the number, which is the same as the unsigned integer of the
number.

The main problem of this approach is that there are 2 representations of 0 (and -0), which is
wasteful.

Two’s complement is the most common way to represent a signed integer. To find the two’s
complement representation of the integer -x, we first find the binary representation of integer x,
then revert all bits to find the ones’ complement, and finally add one to the result. The first bit under
two’s complement will have a weight of -(2^N) and therefore can be treated as the sign bit similar to
the sign-and-magnitude approach.

在符號與值中,第一個位元(亦稱為最有效位元)代表該數值是否為負數,即如果最有效位元為 1 時,則該數字為負。其餘的位元代表數字的值,並與非
帶號整數的表示法相同。

這個方法的主要問題是有 2 個表示 0 (及 -0)的方法,會產生浪費。

二進制補碼(二補碼)是表達帶號整數的最常用方法。要找出整數 -x 的二進制補碼表示法,我們首先會找出整數 x 的二進制表示法,然後把所有位元反


轉獲取二進制反碼(一補碼),最後對結果加一。二進制補碼下,第一個位元的比重為 `-(2^N)`,故可視作符號與值方法中的符號位元。
Question 162: Comparing Algorithm of Solution 比較方案的算法

We can compare the algorithm of different solution by 2 aspects-

1. Time complexity: it refers to the execution time required to complete the algorithm. Normally, we
will compare the number of loops inside the algorithm. Fewer loops indicate the algorithm will
complete in a faster speed.

2. Space complexity: it refers to the number of variables (memory space) used in the algorithm.

In most cases, the execution speed (time complexity) of the algorithm is more important than the
number of variables used in the algorithm. Also, there is a trade-off between time and space
complexity- a faster algorithm often requires more variables (more memory space)

我們可以從 2 個層面比較不同方案的算法:

1. 時間複雜度:它指的是要完成該算法的執行時間。通常來說,我們會比較兩個算法中的循環數量。較少的循環數量即會以較短的時間完成算法。

2. 空間複雜度:它指的是算法中使用的變量數量(記憶空間)。

在絕大部分情況下,算法的執行速度(時間複雜度)比算法所使用的變量數量更重要。另外,時間和空間複雜度之間會有權衡——一個較快的算法通常會
需要更多變量(更多記憶空間)。
SGA Question 96: Modes of Operation 運作模式

Batch Processing System 成批處理系統

All tasks the system receives are accumulated and are executed in batches without user’s
intervention. Since the system only executes a batch of tasks for a short period of time, the idle time
of a batch processing system is lower than other systems.

系統會累積所有工作,並以批次作為單位執行而無需用戶干預。由於系統會以較短時間內執行工作批次,所以成批處理系統的空閒時間比其它系統低。

Real Time System 實時系統

The system executes the task immediately when it receives the task.

系統會在接收工作時立刻執行工作。

Online Interactive System 網上互動系統

The user directly interacts with the online system and provides data and command to the system,
where the system will respond almost immediately.

用戶會直接與網上系統互動,並對系統提供數據及指令。系統會幾乎立刻回應要求。

Single-user/Multi-user System 單戶/多戶系統

A single-user system only allows one user to operate on the system at the same time. A multi-user
system allows multiple users to operate on the system at the same time.

一個單戶系統同一時間只容許一名用戶操作系統。一個多戶系統同一時間容許數個用戶操作系統。

Parallel Processing System 並行式處理系統

The system consists of multiple processors, and a task is executed on multiple processors at the
same time, handling the task in parallel.

該系統包含數個處理器,而每個工作會在數個處理器上同時執行,平行地處理該工作。

Difference with distributed processing system: there is only one computer in the system.

與分布式處理系統的差異:並行式系統只有一台電腦。

Distributed Processing System 分布式處理系統

The task is split and distributed to different computers in the system so that the system can handle
more complicated jobs.
工作會被分割並分布至系統中的不同電腦,好讓系統能處理更多複雜工作。

Difference with parallel processing system: there is more than one computer in the system.

與並行式處理系統的差異:分布式系統中有多於一台電腦。

Network System 網絡系統

Independent computers are connected to a network. Each computer has its own processors and
storage capacity.

連接到網絡、獨立的電腦。 每台電腦都有自己的處理器和儲存容量。

Common questions

Powered by AI

Parallel processing systems have multiple processors within a single computer that execute tasks simultaneously, handling tasks in parallel . In contrast, distributed processing systems involve multiple computers where tasks are split and distributed across different computers, allowing them to handle more complex jobs . The main structural difference is that parallel processing is centralized with one computer, whereas distributed processing involves multiple computers being used collaboratively .

Multi-user systems allow multiple users to operate on the system simultaneously, making more efficient use of resources and increasing productivity in environments like servers and workplaces with shared resources . Conversely, single-user systems optimize resource allocation solely for one user at a time, which might be more suitable for personal computing devices where dedicated access and performance are prioritized . Multi-user systems require robust security and resource management to handle concurrent accesses effectively, whereas single-user systems can focus on optimizing performance and user experience for one person .

The two's complement system allows for only one representation of zero, eliminating the redundancy found in the sign-and-magnitude approach which has both positive and negative zero . Additionally, two's complement simplifies arithmetic operations, as subtraction operations can be performed directly using addition of negative numbers. However, it can be less intuitive for human understanding compared to the sign-and-magnitude approach where the sign of the number is explicitly marked .

Batch processing systems are preferred in scenarios where tasks can be accumulated and require no immediate user intervention, as they execute the accumulated tasks in batches, reducing idle time compared to other systems . This is suitable for scenarios involving large volumes of similar tasks, such as processing payroll or end-of-day transactions in banks. Real-time systems, however, are necessary for tasks requiring immediate execution as soon as they are received, like air traffic control systems, where delay can lead to critical issues .

Online interactive systems are designed for direct user interaction, where the system responds almost immediately to data and commands provided by the user, optimizing for user experience and engagement . Real-time systems execute tasks immediately upon receiving them, focusing strictly on timely task processing to meet real-time constraints, such as in environments where timing is critical regardless of user interaction, like automated industrial control systems . While both provide quick responses, the main difference lies in the focus: user interaction in online systems versus task-driven execution in real-time systems.

Execution speed is often prioritized over memory usage as it directly impacts user experience and system throughput; faster execution means that tasks can be completed in a timely manner, reducing wait times and increasing productivity . In many applications, especially those that require real-time performance or are resource-intensive, the ability to execute quickly is critical to system success. Memory resources can often be expanded more easily in modern systems compared to optimizing execution speeds, which typically require more complex algorithmic improvements .

To find the two's complement of a negative integer, the binary representation of the absolute value is first determined, then all bits are inverted to get the ones' complement, and finally, one is added to this result . This contrasts with finding the binary representation of a positive integer, which involves directly translating the integer into binary format without these additional steps .

Compressing multimedia files is often inefficient because these files typically already use some form of lossy or lossless compression to reduce their size to the smallest necessary. Additional compression would not yield significant further reductions and could potentially degrade quality .

Algorithm design choices often involve trade-offs between time and space complexity. A faster algorithm with less execution time (time complexity) may require the use of more memory (space complexity) due to increased variables and data structures . Designers must prioritize based on the problem's constraints: if time is critical, more memory might be justified; if memory is limited, a slower, less memory-intensive solution might be preferable. Ultimately, the choice depends on the specific requirements and constraints of the system in which the algorithm is implemented .

An organization might choose a distributed processing system over a network system when complex or large-scale computations are involved, requiring tasks to be divided and managed across multiple computers to improve performance and scalability . While network systems allow for independent processing on each connected computer, distributed systems focus on handling a single task using resources collectively across multiple devices, making them suitable for applications like scientific simulations and large data analyses where collaborative computing is beneficial .

You might also like